/* ========================================
   Alpha SXG - Performance Testing UI
   A modern, distinctive design
   ======================================== */


/* CSS Variables */

:root {
    /* Colors - Deep blue/purple theme with electric accents (Dark Mode) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1a1a25;
    --bg-input: #0d0d14;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --accent-glow: rgba(0, 212, 255, 0.3);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.3);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    /* Grid pattern */
    --grid-color: rgba(255, 255, 255, 0.02);
    --glow-opacity-1: 0.15;
    --glow-opacity-2: 0.12;
    --glow-opacity-3: 0.1;
    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    /* Spacing */
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}


/* Light Mode */

body.light-mode {
    /* Colors - Light theme with vibrant accents */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-primary: #0ea5e9;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --accent-glow: rgba(14, 165, 233, 0.2);
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.1);
    --success-border: rgba(5, 150, 105, 0.3);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --danger-border: rgba(220, 38, 38, 0.3);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    /* Grid pattern */
    --grid-color: rgba(0, 0, 0, 0.03);
    --glow-opacity-1: 0.08;
    --glow-opacity-2: 0.06;
    --glow-opacity-3: 0.05;
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px var(--accent-glow);
}


/* Reset & Base */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}


/* Background Effects */

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -100px;
    opacity: var(--glow-opacity-1);
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    bottom: 20%;
    left: -150px;
    opacity: var(--glow-opacity-2);
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    bottom: -100px;
    right: 20%;
    opacity: var(--glow-opacity-3);
}


/* Header */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 38px;
    height: 45px;
    display: block;
}

.logo-text .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-primary);
}


/* Theme Toggle Button */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: 1rem;
    position: relative;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-mode .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-mode .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

body.light-mode .theme-toggle {
    border-color: rgba(0, 0, 0, 0.1);
}


/* Light mode specific adjustments */

