* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 40, 0.6);
    
    --text-primary: #f0f0f5;
    --text-secondary: #9090a0;
    --text-muted: #606070;
    
    --accent-primary: #ff6b35;
    --accent-secondary: #ff8f65;
    --accent-glow: rgba(255, 107, 53, 0.3);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    
    --purple-accent: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.2);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--purple-glow), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, var(--accent-glow), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(59, 130, 246, 0.15), transparent);
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 3rem 4rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--success-glow); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px transparent; }
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 4rem;
}

/* Editor Panels */
.editor-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: border-color var(--transition-normal);
}

.editor-panel:hover {
    border-color: var(--border-hover);
}

.input-panel:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.output-panel {
    border-color: var(--purple-accent);
    box-shadow: 0 0 40px var(--purple-glow);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.file-icon {
    font-size: 1.1rem;
}

.btn-example,
.btn-copy {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-example:hover,
.btn-copy:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.editor-wrapper {
    display: flex;
    min-height: 400px;
    max-height: 500px;
    overflow: hidden;
    position: relative;
}

.line-numbers {
    padding: 1rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: right;
    user-select: none;
    border-right: 1px solid var(--border-color);
    min-width: 50px;
    overflow: hidden;
    flex-shrink: 0;
    white-space: pre;
}

#inputSpec {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
    tab-size: 2;
}

#inputSpec::placeholder {
    color: var(--text-muted);
    white-space: pre-wrap;
}

.output-wrapper {
    flex: 1;
    padding: 1rem;
    overflow: auto;
    max-height: 500px;
}

.output-content {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre;
    word-wrap: normal;
    overflow-x: auto;
}

.output-content .placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Syntax Highlighting */
.yaml-key {
    color: #f472b6;
}

.yaml-value {
    color: #a5f3fc;
}

.yaml-string {
    color: #86efac;
}

.yaml-comment {
    color: var(--text-muted);
    font-style: italic;
}

.yaml-dash {
    color: var(--accent-primary);
}

/* Converter Actions */
.converter-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-convert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), #e85d2a);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-convert:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-convert:active {
    transform: translateY(0) scale(0.98);
}

.btn-convert svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn-convert:hover svg {
    transform: translateX(4px);
}

.shortcut-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

/* AI Badge */
.ai-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15), rgba(52, 168, 83, 0.15));
    border: 1px solid rgba(66, 133, 244, 0.3);
    border-radius: var(--radius-md);
}

.ai-icon {
    font-size: 1.1rem;
}

.ai-text {
    font-size: 0.8rem;
    color: #4285f4;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-convert:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Supported Steps */
.supported-steps {
    margin-bottom: 3rem;
}

.supported-steps h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.step-card code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.step-card code:first-child {
    color: #86efac;
}

.step-card code:last-child {
    color: #a5f3fc;
}

.step-card .arrow {
    color: var(--accent-primary);
    font-weight: 600;
    flex-shrink: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.credits {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.credits a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.credits a:hover {
    color: var(--accent-primary);
}

.credits span {
    color: var(--text-muted);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    color: var(--success);
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all var(--transition-smooth);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .converter-actions {
        flex-direction: row;
        padding: 1rem 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
    }
    
    .editor-wrapper {
        min-height: 300px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Animation for converted output */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.output-content.animated {
    animation: fadeInUp 0.3s ease-out;
}

