:root {
    --bg-primary: #050b1a;
    --bg-secondary: #0a1430;
    --surface: rgba(8, 15, 32, 0.78);
    --surface-strong: rgba(10, 20, 45, 0.95);
    --surface-alt: rgba(99, 102, 241, 0.16);
    --border: rgba(99, 102, 241, 0.18);
    --border-strong: rgba(94, 234, 212, 0.45);
    --text-primary: #f8fafc;
    --text-muted: rgba(203, 213, 225, 0.8);
    --accent: #6366f1;
    --accent-strong: #38bdf8;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --warning: #facc15;
    --success: #34d399;
    --card-radius: 28px;
    --transition: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.55), transparent 55%),
        radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.4), transparent 52%),
        linear-gradient(160deg, rgba(5, 11, 26, 0.95), rgba(1, 5, 14, 0.95));
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 18% 82%, rgba(34, 211, 238, 0.18), transparent 55%),
        radial-gradient(circle at 88% 72%, rgba(236, 72, 153, 0.22), transparent 60%);
    opacity: 0.45;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}

a:hover,
a:focus-visible {
    color: #fff;
    opacity: 0.9;
}

a:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.page-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.card {
    position: relative;
    background: linear-gradient(160deg, rgba(8, 15, 32, 0.88), rgba(10, 20, 45, 0.72));
    border-radius: var(--card-radius);
    border: 1px solid rgba(99, 102, 241, 0.14);
    box-shadow: 0 40px 90px rgba(5, 11, 26, 0.55);
    backdrop-filter: blur(22px);
    padding: 3rem;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.15rem 1.75rem;
    background: rgba(8, 15, 32, 0.78);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 999px;
    box-shadow: 0 20px 60px rgba(5, 11, 26, 0.45);
    backdrop-filter: blur(18px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.35);
    flex-shrink: 0;
}

.nav-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.nav-brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--transition), transform var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #fff;
    transform: translateY(-1px);
}

.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(8, 15, 32, 0.45);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.button-ghost:hover,
.button-ghost:focus-visible {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 18px 42px rgba(5, 11, 26, 0.4);
}

.hero {
    display: grid;
    gap: 2.75rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.18), transparent 55%);
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-eyebrow {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-strong);
    font-weight: 600;
    margin: 0;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.75rem, 4vw, 3.75rem);
    font-weight: 700;
    line-height: 1.15;
}

.hero-description {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.08rem;
    max-width: 60ch;
}

.hero-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.hero-highlights li {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.98rem;
    color: var(--text-muted);
}

.hero-highlights li::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.45rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.22);
    flex-shrink: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.hero-stat {
    background: rgba(8, 15, 32, 0.68);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 18px;
    padding: 0.85rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 160px;
}

.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.hero-visual-frame {
    position: relative;
    padding: 1.75rem;
    border-radius: 32px;
    background: linear-gradient(160deg, rgba(6, 13, 30, 0.85), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 30px 70px rgba(5, 11, 26, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.hero-visual-frame::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(56, 189, 248, 0.18));
    opacity: 0.65;
    z-index: 0;
}

.hero-visual-frame > * {
    position: relative;
    z-index: 1;
}

.hero-preview {
    width: min(320px, 62vw);
    border-radius: 24px;
    padding: 1.25rem 1.4rem 1.45rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(99, 102, 241, 0.28));
    border: 1px solid rgba(99, 102, 241, 0.32);
    box-shadow: 0 22px 55px rgba(5, 11, 26, 0.55);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    overflow: hidden;
}

.hero-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.35), transparent 55%),
        radial-gradient(circle at 82% 88%, rgba(168, 85, 247, 0.3), transparent 62%);
    opacity: 0.65;
    pointer-events: none;
}

.hero-preview > * {
    position: relative;
    z-index: 1;
}

.hero-preview-media {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.85);
}

.hero-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-weight: 600;
    color: #f8fafc;
}

.hero-preview-timer {
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    background: rgba(5, 11, 26, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.28);
    font-weight: 600;
    color: #f8fafc;
}

