:root {
    /* Colors - improved contrast */
    --color-bg: #000;
    --color-text: #fff;
    --color-text-muted: #999;
    --color-text-secondary: #d0d0d0;
    --color-accent: #6af;
    --color-accent-hover: #8cf;
    --color-border: #333;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-surface-hover: rgba(255, 255, 255, 0.08);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;

    /* Typography */
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.75rem;
    --font-size-2xl: 2.5rem;
    --font-size-3xl: 3rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(102, 170, 255, 0.15);
}

/* Light theme */
html[data-theme="light"],
:root[data-theme="light"] {
    --color-bg: #fff;
    --color-text: #111;
    --color-text-muted: #666;
    --color-text-secondary: #444;
    --color-accent: #0066cc;
    --color-accent-hover: #0052a3;
    --color-border: #ddd;
    --color-surface: rgba(0, 0, 0, 0.03);
    --color-surface-hover: rgba(0, 0, 0, 0.06);

    /* Shadows - lighter for light mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.1);
}

/* Light theme element overrides */
[data-theme="light"] header .logo img {
    filter: invert(1);
}

[data-theme="light"] header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .slide-text p {
    color: var(--color-text-secondary);
}

[data-theme="light"] .carousel-btn {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text);
}

[data-theme="light"] .carousel-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .carousel-dots .dot {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .carousel-dots .dot:hover {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .carousel-dots .dot.active {
    background: var(--color-text);
}

[data-theme="light"] .prose h2,
[data-theme="light"] .prose h3,
[data-theme="light"] .prose strong {
    color: var(--color-text);
}

[data-theme="light"] .prose p,
[data-theme="light"] .prose ul,
[data-theme="light"] .prose ol,
[data-theme="light"] .prose li {
    color: var(--color-text-secondary);
}

[data-theme="light"] .prose a:hover {
    color: var(--color-accent-hover);
}

[data-theme="light"] .prose code {
    color: #d14;
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .info-section p,
[data-theme="light"] .info-section a {
    color: var(--color-text-secondary);
}

[data-theme="light"] .btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

[data-theme="light"] .intro-overlay {
    background: var(--color-bg);
}

[data-theme="light"] .terminal-cursor {
    background: var(--color-accent);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Better focus visibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

html {
    height: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-bg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

header.scrolled {
    border-bottom-color: var(--color-border);
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

#content {
    padding-top: 5rem;
}

header .logo img {
    height: 2rem;
    display: block;
    transition: opacity var(--transition-fast);
}

header .logo:hover img {
    opacity: 0.8;
}

header nav {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

header nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    position: relative;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}

header nav a:hover {
    color: var(--color-accent);
}

header nav a:hover::after {
    width: 100%;
}

/* Get Cogitae as accent button in nav */
header nav a.nav-cta {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

header nav a.nav-cta::after {
    display: none;
}

header nav a.nav-cta:hover {
    background: var(--color-accent-hover);
    color: var(--color-bg);
}

header nav .nav-divider {
    color: var(--color-border);
    font-weight: 300;
}

/* Theme toggles */
.theme-toggles {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* Mobile hamburger menu - hidden on desktop */
.mobile-menu-toggle {
    display: none !important;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
}

.mobile-menu-toggle:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
    }

    header nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
    }

    header nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    header nav a {
        padding: var(--space-sm);
        font-size: var(--font-size-base);
        text-align: center;
    }

    header nav a.nav-cta {
        width: 100%;
        text-align: center;
        padding: var(--space-sm);
    }

    .theme-toggles {
        justify-content: center;
        padding-top: var(--space-sm);
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-xs);
    }
}

footer {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: var(--space-lg) var(--space-md);
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.footer-company {
    flex: 1;
    min-width: 200px;
}

.footer-company h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.footer-company p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-contact {
    text-align: right;
    min-width: 200px;
}

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

.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-contact p {
    margin-bottom: var(--space-xs);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-md) auto 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

footer a {
    color: var(--color-text-muted);
}

/* Title Banner */
.title {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: var(--space-sm) var(--space-md) 0;
    max-width: 1200px;
    margin: 0 auto;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.subtitle {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: 0 var(--space-md) var(--space-sm);
    max-width: 1200px;
    margin: 0 auto;
    letter-spacing: 0.05em;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.product-hunt-badge {
    display: inline-block;
    margin-top: var(--space-sm);
}

.product-hunt-badge img {
    height: 40px;
    width: auto;
}

/* Ember Image Container */
.ember-image-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.ember-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Carousel */
.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.carousel {
    position: relative;
}

.carousel-slide {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 4rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.carousel-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.slide-text {
    flex: 1;
    min-width: 250px;
}

.slide-text h2 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.slide-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
}

.slide-image {
    flex: 2;
    min-height: 0;
}

.slide-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-dots {
    text-align: center;
    margin-top: 1.5rem;
}

.carousel-dots .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.carousel-dots .dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Homepage */
.hero {
    text-align: center;
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    height: 5rem;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}

.tagline {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xs);
}

.tagline-sub {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    font-weight: 400;
}

.featured-product {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.featured-product.reverse {
    flex-direction: row-reverse;
}

.product-info {
    flex: 1;
    padding: var(--space-md);
}

.product-info h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.product-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.product-info .btn-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.product-image {
    flex: 2;
}

.product-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn {
    display: inline-block;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    letter-spacing: 0.01em;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-text);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: transparent;
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-text-muted);
    transform: translateY(-2px);
}

/* Documentation layout */
.doc-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.doc-toc {
    width: 250px;
    flex-shrink: 0;
    padding: var(--space-md) 0 var(--space-md) var(--space-md);
}

.doc-toc nav {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: var(--space-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.doc-toc nav::-webkit-scrollbar {
    width: 4px;
}

.doc-toc nav::-webkit-scrollbar-track {
    background: transparent;
}

.doc-toc nav::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.doc-toc h2 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.doc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-toc li {
    margin-bottom: 0.35rem;
}

.doc-toc a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: block;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.doc-toc a:hover {
    color: var(--color-text);
    background: var(--color-surface);
    border-left-color: var(--color-text-muted);
}

.doc-toc a.active {
    color: var(--color-accent);
    background: var(--color-surface);
    border-left-color: var(--color-accent);
    font-weight: 500;
}

.doc-toc ul ul {
    padding-left: 0.75rem;
    margin-top: 0.25rem;
    border-left: 1px solid var(--color-border);
    margin-left: 0.75rem;
}

.doc-toc ul ul a {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Prose/Article styles */
.prose {
    flex: 1;
    min-width: 0;
    max-width: 720px;
    padding: 2rem;
    line-height: 1.8;
    overflow: hidden;
}

@media (max-width: 900px) {
    .doc-layout {
        flex-direction: column;
    }

    .doc-toc {
        width: 100%;
        padding: 1rem 2rem;
    }

    .doc-toc nav {
        position: static;
        max-height: none;
    }
}

.prose h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.prose h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.prose h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #ddd;
}

.prose p {
    margin-bottom: 1.25rem;
    color: #ccc;
}

.prose strong {
    color: #fff;
    font-weight: 600;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: #ccc;
}

.prose li {
    margin-bottom: 0.5rem;
}

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

.prose a:hover {
    text-decoration: underline;
    color: #8cf;
}

.prose img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
    box-sizing: border-box;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: zoom-in;
}

.prose img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin: var(--space-lg) 0;
}

/* Prose tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    font-size: var(--font-size-sm);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.prose thead {
    background: rgba(255, 255, 255, 0.08);
}

.prose th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.prose td {
    padding: 0.75rem 1rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.prose tr:last-child td {
    border-bottom: none;
}

.prose tbody tr {
    transition: background var(--transition-fast);
}

.prose tbody tr:hover {
    background: var(--color-surface-hover);
}

/* Prose code (inline) */
.prose code {
    background: var(--color-surface);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: #e6db74;
    border: 1px solid var(--color-border);
}

/* Prose code blocks */
.prose pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    overflow-x: auto;
    margin: var(--space-md) 0;
}

.prose pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--color-text-secondary);
}

/* Document meta (last updated) */
.doc-meta {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-style: italic;
}

/* Reading progress indicator */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--color-accent), #8cf);
    z-index: 1001;
    transition: width 0.1s linear;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 100;
}

