/* =============================================
   ROYSA - Enterprise Document AI
   Clean, Apple-inspired design system
   ============================================= */

/* CSS Custom Properties */
:root {
    /* Color Palette - Warm to Cool gradient inspired by logo */
    --color-primary: #0a0a0a;
    --color-secondary: #1a1a1a;
    --color-accent-warm: #ff6b4a;
    --color-accent-mid: #48c774;
    --color-accent-cool: #3b82f6;
    --color-accent-teal: #14b8a6;
    
    /* Grays */
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;
    
    /* Functional Colors */
    --color-text: #0a0a0a;
    --color-text-secondary: #525252;
    --color-text-muted: #737373;
    --color-background: #ffffff;
    --color-surface: #fafafa;
    --color-border: #e5e5e5;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #ff6b4a 0%, #f59e0b 25%, #48c774 50%, #14b8a6 75%, #3b82f6 100%);
    --gradient-subtle: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #171717 100%);
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* Font loading - prevent layout shift during font loading */
.fonts-loading body {
    visibility: hidden;
}

.fonts-loaded body {
    visibility: visible;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    color: var(--color-text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 62px;
    width: auto;
}

/* API Button after logo */
.nav-api-btn {
    margin-left: var(--space-sm);
    padding: 8px 16px !important;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !important;
    color: white !important;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

.nav-api-btn:hover {
    background: linear-gradient(135deg, #0052a3 0%, #004080 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.35);
}

.nav-api-btn.active {
    background: linear-gradient(135deg, #004080 0%, #003366 100%) !important;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

/* Hide mobile-only items on desktop */
.nav-menu .mobile-only {
    display: none;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 450;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link.cta-button {
    background: var(--color-primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

/* Extra spacing before CTA buttons after sign-in */
.nav-link.auth-link + .nav-link.cta-button {
    margin-left: 0.75rem;
}

/* Spacing between multiple CTA buttons */
.nav-link.cta-button + .nav-link.cta-button {
    margin-left: 0.5rem;
}

.nav-link.cta-button:hover {
    background: var(--color-gray-800);
    transform: translateY(-1px);
}

.nav-link.cta-button.active {
    background: var(--color-primary);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition-fast);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-300);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 107, 74, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(59, 130, 246, 0.06), transparent),
        linear-gradient(180deg, var(--color-background) 0%, var(--color-surface) 100%);
    z-index: -1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
}

.title-line.accent {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    font-weight: 400;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.doc-animation {
    position: relative;
    width: 320px;
    perspective: 1000px;
}

.doc-page {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-xl);
    transform: rotateY(-5deg) rotateX(5deg);
    animation: docFloat 6s ease-in-out infinite;
}

@keyframes docFloat {
    0%, 100% { transform: rotateY(-5deg) rotateX(5deg) translateY(0); }
    50% { transform: rotateY(-3deg) rotateX(3deg) translateY(-10px); }
}

.doc-line {
    height: 12px;
    background: var(--color-gray-200);
    border-radius: 6px;
    margin-bottom: var(--space-md);
}

.doc-line.short {
    width: 60%;
}

.doc-highlight {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
    animation: highlightPulse 3s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Paper-style Document Demo */
.doc-page.paper-style {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    font-family: 'Times New Roman', Georgia, serif;
}

/* Document text styling */
.doc-text {
    font-size: 0.75rem;
    color: var(--color-text);
    line-height: 1.5;
    margin: 0;
}

.doc-text.dimmed {
    color: var(--color-gray-500);
}

/* Annotated regions with highlight effect */
.annotated-region {
    position: relative;
    padding: 8px 12px;
    border-radius: 4px;
    border-width: 2px;
    border-style: solid;
    border-color: #cccccc;
    background-color: transparent;
    display: inline-block;
    width: fit-content;
}

.annotated-region.inline {
    display: inline-flex !important;
    align-items: center;
    padding: 4px 8px;
}

/* Region labels - positioned like annotation tags */
.region-label {
    position: absolute;
    top: -10px;
    left: 8px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    background-color: #666666;
    color: #ffffff;
    display: inline-block;
}

.annotated-region.inline .region-label {
    position: static;
    margin-right: 8px;
}

/* Blue annotation (Title) */
.annotated-region.blue {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.08) !important;
}

.annotated-region.blue .region-label {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Orange annotation (First Author) */
.annotated-region.orange {
    border-color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.1) !important;
}

.annotated-region.orange .region-label {
    background-color: #f59e0b !important;
    color: #ffffff !important;
}

/* Pink annotation (Contributions) */
.annotated-region.pink {
    border-color: #ec4899 !important;
    background-color: rgba(236, 72, 153, 0.08) !important;
}

.annotated-region.pink .region-label {
    background-color: #ec4899 !important;
    color: #ffffff !important;
}

/* Authors line */
.doc-authors-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Body text (non-annotated) */
.doc-body-text {
    padding: 4px 0;
}

.doc-body-text .doc-text {
    color: var(--color-gray-500);
    font-size: 0.65rem;
}

/* Extraction Table */
.extraction-table {
    background: var(--color-gray-800);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
}

.extraction-header {
    display: grid;
    grid-template-columns: 110px 1fr 60px;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-gray-700);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extraction-row {
    display: grid;
    grid-template-columns: 110px 1fr 60px;
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-gray-700);
    align-items: center;
}

.ext-key {
    font-size: 0.7rem;
    font-weight: 600;
}

.ext-key.blue { color: #3b82f6; }
.ext-key.orange { color: #f59e0b; }
.ext-key.pink { color: #ec4899; }

.ext-value {
    font-size: 0.8rem;
    color: var(--color-gray-300);
}

.ext-conf {
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
    text-align: right;
}

/* =============================================
   FEATURES SECTION
   ============================================= */
.features {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* =============================================
   PRODUCT HIGHLIGHT
   ============================================= */
.product-highlight {
    padding: var(--space-4xl) 0;
    background: var(--gradient-dark);
    color: white;
}

.product-highlight .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.product-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-teal);
    margin-bottom: var(--space-md);
}

.product-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-sm);
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-tagline {
    font-size: 1.25rem;
    color: var(--color-gray-400);
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.product-description {
    font-size: 1.125rem;
    color: var(--color-gray-300);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

.product-highlight .btn-primary {
    background: white;
    color: var(--color-primary);
}

.product-highlight .btn-primary:hover {
    background: var(--color-gray-100);
}

/* Trace Demo */
.trace-demo {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.trace-input,
.trace-output {
    background: var(--color-gray-800);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.trace-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray-500);
    margin-bottom: var(--space-md);
}

.trace-doc {
    width: 120px;
    height: 160px;
    background: var(--color-gray-700);
    border-radius: var(--radius-md);
}

.trace-arrow {
    color: var(--color-gray-600);
}

.trace-arrow svg {
    width: 32px;
    height: 32px;
}

.trace-result {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.result-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-gray-700);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.result-key {
    font-weight: 600;
    color: var(--color-accent-teal);
    min-width: 100px;
    font-size: 0.75rem;
}

.result-key.blue {
    color: #3b82f6;
}

.result-key.orange {
    color: #f59e0b;
}

.result-key.pink {
    color: #ec4899;
}

.result-value {
    color: white;
    flex: 1;
}

.result-conf {
    color: var(--color-accent-mid);
    font-weight: 500;
}

/* =============================================
   AUDIENCE SECTION
   ============================================= */
.audience {
    padding: var(--space-4xl) 0;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.audience-card {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.audience-card:hover {
    border-color: var(--color-gray-300);
    box-shadow: var(--shadow-md);
}

.audience-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.audience-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.audience-card p {
    font-size: 0.875rem;
}

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section {
    padding: var(--space-4xl) 0;
    text-align: center;
    background: var(--color-surface);
}

.cta-section h2 {
    margin-bottom: var(--space-md);
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: var(--space-2xl);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding: var(--space-4xl) 0 var(--space-xl);
    background: var(--color-primary);
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    height: 52px;
    margin-bottom: var(--space-md);
}

.footer-brand p {
    color: var(--color-gray-400);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: var(--space-4xl);
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray-400);
    margin-bottom: var(--space-lg);
}

.footer-col a {
    display: block;
    color: var(--color-gray-300);
    font-size: 0.9375rem;
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-gray-800);
}

.footer-bottom p {
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

/* =============================================
   PAGE HERO
   ============================================= */
.page-hero {
    padding: 160px 0 80px;
    background: var(--gradient-subtle);
    text-align: center;
}

.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-hero h1 {
    margin-bottom: var(--space-md);
}

.page-subtitle {
    font-size: 1.375rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.page-description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

/* =============================================
   INTERACTIVE SHOWCASE (Cursor-inspired)
   ============================================= */
.interactive-showcase {
    padding: var(--space-3xl) 0 var(--space-4xl);
    background: var(--color-gray-50);
    overflow: hidden;
    position: relative;
}

.showcase-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
}

.showcase-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    text-align: center;
}

.showcase-text {
    position: relative;
    z-index: 10;
}

.showcase-label {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.1) 0%, rgba(72, 199, 116, 0.1) 100%);
    color: var(--color-accent-warm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.showcase-text h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.showcase-text h2 em {
    font-style: italic;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.showcase-text p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.showcase-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    background: var(--color-primary);
    color: white;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.showcase-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.showcase-cta svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.showcase-cta:hover svg {
    transform: translateX(4px);
}

/* Scenic Background Scene */
.showcase-scene {
    position: relative;
    min-height: 500px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.scene-backdrop {
    position: absolute;
    inset: 0;
    /* Painted landscape gradient inspired by Cursor */
    background: 
        linear-gradient(180deg, 
            #e8dfd0 0%, 
            #d4c8b8 15%,
            #c2b6a4 30%,
            #a8b5a0 50%,
            #8ca88a 65%,
            #6b9a78 80%,
            #5a8868 100%
        );
    border-radius: var(--radius-xl);
}

.scene-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 120% 60% at 20% 30%, rgba(255, 200, 150, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 100% 50% at 80% 70%, rgba(100, 150, 100, 0.2) 0%, transparent 50%);
    border-radius: var(--radius-xl);
}

.scene-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Subtle noise texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: overlay;
    border-radius: var(--radius-xl);
}

/* Floating Demo Windows */
.demo-window {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.main-window {
    top: 40px;
    left: 30px;
    width: 520px;
    z-index: 2;
    animation: floatIn 0.8s ease-out both;
}

.results-window {
    top: 140px;
    right: 20px;
    width: 320px;
    z-index: 3;
    animation: floatIn 0.8s ease-out 0.3s both;
}

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

/* Window Chrome (macOS style) */
.window-chrome {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
    border-bottom: 1px solid #e0e0e0;
}

.window-dots {
    display: flex;
    gap: 8px;
}

.window-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c940; }

.window-title {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.window-actions {
    width: 52px; /* Balance the dots */
}

/* Demo Window Content */
.window-content {
    display: flex;
    min-height: 320px;
}

.demo-sidebar {
    width: 180px;
    background: #fafafa;
    border-right: 1px solid #eee;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
}

.section-title-demo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title-demo svg {
    width: 12px;
    height: 12px;
}

.demo-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.demo-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.7rem;
    transition: all var(--transition-fast);
}

/* Field colors matching annotation boxes */
.demo-field.active.color-grantor {
    border-color: #ff6b4a;
    background: rgba(255, 107, 74, 0.08);
}

.demo-field.active.color-grantor .field-status.extracted {
    color: #ff6b4a;
}

.demo-field.active.color-grantee {
    border-color: #48c774;
    background: rgba(72, 199, 116, 0.08);
}

.demo-field.active.color-grantee .field-status.extracted {
    color: #48c774;
}

.demo-field.active.color-date {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.demo-field.active.color-date .field-status.extracted {
    color: #3b82f6;
}

.demo-field.processing {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.08);
}

.field-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text);
}

.field-status {
    display: flex;
    align-items: center;
}

.field-status.extracted {
    color: #48c774;
    font-weight: 600;
}

/* Mini Spinner */
.spinner-mini {
    width: 12px;
    height: 12px;
    border: 2px solid #e5e5e5;
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.demo-run-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 12px;
}

.demo-run-btn svg {
    width: 12px;
    height: 12px;
}

/* Document Preview */
.demo-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border-bottom: 1px solid #eee;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.page-badge {
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.65rem;
}

.preview-doc {
    flex: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.doc-content {
    width: 100%;
    max-width: 240px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-title-fake {
    width: 60%;
    height: 14px;
    background: linear-gradient(90deg, #333 0%, #555 100%);
    border-radius: 2px;
    margin-bottom: 8px;
}

.doc-line {
    height: 6px;
    background: #e0e0e0;
    border-radius: 2px;
}

.doc-line.short {
    width: 70%;
}

/* Extraction Boxes on Document */
.extraction-box {
    position: relative;
    padding: 6px 8px;
    border: 2px solid;
    border-radius: 4px;
    margin: 4px 0;
    animation: pulse-box 2s ease-in-out infinite;
}

.box-grantor {
    border-color: #ff6b4a;
    background: rgba(255, 107, 74, 0.1);
}

.box-grantee {
    border-color: #48c774;
    background: rgba(72, 199, 116, 0.1);
}

.box-date {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

@keyframes pulse-box {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.box-label {
    position: absolute;
    top: -8px;
    left: 6px;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.box-grantor .box-label {
    background: #ff6b4a;
    color: white;
}

.box-grantee .box-label {
    background: #48c774;
    color: white;
}

.box-date .box-label {
    background: #3b82f6;
    color: white;
}

/* Results Window Content */
.results-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
}

.results-window .result-item {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px 12px;
    animation: slideIn 0.4s ease-out both;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.result-item:nth-child(1) { animation-delay: 0.5s; }
.result-item:nth-child(2) { animation-delay: 0.7s; }
.result-item:nth-child(3) { animation-delay: 0.9s; }
.result-item:nth-child(4) { animation-delay: 1.1s; }

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

/* Showcase Demo Result Styles (more specific to avoid conflicts) */
.results-window .result-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.results-window .result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #48c774;
    margin-bottom: 2px;
    background: transparent !important;
    border-left: none !important;
    padding: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Result item colors matching annotation boxes */
.results-window .result-item.color-grantor .result-value {
    color: #ff6b4a;
}

.results-window .result-item.color-grantor .confidence.high {
    background: rgba(255, 107, 74, 0.15);
    color: #d4472a;
}

.results-window .result-item.color-grantee .result-value {
    color: #48c774;
}

.results-window .result-item.color-grantee .confidence.high {
    background: rgba(72, 199, 116, 0.15);
    color: #2d8a4e;
}

.results-window .result-item.color-date .result-value {
    color: #3b82f6;
}

.results-window .result-item.color-date .confidence.high {
    background: rgba(59, 130, 246, 0.15);
    color: #1d5bb8;
}

.results-window .result-item.color-address .result-value {
    color: #a855f7;
}

.results-window .result-item.color-address .confidence.high {
    background: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
}

/* Bounding Box Indicator for Product Page Results */
.result-bbox-indicator {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border: 2px solid #ccc;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    display: block;
}

.result-bbox-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: currentColor;
    opacity: 0.15;
    border-radius: 1px;
}

.result-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.results-window .result-item.color-grantor .result-bbox-indicator { 
    border-color: #ff6b4a; 
    color: #ff6b4a; 
}

.results-window .result-item.color-grantee .result-bbox-indicator { 
    border-color: #48c774; 
    color: #48c774; 
}

.results-window .result-item.color-date .result-bbox-indicator { 
    border-color: #3b82f6; 
    color: #3b82f6; 
}

.results-window .result-item.color-address .result-bbox-indicator { 
    border-color: #a855f7; 
    color: #a855f7; 
}

.results-window .result-meta {
    display: flex;
    gap: 8px;
}

.results-window .confidence {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.results-window .confidence.high {
    background: rgba(72, 199, 116, 0.15);
    color: #2d8a4e;
}

.results-window .page-ref {
    font-size: 0.6rem;
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 4px;
    color: var(--color-text-muted);
}

/* Typing Animation */
.results-window .result-item.typing .result-value {
    color: var(--color-text-muted);
}

.typing-animation {
    display: flex;
    align-items: center;
}

.typing-cursor {
    width: 2px;
    height: 14px;
    background: #a855f7;
    animation: blink 0.8s ease-in-out infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .showcase-scene {
        min-height: 450px;
    }
    
    .main-window {
        width: 420px;
        left: 20px;
    }
    
    .results-window {
        width: 240px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .interactive-showcase {
        padding: var(--space-2xl) 0 var(--space-3xl);
    }
    
    .showcase-scene {
        min-height: 380px;
    }
    
    .main-window {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: 20px;
    }
    
    .results-window {
        display: none;
    }
    
    .demo-sidebar {
        width: 140px;
        padding: 12px 8px;
    }
    
    .window-content {
        min-height: 280px;
    }
}

@media (max-width: 480px) {
    .showcase-text h2 {
        font-size: 1.75rem;
    }
    
    .demo-sidebar {
        width: 120px;
    }
    
    .field-name {
        font-size: 0.55rem;
    }
}

/* =============================================
   HOMEPAGE PLAYGROUND DEMO (Animated Step-by-Step)
   ============================================= */
.playground-demo-section {
    padding: var(--space-4xl) 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f6f3 50%, #f0ebe4 100%);
    overflow: hidden;
}


.demo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.demo-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.demo-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.demo-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.demo-header h2 em {
    font-style: italic;
    color: #3b82f6;
}

.demo-header p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* Step Indicators */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--space-2xl);
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.4s ease;
}

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

.step-indicator.completed {
    opacity: 0.7;
}

.step-number {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #d4d4d4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #737373;
    transition: all 0.4s ease;
}

.step-indicator.active .step-number {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.step-indicator.completed .step-number {
    background: #48c774;
    border-color: #48c774;
    color: white;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: #e5e5e5;
    margin: 0 var(--space-sm);
    margin-bottom: 24px;
    transition: background 0.4s ease;
}

.step-connector.filled {
    background: #48c774;
}

/* Demo Scene */
.demo-scene {
    position: relative;
    min-height: 480px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.scene-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, 
            #e8e0d5 0%,
            #d9cfc2 20%,
            #c4d4c0 40%,
            #a8c4a8 60%,
            #8fb89a 80%,
            #7aab8c 100%
        );
    border-radius: var(--radius-xl);
}

.scene-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 30% 20%, rgba(255, 220, 180, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 70% 80%, rgba(120, 180, 140, 0.2) 0%, transparent 40%);
    border-radius: var(--radius-xl);
}

/* Playground Window */
.playground-window {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 580px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 2;
}

.playground-content {
    display: flex;
    min-height: 380px;
}

/* Demo Fields Panel */
.demo-fields-panel {
    width: 180px;
    background: #fafafa;
    border-right: 1px solid #eee;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
}

.panel-title-small {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.panel-title-small svg {
    width: 12px;
    height: 12px;
}

.animated-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.anim-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.anim-field.visible {
    opacity: 1;
    transform: translateX(0);
}

.anim-field[data-color="grantor"].visible {
    border-color: #ff6b4a;
    background: rgba(255, 107, 74, 0.05);
}

.anim-field[data-color="grantee"].visible {
    border-color: #48c774;
    background: rgba(72, 199, 116, 0.05);
}

.anim-field[data-color="date"].visible {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.anim-field-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text);
}

.anim-field-check {
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anim-field.visible .anim-field-check {
    opacity: 1;
}

.anim-field[data-color="grantor"] .anim-field-check { color: #ff6b4a; }
.anim-field[data-color="grantee"] .anim-field-check { color: #48c774; }
.anim-field[data-color="date"] .anim-field-check { color: #3b82f6; }

/* Animated Run Button */
.anim-run-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: auto;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.anim-run-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.anim-run-btn svg {
    width: 14px;
    height: 14px;
}

.anim-run-btn.running .run-text {
    display: none;
}

.anim-run-btn.running .run-spinner {
    display: block;
}

.run-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Demo Document Panel */
.demo-doc-panel {
    flex: 1;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

/* Upload State */
.upload-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.upload-state.hidden {
    opacity: 0;
    pointer-events: none;
}

.upload-zone {
    text-align: center;
    padding: 40px;
    border: 2px dashed #d4d4d4;
    border-radius: 12px;
    margin: 20px;
    background: rgba(255,255,255,0.5);
    position: relative;
}

.upload-icon-anim {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #a3a3a3;
    animation: float 2s ease-in-out infinite;
}

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

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

/* File Dropping Animation */
.file-dropping {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.file-dropping.active {
    opacity: 1;
}

.dropping-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: dropIn 0.6s ease-out;
}

@keyframes dropIn {
    0% { transform: translateY(-60px) scale(0.8); opacity: 0; }
    60% { transform: translateY(5px) scale(1.02); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.dropping-file svg {
    width: 32px;
    height: 32px;
    color: #3b82f6;
}

.dropping-file span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

/* Document State */
.doc-state {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
}

.doc-state.visible {
    opacity: 1;
}

.doc-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border-bottom: 1px solid #eee;
}

.doc-filename {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
}

.doc-pages {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    color: var(--color-text-secondary);
}

.doc-preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mini-doc {
    width: 200px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-title {
    width: 60%;
    height: 12px;
    background: #333;
    border-radius: 2px;
}

.mini-line {
    height: 6px;
    background: #e0e0e0;
    border-radius: 2px;
}

.mini-line.short {
    width: 70%;
}

/* Mini Annotations */
.mini-annotation {
    position: relative;
    padding: 8px 10px;
    border: 2px solid;
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s ease;
}

.mini-annotation.visible {
    opacity: 1;
    transform: scale(1);
}

.mini-annotation.grantor {
    border-color: #ff6b4a;
    background: rgba(255, 107, 74, 0.1);
}

.mini-annotation.grantee {
    border-color: #48c774;
    background: rgba(72, 199, 116, 0.1);
}

.mini-annotation.date {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.mini-label {
    position: absolute;
    top: -8px;
    left: 6px;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    color: white;
    text-transform: uppercase;
}

.mini-annotation.grantor .mini-label { background: #ff6b4a; }
.mini-annotation.grantee .mini-label { background: #48c774; }
.mini-annotation.date .mini-label { background: #3b82f6; }

/* Results Panel Animation */
.results-panel-anim {
    position: absolute;
    top: 120px;
    right: 30px;
    width: 260px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 3;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
}

.results-panel-anim.visible {
    opacity: 1;
    transform: translateX(0);
}

.window-chrome.small {
    padding: 10px 14px;
}

.results-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
}

.result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.result-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 60px;
}

.result-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    flex: 1;
}

.result-row[data-color="grantor"] .result-val { color: #ff6b4a; }
.result-row[data-color="grantee"] .result-val { color: #48c774; }
.result-row[data-color="date"] .result-val { color: #3b82f6; }

/* Bounding Box Indicator for Results (Homepage) */
.result-bbox {
    width: 14px;
    height: 14px;
    border: 2px solid;
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.result-bbox::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: currentColor;
    opacity: 0.15;
    border-radius: 1px;
}

.result-row[data-color="grantor"] .result-bbox { border-color: #ff6b4a; color: #ff6b4a; }
.result-row[data-color="grantee"] .result-bbox { border-color: #48c774; color: #48c774; }
.result-row[data-color="date"] .result-bbox { border-color: #3b82f6; color: #3b82f6; }

.result-conf {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(72, 199, 116, 0.15);
    color: #2d8a4e;
}

/* Progress Bar */
.demo-progress {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    margin-bottom: var(--space-xl);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6 0%, #48c774 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Demo CTA */
.demo-cta {
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .playground-window {
        width: 480px;
    }
    
    .results-panel-anim {
        width: 220px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .playground-demo-section {
        padding: var(--space-2xl) 0;
    }
    
    .demo-scene {
        min-height: 400px;
    }
    
    .playground-window {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
    
    .results-panel-anim {
        display: none;
    }
    
    .step-indicators {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .step-connector {
        width: 30px;
    }
    
    .demo-fields-panel {
        width: 140px;
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .step-label {
        display: none;
    }
    
    .step-connector {
        width: 20px;
    }
    
    .demo-fields-panel {
        width: 120px;
    }
    
    .anim-field-name {
        font-size: 0.6rem;
    }
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-it-works {
    padding: var(--space-4xl) 0;
}

.steps-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 48px;
    right: 48px;
    height: 2px;
    background: var(--color-border);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
}

.step-content h3 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.step-content p {
    font-size: 0.875rem;
    max-width: 140px;
}

/* =============================================
   CAPABILITIES
   ============================================= */
.capabilities {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.capability-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.capability-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.capability-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-md);
    color: var(--color-accent-teal);
}

.capability-icon svg {
    width: 100%;
    height: 100%;
}

.capability-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.capability-card p {
    font-size: 0.875rem;
}

/* =============================================
   OUTPUT FORMAT
   ============================================= */
.output-format {
    padding: var(--space-4xl) 0;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-top: calc(var(--space-md) * -1);
    margin-bottom: var(--space-3xl);
}

.output-demo {
    max-width: 640px;
    margin: 0 auto;
}

.output-card {
    background: var(--color-gray-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.output-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-gray-800);
}

.output-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-gray-600);
}

.output-dot:nth-child(1) { background: #ff5f57; }
.output-dot:nth-child(2) { background: #febc2e; }
.output-dot:nth-child(3) { background: #28c840; }

.output-title {
    margin-left: var(--space-md);
    color: var(--color-gray-400);
    font-size: 0.875rem;
}

.output-code {
    padding: var(--space-lg);
    margin: 0;
    overflow-x: auto;
}

.output-code code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-gray-300);
}

/* =============================================
   USE CASES
   ============================================= */
.use-cases {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.use-case {
    padding: var(--space-xl);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.use-case h3 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.use-case p {
    font-size: 0.875rem;
}

/* =============================================
   WHY ROYSA PAGE
   ============================================= */
.problem-section {
    padding: var(--space-4xl) 0;
}

.problem-content {
    max-width: 800px;
    margin: 0 auto;
}

.problem-label,
.approach-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-warm);
    margin-bottom: var(--space-lg);
}

.problem-title,
.approach-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.4;
    margin-bottom: var(--space-lg);
}

.problem-description,
.approach-description {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.problem-issues {
    display: grid;
    gap: var(--space-md);
}

.issue {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
}

.issue-icon {
    color: var(--color-accent-warm);
    font-weight: 700;
}

/* Approach Section */
.approach-section {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.approach-content {
    max-width: 800px;
    margin: 0 auto;
}

.approach-label {
    color: var(--color-accent-teal);
}

/* Principles Section */
.principles-section {
    padding: var(--space-4xl) 0;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.principle-card {
    padding: var(--space-2xl);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

.principle-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-gray-300);
    margin-bottom: var(--space-md);
}

.principle-card h3 {
    margin-bottom: var(--space-sm);
}

/* Comparison Section */
.comparison-section {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.comparison-table {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-header,
.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.comparison-header {
    background: var(--color-gray-100);
    font-weight: 600;
}

.comparison-cell {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.comparison-cell.label {
    font-weight: 500;
    color: var(--color-text);
}

.comparison-cell.highlight {
    background: rgba(20, 184, 166, 0.05);
    color: var(--color-accent-teal);
    font-weight: 500;
}

.comparison-header .comparison-cell.highlight {
    background: var(--color-accent-teal);
    color: white;
}

/* =============================================
   TECHNOLOGY PAGE
   ============================================= */
.tech-section {
    padding: var(--space-4xl) 0;
}

.tech-section.alt {
    background: var(--color-surface);
}

.tech-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.tech-content.reverse {
    direction: rtl;
}

.tech-content.reverse > * {
    direction: ltr;
}

.tech-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-teal);
    margin-bottom: var(--space-md);
}

.tech-text h2 {
    margin-bottom: var(--space-lg);
}

.tech-text > p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.tech-features {
    list-style: none;
    display: grid;
    gap: var(--space-md);
}

.tech-features li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.check-icon {
    color: var(--color-accent-mid);
    font-weight: 700;
}

/* Tech Visuals */
.tech-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-diagram.multimodal {
    position: relative;
    width: 280px;
    height: 280px;
}

.diagram-layer {
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: layerFloat 4s ease-in-out infinite;
}

.diagram-layer.vision {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.diagram-layer.layout {
    bottom: 20px;
    left: 0;
    animation-delay: 0.5s;
}

.diagram-layer.text {
    bottom: 20px;
    right: 0;
    animation-delay: 1s;
}

@keyframes layerFloat {
    0%, 100% { transform: translateY(0) translateX(-50%); }
    50% { transform: translateY(-8px) translateX(-50%); }
}

.diagram-layer.layout,
.diagram-layer.text {
    animation-name: layerFloatSimple;
}

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

.layer-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.layer-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.diagram-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
}

/* Grounding Demo */
.grounding-demo {
    padding: var(--space-xl);
}

.ground-doc {
    position: relative;
    width: 240px;
    height: 320px;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
}

.ground-text {
    font-size: 0.75rem;
    color: var(--color-gray-400);
    margin-bottom: var(--space-lg);
}

.ground-box {
    position: absolute;
    border: 2px solid var(--color-accent-warm);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    animation: boxPulse 2s ease-in-out infinite;
}

.ground-box.box-1 {
    top: 60px;
    left: 20px;
    right: 60px;
}

.ground-box.box-2 {
    top: 140px;
    left: 40px;
    right: 40px;
    border-color: var(--color-accent-teal);
    animation-delay: 0.5s;
}

@keyframes boxPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.ground-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ground-box.box-1 .ground-label {
    color: var(--color-accent-warm);
}

.ground-box.box-2 .ground-label {
    color: var(--color-accent-teal);
}

.ground-line {
    height: 8px;
    background: var(--color-gray-200);
    border-radius: 4px;
    margin-top: var(--space-4xl);
    margin-bottom: var(--space-md);
}

.ground-line.short {
    width: 60%;
}

/* Verification Flow */
.verification-flow {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

.verify-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    min-width: 100px;
}

.verify-icon {
    font-size: 1.5rem;
}

.verify-step span:last-child {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.verify-arrow {
    color: var(--color-gray-400);
    font-size: 1.25rem;
}

/* Specs Section */
.specs-section {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.spec-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.spec-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.spec-card ul {
    list-style: none;
}

.spec-card li {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding: var(--space-sm) 0;
}

/* =============================================
   SECURITY PAGE
   ============================================= */
.security-overview {
    padding: var(--space-3xl) 0;
}

.security-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-text {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.security-features {
    padding: var(--space-3xl) 0 var(--space-4xl);
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.security-card {
    padding: var(--space-2xl);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

.security-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-lg);
    color: var(--color-accent-teal);
}

.security-icon svg {
    width: 100%;
    height: 100%;
}

.security-card h3 {
    margin-bottom: var(--space-md);
}

.security-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Deployment Section */
.deployment-section {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.deployment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.deployment-card {
    background: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--color-border);
}

.deployment-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.deployment-card h3 {
    margin-bottom: var(--space-sm);
}

.deployment-card p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

.deployment-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
}

.deployment-status.available {
    background: rgba(72, 199, 116, 0.1);
    color: var(--color-accent-mid);
}

.deployment-status.coming {
    background: var(--color-gray-100);
    color: var(--color-gray-500);
}

/* Compliance Section */
.compliance-section {
    padding: var(--space-4xl) 0;
}

.compliance-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.compliance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xl) var(--space-2xl);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

.compliance-badge {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.compliance-item span:last-child {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Security Contact */
.security-contact {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.security-contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.security-contact h2 {
    margin-bottom: var(--space-md);
}

.security-contact p {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
}

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-company {
    padding: var(--space-4xl) 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.about-text h2 {
    margin-bottom: var(--space-lg);
}

.mission-statement {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: var(--space-xl);
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.value-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

.value-icon {
    font-size: 1.5rem;
}

.value-text {
    font-weight: 500;
}

/* Founders Section */
.founders-section {
    padding: var(--space-4xl) 0;
    background: var(--color-surface);
}

.founders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 800px;
    margin: 0 auto;
}

.founder-card {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-2xl);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.founder-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.founder-info h3 {
    margin-bottom: var(--space-xs);
}

.founder-title {
    font-size: 0.875rem;
    color: var(--color-accent-teal);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.founder-bio {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Story Section */
.story-section {
    padding: var(--space-4xl) 0;
}

.story-content {
    max-width: 700px;
    margin: 0 auto;
}

.story-content h2 {
    margin-bottom: var(--space-xl);
}

.story-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-section {
    padding: 160px 0 80px;
    min-height: calc(100vh - 200px);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.contact-info h1 {
    margin-bottom: var(--space-md);
}

.contact-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.contact-benefits {
    display: grid;
    gap: var(--space-md);
}

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

.benefit-icon {
    color: var(--color-accent-mid);
    font-weight: 700;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--color-surface);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* Form Success */
.form-success {
    text-align: center;
    padding: var(--space-3xl);
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--color-accent-mid);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--space-lg);
}

.form-success h3 {
    margin-bottom: var(--space-sm);
}

/* Contact Methods */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent-mid);
}

.method-details h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.method-details a,
.method-details span {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.method-details a:hover {
    color: var(--color-primary);
}

.contact-name {
    display: block;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.location-divider {
    margin: 0 6px;
    color: var(--color-text-tertiary);
    opacity: 0.5;
}

.contact-benefits h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

/* Form Row (side by side fields) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* Form Required Indicator */
.form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}

/* Form Select Styling */
.form-group select {
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group select option[disabled] {
    color: var(--color-text-muted);
}

/* CTA Buttons (multiple buttons side by side) */
.cta-buttons {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive adjustments for form row */
@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1024px) {
    .hero .container,
    .product-highlight .container,
    .tech-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .tech-content.reverse {
        direction: ltr;
    }
    
    /* On mobile, keep hero content first, then visual */
    .hero-visual {
        order: 1;
    }
    
    .features-grid,
    .audience-grid,
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .capabilities-grid,
    .use-cases-grid,
    .security-grid,
    .deployment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-timeline {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }
    
    .steps-timeline::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background: #ffffff !important;
        padding: 24px;
        gap: 10px;
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: 9999;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu .nav-link {
        background: #f8f9fa !important;
        padding: 14px 20px;
        border-radius: 10px;
        display: block !important;
        text-align: center;
        color: #1a1a2e !important;
        font-weight: 500;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        width: 100%;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link:active {
        background: #e9ecef !important;
        border-color: #d1d5db;
    }
    
    .nav-menu .nav-link.cta-button {
        background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%) !important;
        color: #ffffff !important;
        border: none;
        margin-top: 8px;
        box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
    }
    
    .nav-menu .nav-link.cta-button + .nav-link.cta-button {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .nav-menu .nav-link.cta-button:hover,
    .nav-menu .nav-link.cta-button:active {
        background: linear-gradient(135deg, #2d2d44 0%, #3d3d5c 100%) !important;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 10001;
    }
    
    /* Hide API button on mobile - it will be in the hamburger menu */
    .nav-api-btn {
        display: none !important;
    }
    
    /* Show mobile-only items in hamburger menu */
    .nav-menu .mobile-only {
        display: block !important;
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    .nav-link.cta-button {
        width: 100%;
        text-align: center;
    }
    
    /* User menu button in mobile nav */
    .nav-menu .user-menu-btn {
        background: #f8f9fa !important;
        padding: 14px 20px;
        border-radius: 10px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
        color: #1a1a2e !important;
        font-weight: 500;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        width: 100%;
        flex-shrink: 0;
    }
    
    .nav-menu .user-menu-btn:hover,
    .nav-menu .user-menu-btn:active {
        background: #e9ecef !important;
        border-color: #d1d5db;
    }
    
    .nav-menu .user-name {
        display: inline !important;
    }
    
    .nav-menu .user-dropdown {
        position: fixed;
        top: auto;
        left: 24px;
        right: 24px;
        bottom: 24px;
        width: auto;
        max-height: 60vh;
        overflow-y: auto;
        z-index: 10002;
    }
    
    .features-grid,
    .audience-grid,
    .capabilities-grid,
    .use-cases-grid,
    .security-grid,
    .deployment-grid,
    .specs-grid,
    .principles-grid,
    .founders-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        overflow-x: auto;
    }
    
    .comparison-header,
    .comparison-row {
        min-width: 600px;
    }
    
    .verification-flow {
        flex-direction: column;
    }
    
    .verify-arrow {
        transform: rotate(90deg);
    }
    
    .founder-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .trace-demo {
        flex-direction: column;
    }
    
    .trace-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    :root {
        --space-4xl: 4rem;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .page-hero {
        padding: 120px 0 60px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .doc-animation {
        width: 100%;
        max-width: 280px;
    }
    
    .compliance-grid {
        flex-direction: column;
    }
}

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

.hero-content,
.page-hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.feature-card,
.capability-card,
.audience-card,
.security-card,
.principle-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* =============================================
   AUTHENTICATION PAGE
   ============================================= */

/* Auth Page Body */
.auth-page {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f172a 100%);
    min-height: 100vh;
}

.navbar-auth {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Auth Section */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
}

.auth-container {
    display: grid;
    grid-template-columns: 480px 400px;
    gap: 60px;
    max-width: 1000px;
    width: 100%;
    align-items: start;
}

/* Auth Card */
.auth-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--color-gray-100);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: var(--color-text);
}

.auth-tab.active {
    background: white;
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-family: var(--font-sans);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

/* Social Login Buttons */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: white;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background: var(--color-gray-50);
    border-color: var(--color-gray-300);
    transform: translateY(-1px);
}

.social-btn:active {
    transform: translateY(0);
}

.google-btn:hover {
    border-color: #4285F4;
    background: rgba(66, 133, 244, 0.04);
}

.apple-btn:hover {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.04);
}

.facebook-btn:hover {
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.04);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Input Method Toggle */
.input-method-toggle {
    display: flex;
    background: var(--color-gray-100);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

.method-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-btn:hover {
    color: var(--color-text);
}

.method-btn.active {
    background: white;
    color: var(--color-text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form .form-group {
    gap: 6px;
}

.auth-form .form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
}

.auth-form .form-group input {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.9375rem;
}

/* Form Row (for first/last name) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 48px !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--color-text);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--color-gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength.weak .strength-bar span {
    background: #ef4444;
}

.password-strength.medium .strength-bar span {
    background: #f59e0b;
}

.password-strength.strong .strength-bar span {
    background: #22c55e;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    min-width: 50px;
}

.password-strength.weak .strength-text {
    color: #ef4444;
}

.password-strength.medium .strength-text {
    color: #f59e0b;
}

.password-strength.strong .strength-text {
    color: #22c55e;
}

/* Phone Input */
.phone-input-wrapper {
    display: flex;
    gap: 8px;
}

.country-code-select {
    padding: 14px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: white;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 100px;
}

.country-code-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.phone-input-wrapper input {
    flex: 1;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--color-accent-cool);
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #2563eb;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.terms-checkbox a {
    color: var(--color-accent-cool);
    font-weight: 500;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Auth Submit Button */
.auth-submit {
    margin-top: 8px;
    padding: 16px 24px;
    font-size: 1rem;
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Verification Code Inputs */
.verification-hint {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.verification-hint span {
    font-weight: 600;
    color: var(--color-text);
}

.verification-code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.code-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

/* Auth Message */
.auth-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-top: 20px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-message.success .message-icon {
    color: #22c55e;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-message.error .message-icon {
    color: #ef4444;
}

.auth-message.warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.auth-message.warning .message-icon {
    color: #f59e0b;
    font-size: 1.2rem;
}

.message-icon {
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-text {
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.5;
}

.resend-verification-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    width: fit-content;
}

.resend-verification-btn:hover {
    background: var(--color-primary-dark, #1d4ed8);
}

/* Reset Success */
.reset-success {
    text-align: center;
    padding: 20px 0;
}

.reset-success .success-icon {
    width: 64px;
    height: 64px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 20px;
}

.reset-success h3 {
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: 8px;
}

.reset-success p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

/* Auth Visual (Side Panel) */
.auth-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-visual-content {
    text-align: center;
    color: white;
    max-width: 360px;
}

.visual-icon {
    margin-bottom: 32px;
}

.visual-icon svg {
    width: 80px;
    height: 80px;
}

.auth-visual-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.auth-visual-content > p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 32px;
}

.visual-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
}

.feature-check {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* User Menu (Navbar) */
.user-menu-container {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--color-gray-100);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: var(--color-gray-200);
    border-color: var(--color-gray-300);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.chevron-down {
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.user-menu-btn:hover .chevron-down {
    color: var(--color-text);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--color-gray-50);
}

.dropdown-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-email {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
}

.dropdown-item:hover {
    background: var(--color-gray-50);
    color: var(--color-text);
}

.dropdown-item svg {
    color: var(--color-text-muted);
}

.dropdown-item:hover svg {
    color: var(--color-text);
}

.sign-out-btn {
    color: #ef4444;
}

.sign-out-btn:hover {
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
}

.sign-out-btn svg {
    color: #ef4444;
}

/* Auth Link in Nav */
.auth-link {
    font-weight: 500 !important;
}

/* Responsive Auth */
@media (max-width: 960px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    
    .auth-visual {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth-section {
        padding: 80px 16px 24px;
    }
    
    .auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .auth-tabs {
        margin-bottom: 24px;
    }
    
    .auth-tab {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .verification-code-inputs {
        gap: 8px;
    }
    
    .code-input {
        width: 44px;
        height: 52px;
        font-size: 1.25rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-menu-btn {
        padding: 4px;
    }
}

/* =============================================
   CHATBOT - AI Assistant
   ============================================= */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.35),
                0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.45),
                0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-toggle .chat-icon,
.chatbot-toggle .close-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.chatbot-toggle .chat-icon {
    opacity: 1;
    transform: scale(1);
}

.chatbot-toggle .close-icon {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.chatbot-toggle.active .chat-icon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.chatbot-toggle.active .close-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Animated ring effect */
.chatbot-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: chatPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes chatPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.chatbot-toggle.active::before {
    animation: none;
    opacity: 0;
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15),
                0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chatbot Header */
.chatbot-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 14px;
}

.chatbot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chatbot-avatar img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.chatbot-header-text {
    flex: 1;
}

.chatbot-header-text h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px 0;
}


/* Chatbot Messages Container */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Message Bubbles */
.chat-message {
    display: flex;
    gap: 10px;
    max-width: 88%;
    animation: messageSlide 0.3s ease;
}

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

.chat-message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.bot-message {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-message.bot-message .message-avatar {
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    color: #ffffff;
}

.chat-message.user-message .message-avatar {
    background: #3b82f6;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.chat-message.bot-message .message-content {
    background: #ffffff;
    color: #1f2937;
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: block;
}

.chat-message .message-content strong {
    display: inline;
    font-weight: 600;
}

.chat-message.user-message .message-content {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-bottom-right-radius: 6px;
    display: block;
}

/* Chatbot Links */
.chat-message .message-content a,
.chat-message .message-content .chatbot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.chat-message .message-content a:hover,
.chat-message .message-content .chatbot-link:hover {
    border-bottom-color: #2563eb;
}

.chat-message.user-message .message-content a {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.chat-message.user-message .message-content a:hover {
    border-bottom-color: #ffffff;
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 12px 16px;
}

.typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #14b8a6;
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Chatbot Input Area */
.chatbot-input-area {
    padding: 12px 16px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chatbot-input-wrapper {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border-radius: 20px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    color: #1f2937;
    font-size: 1rem;
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 24px;
    max-height: 120px;
    overflow-y: auto;
    outline: none;
    cursor: text;
}

.chatbot-input-wrapper:empty::before {
    content: "Type your message...";
    color: #64748b;
    font-size: 0.9375rem;
    pointer-events: none;
}

.chatbot-input-wrapper:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
    background: #ffffff;
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-send-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Quick Actions / Suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.suggestion-btn {
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    color: #4b5563;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.suggestion-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #14b8a6 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
    
    .chatbot-header {
        padding: 16px;
    }
    
    .chatbot-messages {
        padding: 16px;
    }
    
    .chatbot-input-area {
        padding: 12px 16px 24px;
    }
}

/* =============================================
   PLAYGROUND - Document Extraction UI
   ============================================= */

.playground-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    overflow: hidden;
}

.navbar-playground {
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-playground .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

.navbar-playground .nav-link:hover,
.navbar-playground .nav-link.active {
    color: #ffffff;
}

.playground-main {
    display: flex;
    height: calc(100vh - 72px);
    margin-top: 72px;
}

.playground-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.panel-left {
    width: 420px;
    min-width: 380px;
    background: rgba(30, 41, 59, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    overflow-y: auto;
}

.panel-right {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.panel-title svg {
    width: 24px;
    height: 24px;
    color: #14b8a6;
}

.panel-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* =============================================
   API ACCESS SECTION
   ============================================= */

.api-access-section {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.api-access-section.expanded {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(20, 184, 166, 0.4);
}

.api-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.api-section-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.api-section-toggle .toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-section-toggle .toggle-left svg {
    width: 18px;
    height: 18px;
    color: #14b8a6;
}

.api-section-toggle .toggle-left span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
}

.api-section-toggle .chevron {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.api-access-section.expanded .api-section-toggle .chevron {
    transform: rotate(180deg);
}

.api-section-content {
    display: none;
    padding: 0 16px 16px;
    animation: slideDown 0.3s ease;
}

.api-access-section.expanded .api-section-content {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-key-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.api-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.api-key-content .api-key-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.api-key-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.api-key-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #14b8a6;
    letter-spacing: 0.5px;
}

.api-key-input:focus {
    outline: none;
    border-color: rgba(20, 184, 166, 0.4);
}

.api-key-input.highlight-new {
    animation: highlightKey 3s ease;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

@keyframes highlightKey {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.3);
    }
}

.api-key-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.api-key-btn svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.api-key-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(20, 184, 166, 0.3);
}

.api-key-btn:hover svg {
    color: #14b8a6;
}

.api-key-btn.copied {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
}

.api-key-btn.copied svg {
    color: #14b8a6;
}

.api-key-btn.visible svg {
    color: #14b8a6;
}

.api-key-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.api-key-actions {
    display: flex;
    gap: 8px;
}

.btn-regenerate {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #f59e0b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-regenerate svg {
    width: 14px;
    height: 14px;
}

.btn-regenerate:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.btn-regenerate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.api-key-empty {
    text-align: center;
    padding: 8px 0;
}

.api-key-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.btn-generate-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.btn-generate-key svg {
    width: 18px;
    height: 18px;
}

.btn-generate-key:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

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

.api-usage-info {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 14px;
}

.api-usage-info h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-code-example {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.api-code-example code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

.api-code-example .api-key-placeholder {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.15);
    padding: 2px 4px;
    border-radius: 3px;
}

.api-docs-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #14b8a6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.api-docs-link svg {
    width: 14px;
    height: 14px;
}

.api-docs-link:hover {
    color: #5eead4;
    text-decoration: underline;
}

/* =============================================
   API PAGE STYLES
   ============================================= */

.api-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
}

.api-main {
    padding: 100px 24px 60px;
    min-height: calc(100vh - 160px);
}

.api-container {
    max-width: 900px;
    margin: 0 auto;
}

.api-header {
    text-align: center;
    margin-bottom: 48px;
}

.api-header-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.api-header-icon svg {
    width: 40px;
    height: 40px;
    color: #14b8a6;
}

.api-header h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 12px;
}

.api-header p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Section Styles */
.api-key-section,
.api-stats-section,
.api-quickstart-section,
.api-limits-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.beta-badge {
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* API Key Card */
.api-key-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
}

.api-state {
    display: none;
}

.api-state.api-loading-state {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

.api-state.api-loading-state p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.api-state.api-empty-state {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.4);
}

.api-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px;
}

.api-empty-state p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 24px;
    max-width: 400px;
}

.btn-primary.btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.3);
}

.btn-primary.btn-generate svg {
    width: 20px;
    height: 20px;
}

.btn-primary.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(20, 184, 166, 0.4);
}

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

/* Key Display State */
.key-display-row {
    margin-bottom: 20px;
}

.key-input-wrapper label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.key-input-group {
    display: flex;
    gap: 8px;
}

.key-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #14b8a6;
    letter-spacing: 0.5px;
}

.key-input:focus {
    outline: none;
    border-color: rgba(20, 184, 166, 0.4);
}

.key-input.new-key-highlight {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
    animation: keyPulse 2s ease-in-out infinite;
}

@keyframes keyPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.1); }
}

.key-action-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.key-action-btn svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.key-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(20, 184, 166, 0.3);
}

.key-action-btn:hover svg {
    color: #14b8a6;
}

.key-action-btn.copied {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
}

.key-action-btn.copied svg {
    color: #14b8a6;
}

.key-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

.key-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.key-meta-item svg {
    width: 16px;
    height: 16px;
}

.key-meta-item.status-active {
    color: #10b981;
}

.key-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.key-warning svg {
    width: 20px;
    height: 20px;
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.key-warning span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.key-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary.btn-regenerate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #f59e0b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary.btn-regenerate svg {
    width: 16px;
    height: 16px;
}

.btn-secondary.btn-regenerate:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.btn-secondary.btn-regenerate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: #14b8a6;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Start Section */
.code-examples {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

.code-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.code-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.02);
}

.code-tab.active {
    color: #14b8a6;
    border-bottom-color: #14b8a6;
    background: rgba(20, 184, 166, 0.05);
}

.code-content {
    padding: 0;
}

.code-block {
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.copy-code-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn svg {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(20, 184, 166, 0.3);
}

.copy-code-btn:hover svg {
    color: #14b8a6;
}

.copy-code-btn.copied {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
}

.copy-code-btn.copied svg {
    color: #14b8a6;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.code-block .key-placeholder {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Rate Limits Section */
.limits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.limit-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.limit-value {
    font-size: 2rem;
    font-weight: 700;
    color: #14b8a6;
    margin-bottom: 4px;
}

.limit-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.limits-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.limits-note a {
    color: #14b8a6;
    text-decoration: none;
}

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

/* API Footer */
.api-footer {
    padding: 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.api-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* API Notification */
.api-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.api-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.api-notification.notification-success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.api-notification.notification-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.api-notification .notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.api-notification .notification-close:hover {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .api-header h1 {
        font-size: 2rem;
    }
    
    .api-key-card {
        padding: 24px;
    }
    
    .key-input-group {
        flex-wrap: wrap;
    }
    
    .key-input {
        width: 100%;
        font-size: 0.8rem;
    }
    
    .key-action-btn {
        width: 44px;
        height: 44px;
    }
    
    .stats-grid,
    .limits-grid {
        grid-template-columns: 1fr;
    }
    
    .key-meta-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .code-tabs {
        overflow-x: auto;
    }
    
    .code-tab {
        padding: 12px 16px;
        white-space: nowrap;
    }
}

/* Fields Container */
.fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.field-card {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.field-card:hover {
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.field-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.field-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.field-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
}

.field-remove-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-remove-btn svg {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.field-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.field-remove-btn:hover svg {
    color: #ef4444;
}

.field-content {
    padding: 16px;
}

.field-input-group {
    margin-bottom: 12px;
}

.field-input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-input-group .required {
    color: #ef4444;
}

.field-name-input,
.field-description-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.field-name-input::placeholder,
.field-description-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.field-name-input:focus,
.field-description-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.field-description-input {
    resize: vertical;
    min-height: 60px;
}

.toggle-description {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.toggle-description:hover {
    color: rgba(255, 255, 255, 0.7);
}

.toggle-description svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.toggle-description.expanded svg {
    transform: rotate(180deg);
}

.field-description-container {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.field-description-container.expanded {
    max-height: 150px;
    margin-top: 12px;
}

/* Field Results */
.field-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.result-value {
    padding: 12px;
    background: rgba(15, 23, 42, 0.8);
    border-left: 3px solid #14b8a6;
    border-radius: 0 8px 8px 0;
    font-size: 0.9375rem;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-word;
}

.result-value-input {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #14b8a6;
    border-radius: 0 8px 8px 0;
    font-size: 0.9375rem;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-word;
    resize: vertical;
    min-height: 44px;
    transition: border-color 0.2s, background 0.2s;
}

.result-value-input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

.result-value-input:focus {
    outline: none;
    border-color: #14b8a6;
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.result-value-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.edit-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: normal;
    font-style: italic;
}

.result-value .not-found {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.result-meta {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.result-confidence {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.result-confidence strong {
    color: #14b8a6;
}

.field-card .result-bbox {
    font-size: 0.8125rem;
    font-weight: 500;
    /* Reset homepage box styling */
    width: auto;
    height: auto;
    min-width: unset;
    min-height: unset;
    border: none;
    border-radius: 0;
    display: inline;
    position: static;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.field-card .result-bbox:hover {
    opacity: 0.8;
}

.field-card .result-bbox::after {
    display: none;
}

.field-card .result-no-bbox {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

/* Add Field Button */
.btn-add-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(20, 184, 166, 0.1);
    border: 2px dashed rgba(20, 184, 166, 0.3);
    border-radius: 12px;
    color: #14b8a6;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-field svg {
    width: 18px;
    height: 18px;
}

.btn-add-field:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
}

/* Run Section */
.run-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-run {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
}

.btn-run svg {
    width: 20px;
    height: 20px;
}

.btn-run:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.5);
}

.btn-run:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    cursor: not-allowed;
}

.run-status {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Results Section */
.results-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.results-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Action Buttons Section (above results) */
.action-buttons-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-download-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download-pdf svg {
    width: 20px;
    height: 20px;
}

.btn-download-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

.btn-download-pdf:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-download-pdf svg.spin {
    animation: spin 1s linear infinite;
}

/* Save Changes Button */
.btn-save-changes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-changes svg {
    width: 20px;
    height: 20px;
}

.btn-save-changes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.btn-save-changes:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-save-changes .modified-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Editable Annotation Box Styles */
.annotation-box.editable {
    pointer-events: auto;  /* Override parent's pointer-events: none */
    cursor: move;
    transition: box-shadow 0.15s ease;
}

.annotation-box.editable:hover {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.annotation-box.active {
    box-shadow: 0 0 0 3px #14b8a6, 0 4px 16px rgba(20, 184, 166, 0.4) !important;
    z-index: 100 !important;
}

.annotation-box.modified {
    border-style: dashed !important;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #14b8a6;
    border: 2px solid #ffffff;
    border-radius: 50%;
    z-index: 10;
}

.resize-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.resize-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.resize-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.resize-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }

.resize-handle.n { top: -6px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.resize-handle.s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.resize-handle.e { right: -6px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.resize-handle.w { left: -6px; top: 50%; transform: translateY(-50%); cursor: w-resize; }

/* Edit Mode Indicator */
.edit-mode-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 184, 166, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.btn-copy-results {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-results svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.btn-copy-results:hover {
    background: rgba(20, 184, 166, 0.2);
}

.btn-copy-results:hover svg {
    color: #14b8a6;
}

.results-json {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: #14b8a6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* PDF Viewer */
.pdf-viewer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

.upload-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.drag-over {
    background: rgba(20, 184, 166, 0.05);
}

.upload-area.drag-over {
    border: 2px dashed #14b8a6;
}

.upload-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(20, 184, 166, 0.1) 100%);
    border-radius: 24px;
    margin-bottom: 24px;
}

.upload-icon svg {
    width: 40px;
    height: 40px;
    color: #14b8a6;
}

.upload-area h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.btn-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload svg {
    width: 18px;
    height: 18px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.4);
}

/* PDF Controls */
.pdf-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.pdf-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdf-nav-btn svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.7);
}

.pdf-nav-btn:hover {
    background: rgba(20, 184, 166, 0.2);
}

.pdf-nav-btn:hover svg {
    color: #14b8a6;
}

.page-info,
.zoom-level {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'JetBrains Mono', monospace;
    min-width: 60px;
    text-align: center;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* PDF Viewer Canvas */
.pdf-viewer {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 24px;
    display: block;
}

.pdf-pages-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    padding-bottom: 40px;
    min-width: fit-content;
    margin: 0 auto;
}

.pdf-page-wrapper {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: visible;
}

.pdf-page-canvas {
    display: block;
    border-radius: 4px;
}

.pdf-page-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    white-space: nowrap;
}

.pdf-canvas-container {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #ffffff;
    border-radius: 4px;
}

#pdfCanvas {
    display: block;
}

/* Text Layer - Selectable OCR Text */
.text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    line-height: 1.0;
    pointer-events: auto;
    z-index: 5;  /* Below annotation layer (z-index: 10) */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    z-index: 2;
}

.text-layer span {
    position: absolute;
    color: transparent;
    white-space: pre;
    pointer-events: auto;
    cursor: text;
    box-sizing: border-box;
    /* Ensure selection covers the full span width */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Selection highlight - highly visible blue */
.text-layer span::selection {
    background: rgba(59, 130, 246, 0.5);
    color: transparent;
}

.text-layer span::-moz-selection {
    background: rgba(59, 130, 246, 0.5);
    color: transparent;
}

/* Text layer toggle button */
.text-layer-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 100;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.text-layer-toggle:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.text-layer-toggle.active {
    background: rgba(59, 130, 246, 0.4);
    border-color: var(--accent);
    color: #fff;
}

.text-layer-toggle svg {
    width: 14px;
    height: 14px;
}

/* Annotation Layer */
.annotation-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;  /* Above text layer (z-index: 5) to allow annotation editing */
}

.annotation-box {
    position: absolute;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.annotation-label {
    position: absolute;
    top: -24px;
    left: 0;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.annotation-box:hover .annotation-label,
.annotation-box.highlighted .annotation-label {
    opacity: 1;
}

.annotation-box.highlighted {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    z-index: 100;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    max-width: 320px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(20, 184, 166, 0.2);
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.loading-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.loading-content p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #14b8a6 0%, #0d9488 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Auth Loading Overlay */
.auth-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.auth-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-loading-content {
    text-align: center;
    max-width: 320px;
}

.auth-loading-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.auth-loading-content p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Notifications */
.playground-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.playground-notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

.playground-notification span {
    color: #ffffff;
    font-size: 0.9375rem;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: #ffffff;
}

.notification-success {
    border-color: rgba(16, 185, 129, 0.3);
}

.notification-success::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.notification-error {
    border-color: rgba(239, 68, 68, 0.3);
}

.notification-error::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.notification-warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.notification-warning::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: bold;
}

/* Playground Mobile Responsive */
@media (max-width: 1024px) {
    .playground-main {
        flex-direction: column;
    }
    
    .panel-left {
        width: 100%;
        min-width: unset;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .panel-right {
        height: 50vh;
    }
}

@media (max-width: 640px) {
    .panel-left {
        padding: 16px;
    }
    
    .panel-right {
        padding: 16px;
    }
    
    .pdf-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .zoom-controls {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .playground-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

/* =============================================
   ENHANCED LOADING PROGRESS INDICATOR
   ============================================= */

.loading-content {
    max-width: 400px;
    width: 90%;
}

.loading-content h3 {
    margin-bottom: 8px;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 24px 0;
    padding: 0 10px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.active .step-icon {
    background: var(--accent);
    border-color: var(--accent);
    animation: pulse-step 1.5s ease-in-out infinite;
}

.progress-step.completed {
    opacity: 1;
}

.progress-step.completed .step-icon {
    background: #10b981;
    border-color: #10b981;
}

.progress-step.completed .step-icon svg {
    stroke: white;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.step-icon svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.7);
}

.progress-step span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    white-space: nowrap;
}

@keyframes pulse-step {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

/* Loading Tip */
.loading-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    min-height: 20px;
    animation: fade-tip 0.3s ease;
}

.tip-icon {
    font-size: 14px;
}

@keyframes fade-tip {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile adjustments for progress steps */
@media (max-width: 480px) {
    .progress-steps {
        padding: 0;
    }
    
    .progress-steps::before {
        left: 20px;
        right: 20px;
    }
    
    .step-icon {
        width: 30px;
        height: 30px;
    }
    
    .step-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .progress-step span {
        font-size: 9px;
    }
    
    .loading-tip {
        font-size: 11px;
    }
}