.hero-preview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    border-radius: 18px;
    background: rgba(5, 11, 26, 0.78);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.45);
}

.hero-preview-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.85), rgba(168, 85, 247, 0.9));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.55);
}

.hero-preview-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-preview-title {
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f8fafc;
}

.hero-preview-subtitle {
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.88rem;
}

.hero-logo-link {
    display: inline-flex;
    padding: 1.5rem;
    border-radius: 22px;
    background: rgba(5, 11, 26, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 24px 55px rgba(5, 11, 26, 0.55);
}

.hero-logo-link img {
    width: min(200px, 45vw);
    filter: drop-shadow(0 16px 35px rgba(56, 189, 248, 0.3));
}

.hero-visual-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.hero-visual-badges.secondary {
    opacity: 0.85;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    background: rgba(5, 11, 26, 0.68);
    border: 1px solid rgba(99, 102, 241, 0.25);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-visual-caption {
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.features-card {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.section-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-subtitle {
    margin: 0;
    color: var(--text-muted);
    max-width: 62ch;
    font-size: 1.02rem;
}

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

.feature-card {
    position: relative;
    padding: 1.9rem;
    border-radius: 24px;
    background: rgba(6, 13, 30, 0.72);
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 24px 60px rgba(5, 11, 26, 0.45);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.12), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(140deg, var(--accent), rgba(56, 189, 248, 0.85));
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: inherit;
}

.feature-card h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.command-callout {
    background: rgba(5, 11, 26, 0.65);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 22px;
    padding: 1.9rem 2.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    box-shadow: 0 30px 70px rgba(5, 11, 26, 0.45);
}

.command-callout h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.command-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.command-grid li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.command-label {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.command-footnote {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.design-lab {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

.design-lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.6rem;
}

.lab-card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.8rem;
    border-radius: 24px;
    background: rgba(6, 13, 30, 0.72);
    border: 1px solid rgba(99, 102, 241, 0.22);
    box-shadow: 0 24px 60px rgba(5, 11, 26, 0.45);
}

.lab-preview {
    position: relative;
    border-radius: 20px;
    padding: 1.4rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.lab-preview::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 15% 20%, rgba(248, 250, 252, 0.15), transparent 60%),
        radial-gradient(circle at 85% 78%, rgba(56, 189, 248, 0.22), transparent 70%);
    opacity: 0.6;
    pointer-events: none;
}

.lab-preview > * {
    position: relative;
    z-index: 1;
}

.lab-preview-colors {
    background: linear-gradient(140deg, rgba(59, 130, 246, 0.55), rgba(168, 85, 247, 0.6));
}

.lab-preview-frames {
    background: linear-gradient(150deg, rgba(14, 165, 233, 0.35), rgba(15, 23, 42, 0.88));
}

.lab-preview-motion {
    background: linear-gradient(160deg, rgba(236, 72, 153, 0.45), rgba(79, 70, 229, 0.65));
}

.lab-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.45);
    background: rgba(5, 11, 26, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 600;
}

.lab-sample {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
}

.lab-sample-primary {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(168, 85, 247, 0.9));
}

.lab-sample-secondary {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.8), rgba(59, 130, 246, 0.85));
}

.lab-frame {
    width: 88px;
    height: 52px;
    border-radius: 18px;
    border: 2px solid rgba(244, 244, 255, 0.6);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.45);
}

.lab-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 3px solid rgba(59, 130, 246, 0.65);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.65), rgba(12, 74, 110, 0.9));
}

.lab-wave {
    flex: 1;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.8), rgba(236, 72, 153, 0.8));
    animation: labWave 3s ease-in-out infinite;
}

.lab-badge {
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(248, 250, 252, 0.45);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f8fafc;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.45);
}

@keyframes labWave {
    0%,
    100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(6px);
    }
}