.back-to-top:hover {
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Info sections */
.info-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
}

.info-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.info-section p {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
}

.info-section a {
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero {
        padding: var(--space-lg) var(--space-sm) var(--space-md);
    }

    .hero-logo {
        height: 4rem;
    }

    .tagline {
        font-size: var(--font-size-lg);
    }

    .carousel-slide {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1.5rem;
        min-height: 0;
    }

    .slide-text {
        min-width: 0;
        order: 2;
    }

    .slide-image {
        order: 1;
        flex: none;
        width: 100%;
        min-height: 0;
    }

    .slide-image img {
        max-width: 100%;
    }

    .carousel-btn {
        display: none;
    }

    .featured-product {
        flex-direction: column;
        padding: var(--space-sm);
        gap: var(--space-md);
        margin: 0 var(--space-sm);
    }

    .product-info {
        padding: var(--space-sm);
    }

    .product-info h2 {
        font-size: var(--font-size-xl);
    }

    .product-info .btn-group {
        flex-direction: column;
    }

    .product-image {
        flex: none;
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .footer-contact {
        text-align: center;
    }

    header nav {
        gap: var(--space-sm);
    }
}

/* Get Cogitae Page */
.get-cogitae-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.get-cogitae-cards {
    display: flex;
    gap: var(--space-md);
    align-items: stretch;
}

.get-cogitae-cards .get-cogitae-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.get-cogitae-hero {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.get-cogitae-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.get-cogitae-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.get-cogitae-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.get-cogitae-header {
    text-align: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.get-cogitae-header h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.price {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-text);
}

.price-loading {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    font-weight: 400;
}

.price-error {
    font-size: var(--font-size-base);
    color: #f66;
    font-weight: 400;
}

.price-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.get-cogitae-features {
    margin-bottom: var(--space-md);
}

.get-cogitae-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.get-cogitae-features li {
    padding: var(--space-xs) 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-secondary);
}

.get-cogitae-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #6f6;
    font-weight: bold;
}