body.light-mode .header {
    background: rgba(248, 250, 252, 0.9);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .input-card {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .cwv-card {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .cwv-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .metrics-table {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .metric-row {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .filmstrip-container {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .loading-card {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .error-card {
    border-color: var(--danger-border);
}

body.light-mode .info-card {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .summary-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(14, 165, 233, 0.2);
}

body.light-mode .hero-badge {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

body.light-mode .shared-banner {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.2);
}

body.light-mode .step {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .step.active {
    background: rgba(14, 165, 233, 0.1);
}

body.light-mode .loading-progress {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .cwv-bar-container {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .summary-metric {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .filmstrip-frame {
    background: var(--bg-secondary);
    border-color: transparent;
}

body.light-mode .benefit {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .info-section {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .about-section {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .test-again-btn {
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .test-again-btn:hover {
    background: rgba(14, 165, 233, 0.1);
}

body.light-mode .metric-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .metric-row.header {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .error-details-wrapper {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .error-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .share-notification .notification-content {
    background: var(--bg-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-mode .sxg-warning {
    background: var(--warning-bg);
    border-color: rgba(217, 119, 6, 0.3);
}

body.light-mode .sxg-warning .warning-reasons {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .sxg-warning .warning-whitelist {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-mode .example-com-note {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

body.light-mode .error-whitelist-info {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}


/* Main Content */

.main {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}


/* Hero Section */

.hero {
    text-align: center;
    padding: 5rem 0 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}


/* Input Section */

.input-section {
    margin-bottom: 3rem;
}

.input-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
}

.input-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    padding: 1rem 0.5rem;
}

.url-input::placeholder {
    color: var(--text-muted);
}

.test-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.75rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.test-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.test-btn:active {
    transform: translateY(0);
}

.test-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.input-hints {
    padding: 0.75rem 1rem;
    text-align: center;
}

.hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}


/* Loading Section */

.loading-section {
    padding: 4rem 0;
}

.loading-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 65%;
    height: 65%;
    top: 17.5%;
    left: 17.5%;
    border-top-color: var(--accent-secondary);
    animation-duration: 1s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: var(--accent-primary);
    animation-duration: 0.8s;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-status {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.5s ease;
}

.loading-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.step.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}

.step.completed {
    background: var(--success-bg);
    color: var(--success);
}


/* Results Section */

.results-section {
    padding: 2rem 0;
}


/* Summary Card */

.summary-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-header {
    margin-bottom: 2rem;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.summary-url {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-metric {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
}

.summary-metric .metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-metric .metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.summary-metric .metric-value.positive {
    color: var(--success);
}

.summary-metric .metric-value.negative {
    color: var(--danger);
}

.summary-metric .metric-value.neutral {
    color: var(--warning);
}

.summary-metric .metric-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}


/* Section Titles */

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.title-icon {
    font-size: 1.5rem;
}


/* CWV Comparison */

.cwv-comparison {
    margin-bottom: 2rem;
}

.cwv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.cwv-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.cwv-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.cwv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cwv-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.cwv-title {
    font-size: 1rem;
    font-weight: 600;
}

.cwv-improvement {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.cwv-improvement.positive {
    background: var(--success-bg);
    color: var(--success);
}

.cwv-improvement.negative {
    background: var(--danger-bg);
    color: var(--danger);
}

.cwv-improvement.neutral {
    background: var(--warning-bg);
    color: var(--warning);
}

.cwv-values {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cwv-value-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cwv-label {
    width: 60px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.cwv-bar-container {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.cwv-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.8s ease-out;
}

.cwv-bar.regular {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.cwv-bar.sxg {
    background: var(--accent-gradient);
}

.cwv-bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}


/* Rating indicators */

.cwv-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.cwv-rating.good {
    background: var(--success-bg);
    color: var(--success);
}

.cwv-rating.needs-improvement {
    background: var(--warning-bg);
    color: var(--warning);
}

.cwv-rating.poor {
    background: var(--danger-bg);
    color: var(--danger);
}


/* Metrics Table */

.metrics-comparison {
    margin-bottom: 2rem;
}

.metrics-table {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 120px;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.metric-row.header {
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-name {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.metric-name .name {
    font-weight: 500;
}

.metric-name .description {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.metric-value-cell {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.metric-value-cell.regular {
    color: #60a5fa;
}

.metric-value-cell.sxg {
    color: var(--accent-primary);
}

.metric-diff {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.metric-diff.positive {
    color: var(--success);
}

.metric-diff.negative {
    color: var(--danger);
}

.metric-diff.neutral {
    color: var(--text-muted);
}

.diff-arrow {
    font-size: 1rem;
}


/* Filmstrip Comparison */

.filmstrip-comparison {
    margin-bottom: 2rem;
}

.filmstrip-container {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow-x: auto;
}

.filmstrip-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.filmstrip-row:last-child {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.filmstrip-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100px;
    flex-shrink: 0;
}

.label-icon {
    font-size: 1.25rem;
}

.label-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.filmstrip-frames {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.filmstrip-frame {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 75px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.filmstrip-frame:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
    z-index: 10;
}

.filmstrip-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frame-time {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 0.5rem 0.25rem 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-align: center;
    color: white;
}

.filmstrip-timeline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 116px;
    padding: 0.5rem 0;
}

.timeline-marker {
    flex-shrink: 0;
    width: 120px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}


/* Result Action Buttons */

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.test-again-btn,
.share-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 2rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.test-again-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

.share-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.share-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.share-btn.share-success {
    background: var(--success);
}

.share-btn.share-error {
    background: var(--danger);
}

.btn-loading {
    display: inline-block;
    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;
}


/* SXG Warning */

.sxg-warning {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.sxg-warning .warning-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.sxg-warning .warning-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 0.5rem;
}

.sxg-warning .warning-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.sxg-warning .warning-main {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sxg-warning .warning-reasons {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.sxg-warning .warning-reasons p {
    margin-bottom: 0.5rem;
}

.sxg-warning .warning-content ul {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.sxg-warning .warning-content li {
    margin-bottom: 0.25rem;
}

.sxg-warning .warning-whitelist {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.sxg-warning .warning-whitelist p {
    margin-bottom: 0.5rem;
}

.sxg-warning .warning-whitelist code {
    display: block;
    background: var(--surface);
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    word-break: break-all;
}

.sxg-warning .warning-suggestion {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.sxg-warning .warning-note {
    color: var(--warning);
    font-weight: 500;
    font-size: 0.9rem;
}


/* Example.com Note */

.example-com-note {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.example-com-note .note-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.example-com-note .note-content {
    flex: 1;
}

.example-com-note .note-content p {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}


/* Share Notification */

.share-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-notification .notification-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.share-notification .notification-icon {
    font-size: 1.5rem;
}

.share-notification .notification-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.share-notification .notification-text strong {
    color: var(--success);
}

.share-notification .notification-url {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.share-notification .notification-expiry {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.share-notification .notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.share-notification .notification-close:hover {
    color: var(--text-primary);
}


/* Shared Result Banner */

.shared-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.shared-banner .banner-icon {
    font-size: 1.25rem;
}

.shared-banner .banner-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.shared-banner .banner-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.shared-banner .banner-link:hover {
    text-decoration: underline;
}


/* Expired Result */

.expired-result {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.expired-result .expired-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.expired-result h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--warning);
}

.expired-result p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}


/* CWV Card when SXG unavailable */

.cwv-card.sxg-unavailable .cwv-value-row.disabled {
    opacity: 0.5;
}

.cwv-card.sxg-unavailable .cwv-value-row.disabled .cwv-bar {
    background: rgba(255, 255, 255, 0.1);
}


/* Error Section */

.error-section {
    padding: 4rem 0;
}

.error-card {
    background: var(--bg-card);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.error-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    margin-bottom: 1rem;
}

.error-toggle:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.error-toggle-icon {
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}

.error-toggle.expanded .error-toggle-icon {
    transform: rotate(180deg);
}

.error-details-wrapper {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
    animation: slideDown 0.2s ease;
}

.error-details-wrapper.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
}

.error-details {
    margin-top: 1rem;
}

.error-details.hidden {
    display: none;
}

.error-whitelist-info {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: left;
}

.error-whitelist-info p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.error-whitelist-info p:last-child {
    margin-bottom: 0;
}

.error-whitelist-info p strong {
    color: var(--text);
    font-weight: 600;
}

.error-whitelist-info code {
    display: block;
    background: var(--surface);
    color: var(--primary);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin: 0.75rem 0;
    word-break: break-all;
}

.error-whitelist-info .error-suggestion {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid var(--warning);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    margin-bottom: 0;
}

.retry-btn {
    background: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 2rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
}

.retry-btn:hover {
    background: #dc2626;
}


/* Info Section */

.info-section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition-base);
}

.info-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.info-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* About Section */

.about-section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-text strong {
    color: var(--accent-primary);
}

.about-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.benefit-icon {
    font-size: 1.5rem;
}


/* Footer */

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


/* Utility Classes */

.hidden {
    display: none !important;
}


/* Responsive */

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    .nav {
        gap: 1rem;
    }
    .nav-link {
        display: none;
    }
    .theme-toggle {
        margin-left: 0;
    }
    .main {
        padding: 0 1rem 3rem;
    }
    .hero {
        padding: 3rem 0 2rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .input-wrapper {
        flex-direction: column;
        padding: 1rem;
    }
    .input-icon {
        display: none;
    }
    .url-input {
        width: 100%;
        padding: 0.75rem 0;
    }
    .test-btn {
        width: 100%;
        justify-content: center;
    }
    .summary-metrics {
        grid-template-columns: 1fr;
    }
    .metric-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .metric-row.header {
        display: none;
    }
    .metric-name {
        grid-column: span 2;
        margin-bottom: 0.5rem;
    }
    .loading-steps {
        flex-direction: column;
        gap: 0.75rem;
    }
    .filmstrip-label {
        width: 60px;
    }
    .filmstrip-frame {
        width: 80px;
        height: 50px;
    }
    .filmstrip-timeline {
        margin-left: 76px;
    }
    .timeline-marker {
        width: 80px;
        font-size: 0.6rem;
    }
}


/* Animation for results appearing */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section>* {
    animation: fadeInUp 0.5s ease forwards;
}

.results-section>*:nth-child(1) {
    animation-delay: 0s;
}

.results-section>*:nth-child(2) {
    animation-delay: 0.1s;
}

.results-section>*:nth-child(3) {
    animation-delay: 0.2s;
}

.results-section>*:nth-child(4) {
    animation-delay: 0.3s;
}

.results-section>*:nth-child(5) {
    animation-delay: 0.4s;
}


/* Learn Test Link */

.learn-test-link-wrapper {
    text-align: center;
    padding: 1rem 0 0;
}

.learn-test-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 0;
    transition: all var(--transition-fast);
}

.learn-test-link:hover {
    gap: 0.75rem;
}

.learn-test-link svg {
    animation: bounce-down 1.5s ease-in-out infinite;
}

@keyframes bounce-down {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}


/* CTA Homepage Button */

.cta-homepage-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.cta-homepage-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}


/* Lead Form Section */

.lead-form-section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lead-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
}

.lead-form-header {
    margin-bottom: 2rem;
}

.lead-form-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px var(--accent-glow);
}

.lead-form-icon svg {
    color: white;
}

.lead-form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.lead-form-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.lead-form-credit {
    color: var(--accent-primary);
    font-weight: 600;
}


/* Lead Form */

.lead-form {
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-user-type {
    margin-bottom: 1.5rem;
}

.user-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.user-type-option {
    cursor: pointer;
}

.user-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.user-type-option .option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.user-type-option:hover .option-content {
    background: var(--bg-card-hover);
}

.user-type-option input:checked+.option-content {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.form-submit-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
}


/* Lead Form Success */

.lead-form-success {
    text-align: center;
    padding: 2rem;
}

.lead-form-success .success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--success-bg);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.lead-form-success .success-icon svg {
    color: var(--success);
}

.lead-form-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lead-form-success p {
    color: var(--text-secondary);
}


/* Lead Form Features */

.lead-form-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.feature-item svg {
    color: var(--accent-primary);
}


/* Floating Chat Widget */

.floating-chat {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: all var(--transition-base);
}

.chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 2rem);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--accent-gradient);
    color: white;
}

.chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.chat-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-body {
    padding: 1.25rem;
}

.chat-form-group {
    margin-bottom: 1rem;
}

.chat-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.chat-form-group input,
.chat-form-group textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    color: var(--text-primary);
    resize: none;
    transition: all var(--transition-fast);
}

.chat-form-group input:focus,
.chat-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.chat-form-group input::placeholder,
.chat-form-group textarea::placeholder {
    color: var(--text-muted);
}

.chat-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
}

.chat-submit-btn:hover {
    transform: translateY(-1px);
}

.chat-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* Chat Success State */

.chat-success {
    text-align: center;
    padding: 1.5rem 0;
}

.chat-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--success-bg);
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.chat-success-icon svg {
    color: var(--success);
}

.chat-success h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chat-success p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.chat-send-another {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.8rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chat-send-another:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}


/* Light Mode Adjustments for New Elements */

body.light-mode .lead-form-container {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(14, 165, 233, 0.2);
}

body.light-mode .user-type-option .option-content {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .user-type-option input:checked+.option-content {
    border-color: var(--accent-primary);
    background: rgba(14, 165, 233, 0.1);
}

body.light-mode .form-input {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .lead-form-features {
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .chat-window {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .chat-form-group input,
body.light-mode .chat-form-group textarea {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .chat-send-another {
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .chat-send-another:hover {
    border-color: var(--accent-primary);
}


/* Logo as link */

a.logo {
    text-decoration: none;
    color: inherit;
}

a.logo:hover {
    opacity: 0.9;
}


/* Responsive adjustments for new elements */

@media (max-width: 768px) {
    .lead-form-container {
        padding: 2rem 1.5rem;
    }
    .lead-form-title {
        font-size: 1.5rem;
    }
    .user-type-options {
        grid-template-columns: 1fr;
    }
    .lead-form-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .chat-window {
        width: calc(100vw - 2rem);
        right: -0.5rem;
    }
    .floating-chat {
        bottom: 1rem;
        right: 1rem;
    }
}