.theme-gallery {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

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

.theme-card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.9rem;
    border-radius: 24px;
    background: rgba(6, 13, 30, 0.72);
    border: 1px solid rgba(99, 102, 241, 0.22);
    box-shadow: 0 26px 60px rgba(5, 11, 26, 0.45);
}

.theme-card h3 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.theme-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.theme-preview {
    position: relative;
    border-radius: 20px;
    padding: 1.5rem;
    min-height: 172px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.75rem;
    color: #f8fafc;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(5, 11, 26, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.theme-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 14% 12%, rgba(248, 250, 252, 0.18), transparent 55%),
        radial-gradient(circle at 82% 88%, rgba(14, 165, 233, 0.22), transparent 60%);
    mix-blend-mode: screen;
    opacity: 0.7;
}

.theme-preview > * {
    position: relative;
    z-index: 1;
}

.theme-preview-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.35);
    background: rgba(5, 11, 26, 0.38);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
}

.theme-preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: 22ch;
}

.theme-preview-heading {
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.theme-preview-body {
    font-size: 0.86rem;
    color: rgba(248, 250, 252, 0.85);
    line-height: 1.5;
}

.theme-preview-aurora {
    background: linear-gradient(150deg, rgba(56, 189, 248, 0.55), rgba(168, 85, 247, 0.62));
}

.theme-preview-studio {
    background: linear-gradient(160deg, rgba(30, 64, 175, 0.78), rgba(15, 23, 42, 0.9));
}

.theme-preview-fancy {
    background: linear-gradient(140deg, rgba(236, 72, 153, 0.45), rgba(79, 70, 229, 0.68));
}

.theme-preview-basic {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(59, 130, 246, 0.45));
}

.theme-preview-outside {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.55), rgba(8, 47, 73, 0.88));
}

.theme-preview-neon {
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.55), rgba(59, 130, 246, 0.6));
}

.theme-preview-poster {
    background: linear-gradient(150deg, rgba(15, 23, 42, 0.9), rgba(14, 165, 233, 0.45));
}

.theme-preview-minimal {
    background: linear-gradient(140deg, rgba(5, 11, 26, 0.82), rgba(148, 163, 184, 0.28));
}

.button-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-strong);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color var(--transition), transform var(--transition);
    align-self: flex-start;
}

.button-link::after {
    content: '→';
    font-size: 0.9em;
    transition: transform var(--transition);
}

.button-link:hover {
    color: #fff;
    transform: translateY(-1px);
}

.button-link:hover::after {
    transform: translateX(3px);
}

code {
    background: rgba(5, 11, 26, 0.72);
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-family: 'Fira Code', 'Source Code Pro', monospace;
    color: var(--text-primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.builder {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.builder-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 60ch;
}

.builder-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.builder-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

.settings-section {
    position: relative;
    background: rgba(6, 13, 30, 0.72);
    border-radius: 24px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    padding: 2.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    overflow: hidden;
}

.settings-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), transparent 70%);
    opacity: 0.85;
    pointer-events: none;
}

.settings-section > * {
    position: relative;
    z-index: 1;
}

.section-header h2 {
    margin: 0;
    font-size: 1.45rem;
}

.section-header p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    max-width: 52ch;
    font-size: 0.97rem;
}

.field-grid {
    display: grid;
    gap: 1.4rem;
}