.get-cogitae-form {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.get-cogitae-form .btn-large {
    margin-top: auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
}

/* Verification code input - separate boxes */
.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.code-inputs input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    caret-color: var(--color-accent);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.code-inputs input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
}

.code-inputs input:not(:placeholder-shown) {
    border-color: var(--color-text-muted);
}

.form-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: #8cf;
    border-color: #8cf;
    color: var(--color-bg);
}

.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.promo-hint {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

.error-message {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #f88;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
}

.success-message {
    background: rgba(100, 255, 100, 0.1);
    border: 1px solid rgba(100, 255, 100, 0.3);
    color: #6f6;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    text-align: center;
    line-height: 1.6;
}

.success-message .btn {
    margin-top: var(--space-sm);
}

.get-cogitae-faq {
    margin-top: var(--space-xl);
}

.get-cogitae-faq h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.faq-item {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.faq-item p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Message Pages (Success/Cancel) */
.message-page {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
}

.message-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    line-height: 1;
}

.success-page .message-icon {
    color: #6f6;
}

.cancel-page .message-icon {
    color: #f66;
}

.message-page h1 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.message-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.message-content {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.message-content h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.message-content ol {
    padding-left: 1.5rem;
    margin: 0;
    color: var(--color-text-secondary);
}

.message-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.message-content p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.message-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

.message-note a {
    color: var(--color-accent);
    text-decoration: none;
}

.message-note a:hover {
    text-decoration: underline;
}

.message-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Success Page Download Section */
.success-download-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.success-download-card {
    text-align: center;
    padding: var(--space-md) 0;
}

.success-download-card .download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-lg);
}

.success-download-card .download-icon-svg {
    flex-shrink: 0;
}