.field-grid.two-column {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.field-grid.three-column {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.design-token-grid {
    gap: 1.2rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.helper {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.helper.warning {
    color: var(--warning);
}

.text-input,
.text-area,
select {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: rgba(5, 11, 26, 0.78);
    color: var(--text-primary);
    padding: 0.95rem 1.1rem;
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.text-input:focus,
.text-area:focus,
select:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
    background: rgba(5, 11, 26, 0.9);
}

.text-area {
    resize: vertical;
    min-height: 140px;
}

.text-area.code {
    font-family: 'Fira Code', 'Source Code Pro', monospace;
    background: rgba(4, 10, 24, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #e2e8f0;
    line-height: 1.45;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.design-token-stack {
    gap: 1.6rem;
}

.color-input {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 18px;
    background: rgba(5, 11, 26, 0.9);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.25);
    cursor: pointer;
    padding: 0;
}

.color-input::-webkit-color-swatch,
.color-input::-moz-color-swatch {
    border: none;
    border-radius: 16px;
}

.toggle {
    display: flex;
    gap: 1.2rem;
    padding: 1.25rem 1.6rem;
    border-radius: 22px;
    background: rgba(5, 11, 26, 0.72);
    border: 1px solid rgba(99, 102, 241, 0.2);
    align-items: center;
    transition: transform var(--transition), border-color var(--transition), background var(--transition),
        box-shadow var(--transition);
}

.toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(5, 11, 26, 0.85);
    box-shadow: 0 20px 45px rgba(5, 11, 26, 0.45);
}

.toggle-input {
    appearance: none;
    width: 3.2rem;
    height: 1.7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.25);
    position: relative;
    outline: none;
    border: 1px solid rgba(99, 102, 241, 0.35);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.toggle-input::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0.35rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background: #fff;
    transform: translate(0, -50%);
    box-shadow: 0 10px 18px rgba(5, 11, 26, 0.4);
    transition: transform var(--transition);
}

.toggle-input:checked {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
}

.toggle-input:checked::after {
    transform: translate(1.55rem, -50%);
}

.toggle-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.toggle-title {
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.range-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    color: var(--text-muted);
}

.range-slider {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}


.range-slider-range {
    width: 100%;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.25);
    outline: none;
}

.range-slider-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border: none;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
    cursor: pointer;
}

.range-slider-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border: none;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
    cursor: pointer;
}

.range-slider-output {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--accent-strong);
}

.range-slider-unit {
    color: var(--text-muted);
    font-weight: 500;
}

.nested-card {
    background: rgba(5, 11, 26, 0.75);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.token-field {
    position: relative;
}

.token-input {
    display: flex;
    gap: 0.6rem;
}

.token-toggle {
    border: none;
    border-radius: 16px;
    padding: 0.65rem 1.05rem;
    background: rgba(99, 102, 241, 0.18);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.token-toggle:hover {
    background: rgba(99, 102, 241, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(5, 11, 26, 0.4);
}

.twitch-connect {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.twitch-connect img {
    height: 44px;
}

.connect-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.95rem;
    background: rgba(5, 11, 26, 0.65);
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: var(--text-muted);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.connect-link:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.22);
    box-shadow: 0 16px 32px rgba(5, 11, 26, 0.35);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.button-primary {
    border: none;
    border-radius: 18px;
    padding: 1.1rem 1.6rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 25px 45px rgba(59, 130, 246, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 55px rgba(59, 130, 246, 0.45);
}

.button-primary:active {
    transform: translateY(0);
}

.button-secondary {
    border-radius: 20px;
    padding: 1.05rem 1.5rem;
    background: rgba(5, 11, 26, 0.65);
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid rgba(99, 102, 241, 0.25);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition),
        border-color var(--transition);
}

.button-secondary:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.28);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 18px 36px rgba(5, 11, 26, 0.4);
}


.overlay-output {
    background: rgba(5, 11, 26, 0.78);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-muted);
    box-shadow: 0 24px 50px rgba(5, 11, 26, 0.45);
}

.overlay-output a {
    word-break: break-all;
    color: #fff;
    font-weight: 600;
}

.overlay-output span {
    color: var(--warning);
    font-size: 0.9rem;
}

.hide {
    display: none !important;
}

@media (min-width: 980px) {
    .hero {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

@media (max-width: 900px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }

    .button-ghost {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 2rem;
    }

    .hero {
        padding: 2rem;
    }

    .settings-section {
        padding: 1.4rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        width: 100%;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .builder-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .toggle {
        flex-direction: column;
        align-items: flex-start;
    }

    .toggle-input {
        width: 100%;
        max-width: 3.2rem;
    }

    .token-input {
        flex-direction: column;
    }

    .token-toggle {
        width: fit-content;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }
}