.download-meta-info {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.download-meta-info .meta-separator {
    margin: 0 var(--space-xs);
}

.success-next-steps {
    margin-top: var(--space-md);
}

@media (max-width: 768px) {
    .get-cogitae-page {
        padding: var(--space-md) var(--space-sm);
    }

    .get-cogitae-cards {
        flex-direction: column;
    }

    .get-cogitae-hero h1 {
        font-size: var(--font-size-2xl);
    }

    .get-cogitae-card {
        padding: var(--space-md);
    }

    .price {
        font-size: var(--font-size-2xl);
    }

    .message-page {
        padding: var(--space-lg) var(--space-sm);
    }

    .message-actions {
        flex-direction: column;
    }

    .message-actions .btn {
        width: 100%;
    }
}

/* Download Page */
.download-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.download-hero {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.download-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.download-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.download-main {
    margin-bottom: var(--space-xl);
}

.download-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.download-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.version-badge {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.meta-separator {
    color: var(--color-border);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: auto;
    min-width: 240px;
    max-width: 320px;
    font-size: var(--font-size-lg);
    padding: 1rem 2rem;
}

.download-icon-svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    max-width: 22px;
    flex-shrink: 0;
}

.download-details {
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.download-details span:not(:empty) {
    margin-right: var(--space-xs);
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.download-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.download-section h2 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li {
    padding: var(--space-xs) 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.requirements-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #6f6;
    font-weight: bold;
}

.release-notes {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.release-notes h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.release-notes h3:first-child {
    margin-top: 0;
}

.release-notes h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.release-notes p {
    margin-bottom: var(--space-sm);
}

.release-notes p:last-child {
    margin-bottom: 0;
}

.release-notes ul {
    padding-left: 1.25rem;
    margin-bottom: var(--space-sm);
}

.release-notes li {
    margin-bottom: var(--space-xs);
}

.error-text {
    color: #f66;
}

.download-cta {
    text-align: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.download-cta p {
    color: var(--color-text-muted);
    margin: 0;
}

.download-cta .btn-secondary {
    background: var(--color-surface-hover);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.download-cta .btn-secondary:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

@media (max-width: 768px) {
    .download-page {
        padding: var(--space-lg) var(--space-sm);
    }

    .download-hero h1 {
        font-size: var(--font-size-2xl);
    }

    .download-card {
        padding: var(--space-lg) var(--space-md);
    }

    .download-btn {
        width: 100%;
        max-width: none;
    }

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

    .download-cta {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-surface) 25%,
        var(--color-surface-hover) 50%,
        var(--color-surface) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    width: 80%;
    display: inline-block;
}

.skeleton-text-sm {
    height: 0.875em;
    width: 60%;
    display: inline-block;
}

.skeleton-price {
    height: 2.5rem;
    width: 5rem;
    display: inline-block;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Form Step Transitions */
.verification-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.verification-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Button micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::after {
    transform: translateX(100%);
}

.btn:active {
    transform: scale(0.98);
}

/* Card hover effects with gradient border */
.get-cogitae-card,
.download-card,
.download-section {
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.get-cogitae-card:hover,
.download-card:hover,
.download-section:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-glow);
}

/* Social links in footer */
.footer-social {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-bottom: var(--space-sm);
}

.footer-social a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-social a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* Documentation search */
.doc-search {
    margin-bottom: var(--space-sm);
}

.doc-search input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2rem;
    font-size: var(--font-size-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.doc-search input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
}

.doc-search input::placeholder {
    color: var(--color-text-muted);
}

.doc-search-wrapper {
    position: relative;
}

.doc-search-wrapper::before {
    content: "⌕";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    pointer-events: none;
}

/* Collapsible TOC sections */
.doc-toc .toc-section {
    margin-bottom: var(--space-xs);
}

.doc-toc .toc-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.35rem 0.75rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast);
    border-radius: var(--radius-sm);
    text-align: left;
}

.doc-toc .toc-section-toggle:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

.doc-toc .toc-section-toggle .chevron {
    transition: transform var(--transition-fast);
}

.doc-toc .toc-section.collapsed .chevron {
    transform: rotate(-90deg);
}

.doc-toc .toc-section.collapsed ul {
    display: none;
}

/* Read time indicator */
.read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.read-time::before {
    content: "⏱";
}

/* Step indicator improvements */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.step-indicator .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.5;
    transition: opacity var(--transition-base);
}

.step-indicator .step.active,
.step-indicator .step.completed {
    opacity: 1;
}

.step-indicator .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
}

.step-indicator .step.active .step-dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg);
}

.step-indicator .step.completed .step-dot {
    background: #6f6;
    border-color: #6f6;
    color: var(--color-bg);
}

.step-indicator .step.completed .step-dot::after {
    content: "✓";
}

.step-indicator .step-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.step-indicator .step.active .step-label {
    color: var(--color-text);
}

.step-indicator .step-line {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin: 0 var(--space-sm);
    max-width: 60px;
    transition: background var(--transition-base);
}

.step-indicator .step-line.completed {
    background: #6f6;
}

/* Trial Summary */
.trial-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
}

.trial-summary p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.trial-summary p:last-child {
    margin-bottom: 0;
}

.trial-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted) !important;
}

/* License Key Display */
.license-key-display {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    text-align: center;
}

.license-key-label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.license-key {
    display: block;
    font-size: var(--font-size-lg);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    color: var(--color-accent);
    background: none;
    border: none;
    padding: var(--space-sm) 0;
    letter-spacing: 0.05em;
    word-break: break-all;
}

.btn-copy {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: var(--space-xs);
}

.btn-copy:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

.license-key-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    margin-bottom: 0;
}

/* Flow Selector (Trial/Purchase options) */
.flow-selector {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.flow-option {
    display: block;
    cursor: pointer;
}

.flow-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.flow-option-content {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-fast);
}

.flow-option input[type="radio"]:checked + .flow-option-content {
    border-color: var(--color-accent);
    background: rgba(102, 170, 255, 0.05);
}

.flow-option:hover .flow-option-content {
    border-color: var(--color-text-muted);
}

.flow-option input[type="radio"]:checked + .flow-option-content:hover {
    border-color: var(--color-accent);
}

.flow-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.flow-option-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--color-text);
}

.flow-option-price {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-accent);
}

.flow-option-price s {
    color: var(--color-text-muted);
    font-weight: 500;
}

.promo-price {
    color: var(--color-accent);
}

.flow-option-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.flow-option-promo {
    font-size: var(--font-size-sm);
    color: var(--color-accent);
    margin: 0.5rem 0 0;
    font-weight: 500;
}

/* Verified Email Display */
.verified-email {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.verified-label {
    font-size: var(--font-size-sm);
    color: #6f6;
    font-weight: 500;
}

.verified-value {
    font-size: var(--font-size-base);
    color: var(--color-text);
}

/* Purchase Summary */
.purchase-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.purchase-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Link Buttons */
.btn-link {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.back-link {
    display: block;
    margin-top: var(--space-md);
    text-align: center;
}

/* Step Content */
.step-content h2 {
    text-align: center;
    margin-bottom: var(--space-md);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.verification-info {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

/* License Loading State */
.license-loading {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
}

.license-loading p {
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.license-display {
    text-align: center;
}

/* ============================================
   INTRO ANIMATION
   ============================================ */

.intro-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-overlay.hidden {
    display: none;
}

/* Terminal typing area */
.intro-terminal {
    position: relative;
    width: 100%;
    max-width: 800px;
    min-height: 200px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.terminal-lines {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.terminal-line {
    opacity: 0;
    transform: translateY(10px);
    animation: terminalLineIn 0.3s ease-out forwards;
    margin-bottom: 0.5rem;
}

.terminal-line.scrolling-up {
    animation: terminalScrollUp 0.4s ease-out forwards;
}

@keyframes terminalLineIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes terminalScrollUp {
    to {
        opacity: 0.3;
        transform: translateY(-20px);
        font-size: 1rem;
    }
}

.terminal-cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.3em;
    background: var(--color-accent);
    animation: cursorBlink 0.8s infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-line .typing-text {
    color: var(--color-text);
}

.terminal-line .typed-char {
    opacity: 0;
    animation: charAppear 0.02s ease forwards;
}

@keyframes charAppear {
    to { opacity: 1; }
}

/* HUD Video */
.intro-hud {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    opacity: 0;
    transition: top 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.intro-hud.dropping {
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

.hud-video-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(102, 170, 255, 0.15);
}

.hud-video-container video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/* Skip button */
.intro-skip {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10001;
}

.intro-skip:hover {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* Main content initially hidden */
.main-content {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.main-content.visible {
    opacity: 1;
}

/* Replay button */
.replay-intro {
    position: fixed;
    bottom: var(--space-md);
    left: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.replay-intro.visible {
    opacity: 1;
    visibility: visible;
}

.replay-intro:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .intro-overlay,
    .intro-hud,
    .terminal-line,
    .hud-message,
    .main-content {
        animation: none !important;
        transition: none !important;
    }

    .terminal-cursor {
        animation: none;
        opacity: 1;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .intro-terminal {
        padding: var(--space-md);
    }

    .terminal-lines {
        font-size: 1rem;
    }

    .intro-hud {
        width: 95%;
    }

    .hud-message-user {
        margin-left: 1rem;
    }

    .hud-message-ai {
        margin-right: 1rem;
    }

    .intro-skip {
        bottom: var(--space-md);
        right: var(--space-md);
    }
}

/* Recover License Card (Support Page) */
.recover-license-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-md) 0;
    max-width: 500px;
}

.recover-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.recover-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.3s ease-out;
}

.recover-info {
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}

/* Plugins Page */
.plugins-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.plugins-hero {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.plugins-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.plugins-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.plugins-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.plugin-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.plugin-card:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-glow);
}

.plugin-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.plugin-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.plugin-meta {
    flex: 1;
    min-width: 0;
}

.plugin-meta h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--space-xs);
    color: var(--color-text);
}

.plugin-domain {
    display: inline-block;
    font-size: var(--font-size-sm);
    color: var(--color-accent);
    background: rgba(102, 170, 255, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

.plugin-description {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.plugin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.plugins-cta {
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.plugins-cta h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.plugins-cta p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .plugins-page {
        padding: var(--space-md) var(--space-sm);
    }

    .plugins-hero h1 {
        font-size: var(--font-size-2xl);
    }

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