/* ===================================
   Device-Test - Modern Light Theme
   A refined light theme with blue accents
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Light palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;

    /* Accent colors - Professional blue palette */
    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-tertiary: #60a5fa;
    --accent-success: #22c55e;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;

    /* Text colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;

    /* Borders */
    --border-subtle: #e2e8f0;
    --border-light: #cbd5e1;
    --border-accent: rgba(37, 99, 235, 0.3);

    /* 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-glow: 0 0 20px rgba(37, 99, 235, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-hero: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--accent-primary);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
}

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    padding: var(--space-sm);
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-link {
    padding: var(--space-md);
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-3xl);
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    margin: calc(-1 * var(--space-xl)) calc(-1 * var(--space-lg)) var(--space-2xl);
    background:
        radial-gradient(ellipse 80% 60% at 10% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, #f0f5ff 0%, #f8fafc 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(37, 99, 235, 0.3);
}

/* Features Section */
.features-section {
    padding: var(--space-2xl) 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

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

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tool Section */
.tool-section {
    padding: var(--space-xl) 0;
}

/* Tab Navigation */
.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.tabs {
    display: inline-flex;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.tab {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab.active {
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
}

.tab-icon {
    width: 20px;
    height: 20px;
}

/* Panels */
.panels-container {
    position: relative;
}

.panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Test Card */
.test-card {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.test-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.test-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.test-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.test-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* Test Button */
.test-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-width: 140px;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.test-btn.primary {
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-sm);
}

.test-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.test-btn.secondary {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
}

.test-btn.secondary:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

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

/* Device Selection */
.device-select-container {
    margin-bottom: var(--space-lg);
}

.device-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    box-sizing: border-box;
}

.custom-select-trigger:hover {
    border-color: var(--accent-primary);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.custom-select-arrow {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-left: var(--space-sm);
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--accent-primary);
    border-top: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
}

.custom-select.open .custom-select-options {
    display: block;
}

.custom-select-option {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-option:hover {
    background: rgba(37, 99, 235, 0.06);
}

.custom-select-option.selected {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    font-weight: 500;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Visualization */
.visualization-container {
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.waveform-canvas {
    width: 100%;
    height: 120px;
    display: block;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

/* Volume Meter */
.volume-meter-container {
    margin-bottom: var(--space-lg);
}

.volume-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.volume-meter {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.volume-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 50ms ease-out;
}

.volume-value {
    font-size: 0.875rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
}

/* Status */
.status-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.status-indicator.ready {
    background: var(--text-muted);
}

.status-indicator.active {
    background: var(--accent-success);
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.error {
    background: var(--accent-error);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

/* Video Preview */
.video-container {
    margin-bottom: var(--space-lg);
    position: relative;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.video-preview.active {
    display: block;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--text-muted);
}

.video-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.video-placeholder span {
    font-size: 0.875rem;
}

.video-placeholder.hidden {
    display: none;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-2xl) var(--space-lg) var(--space-lg);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.footer-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Language Switcher */
/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-top: var(--space-sm);
}

.lang-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.lang-dropdown-trigger:hover {
    color: var(--text-primary);
    border-color: var(--accent-tertiary);
    background: rgba(37, 99, 235, 0.04);
}

.lang-dropdown.open .lang-dropdown-trigger {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.lang-dropdown-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.lang-dropdown-current {
    white-space: nowrap;
}

.lang-dropdown-arrow {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-dropdown.open .lang-dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 200;
    padding: 4px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-dropdown.open .lang-dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: langDropdownIn 0.2s ease forwards;
}

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

.lang-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.lang-dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.lang-dropdown-item.active {
    color: var(--accent-primary);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.06);
}

.lang-dropdown-item svg {
    flex-shrink: 0;
    color: var(--accent-primary);
}

.lang-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.lang-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

.footer-heading {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.5;
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-badges {
    display: flex;
    gap: var(--space-md);
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
}

.footer-badge svg {
    color: var(--accent-secondary);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

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

    .footer-badges {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: var(--space-2xl) var(--space-md);
    }

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

    .tabs {
        flex-direction: column;
        width: 100%;
    }

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

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

    .test-btn {
        width: 100%;
    }
}

/* ===================================
   Page-Specific Styles
   =================================== */

/* Page Hero - Modern Refined Design */
.page-hero {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
    margin: calc(-1 * var(--space-xl)) calc(-1 * var(--space-lg)) var(--space-xl);
    background:
        radial-gradient(ellipse 80% 60% at 10% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, #f0f5ff 0%, #f8fafc 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.page-hero .hero-content {
    position: relative;
    z-index: 1;
}

.page-hero .hero-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    color: var(--accent-primary);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow:
        0 8px 32px rgba(37, 99, 235, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    animation: heroIconFloat 3s ease-in-out infinite;
}

.page-hero .hero-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 28px;
    border: 1.5px dashed rgba(37, 99, 235, 0.15);
    animation: heroOrbitSpin 20s linear infinite;
}

.page-hero .hero-icon svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.page-hero .hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    animation: heroFadeUp 0.6s ease-out 0.1s both;
}

.page-hero .hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    animation: heroFadeUp 0.6s ease-out 0.2s both;
}

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

@keyframes heroOrbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Tips Section */
.tips-section {
    padding: var(--space-2xl) 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.tip-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-align: center;
}

.tip-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    margin-bottom: var(--space-md);
}

.tip-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Clickable Feature Cards */
.feature-card-link {
    text-decoration: none;
    display: block;
}

.features-grid.clickable .feature-card {
    cursor: pointer;
}

.feature-cta {
    display: inline-block;
    margin-top: var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: var(--transition-fast);
}

.feature-card-link:hover .feature-cta {
    transform: translateX(4px);
}

/* Privacy Section */
.privacy-section {
    padding: var(--space-xl) 0;
}

.privacy-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-xl);
}

.privacy-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.privacy-icon svg {
    width: 28px;
    height: 28px;
}

.privacy-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

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

@media (max-width: 600px) {
    .privacy-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================
   Display Test Styles
   =================================== */

/* Color Section */
.display-color-section {
    margin-bottom: var(--space-lg);
}

.display-color-hint {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.display-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-md);
}

.display-color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: transparent;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.display-color-swatch:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.swatch-inner {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

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

/* Fullscreen Overlay */
.display-fullscreen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    cursor: pointer;
    background: #000000;
}

.display-fullscreen.active {
    display: block;
}

/* Hint Bar */
.display-hint-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.display-hint-bar.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ===================================
   Keyboard Test Styles
   =================================== */

.keyboard-test-card {
    max-width: 1100px;
}

.keyboard-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.keyboard-toggles {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.toggle-group {
    display: inline-flex;
    padding: 3px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.toggle-btn {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-md) - 3px);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.toggle-btn.active {
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-sm);
}

.keyboard-stats {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.keyboard-progress {
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.keyboard-progress-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.keyboard-reset-btn {
    margin-left: var(--space-sm);
    min-width: auto;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8125rem;
}

/* Keyboard Container */
.keyboard-container {
    overflow-x: auto;
    padding: var(--space-md) 0;
}

.keyboard-layout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: fit-content;
    margin: 0 auto;
}

.keyboard-row {
    display: flex;
    gap: 4px;
    align-items: stretch;
}

.keyboard-section-gap {
    width: 20px;
    flex-shrink: 0;
}

.keyboard-row-gap {
    height: 12px;
}

/* Key Styles */
.kb-key {
    --key-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--key-size);
    min-width: var(--key-size);
    padding: 2px 4px;
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-bottom-width: 3px;
    border-radius: 6px;
    cursor: default;
    user-select: none;
    transition: background 0.1s ease, border-color 0.1s ease, transform 0.05s ease;
    text-align: center;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-key.active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    background: var(--bg-tertiary);
}

.kb-key.tested {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #15803d;
}

.kb-key.tested.active {
    background: rgba(34, 197, 94, 0.25);
}

.kb-key.undetectable {
    opacity: 0.45;
    background: repeating-linear-gradient(
        -45deg,
        var(--bg-primary),
        var(--bg-primary) 3px,
        var(--bg-tertiary) 3px,
        var(--bg-tertiary) 6px
    );
    border-style: dashed;
    cursor: not-allowed;
}

.kb-key.undetectable::after {
    content: '';
}

/* Key width variants */
.kb-key.w-125 { min-width: calc(var(--key-size) * 1.25 + 1px); }
.kb-key.w-150 { min-width: calc(var(--key-size) * 1.5 + 2px); }
.kb-key.w-175 { min-width: calc(var(--key-size) * 1.75 + 3px); }
.kb-key.w-200 { min-width: calc(var(--key-size) * 2 + 4px); }
.kb-key.w-225 { min-width: calc(var(--key-size) * 2.25 + 5px); }
.kb-key.w-250 { min-width: calc(var(--key-size) * 2.5 + 6px); }
.kb-key.w-275 { min-width: calc(var(--key-size) * 2.75 + 7px); }
.kb-key.w-625 { min-width: calc(var(--key-size) * 6.25 + 25px); }

@media (max-width: 768px) {
    .keyboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .keyboard-stats {
        justify-content: center;
    }

    .keyboard-toggles {
        justify-content: center;
    }

    .kb-key {
        --key-size: 32px;
        font-size: 0.5625rem;
    }

    .keyboard-section-gap {
        width: 12px;
    }
}

/* ===================================
   MIDI Test Styles
   =================================== */

.midi-test-card {
    max-width: 900px;
}

.midi-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

/* MIDI Devices */
.midi-devices-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.midi-device-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.midi-device-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.midi-device-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    color: #fff;
    flex-shrink: 0;
}

.midi-device-badge.input {
    background: linear-gradient(135deg, #10b981, #059669);
}

.midi-device-badge.output {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.midi-device-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.midi-device-manufacturer {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.midi-no-devices {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Virtual Piano */
.midi-piano-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.midi-piano {
    display: flex;
    position: relative;
    height: 140px;
    overflow: hidden;
}

.midi-piano-key {
    position: relative;
    border: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    cursor: pointer;
    transition: background 0.08s ease, box-shadow 0.08s ease;
}

.midi-piano-key.white {
    flex: 1 1 0;
    min-width: 0;
    height: 140px;
    background: #ffffff;
    border-color: #d1d5db;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.midi-piano-key.white:hover {
    background: #f0f4ff;
}

.midi-piano-key.white.active {
    background: linear-gradient(180deg, #93c5fd 0%, #3b82f6 100%);
    border-color: #2563eb;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.1);
}

.midi-piano-key.black {
    width: 60%;
    max-width: 24px;
    height: 90px;
    background: linear-gradient(180deg, #374151 0%, #111827 100%);
    border-color: #000;
    margin-left: -12px;
    margin-right: -12px;
    z-index: 2;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.midi-piano-key.black:hover {
    background: linear-gradient(180deg, #4b5563 0%, #1f2937 100%);
}

.midi-piano-key.black.active {
    background: linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%);
    border-color: #1e40af;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.6);
    height: 88px;
}

/* Event Log */
.midi-log-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.midi-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.midi-log-header .midi-section-title {
    margin-bottom: 0;
}

.midi-clear-btn {
    min-width: auto !important;
    padding: var(--space-xs) var(--space-md) !important;
    font-size: 0.8125rem !important;
}

.midi-event-log {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: var(--space-sm);
}

.midi-event-log::-webkit-scrollbar {
    width: 6px;
}

.midi-event-log::-webkit-scrollbar-track {
    background: transparent;
}

.midi-event-log::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

.midi-log-empty {
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.midi-event-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    animation: midiEventFadeIn 0.15s ease;
}

.midi-event-item:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

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

.midi-event-time {
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 72px;
}

.midi-event-type {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
}

.midi-event-noteOn .midi-event-type {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.midi-event-noteOff .midi-event-type {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.midi-event-cc .midi-event-type {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}

.midi-event-pitchBend .midi-event-type {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.midi-event-other .midi-event-type {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

.midi-event-channel {
    color: var(--text-secondary);
    flex-shrink: 0;
    min-width: 36px;
}

.midi-event-detail {
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* MIDI Responsive */
@media (max-width: 768px) {
    .midi-piano-key.white {
        height: 110px;
    }

    .midi-piano-key.black {
        height: 70px;
        margin-left: -9px;
        margin-right: -9px;
    }

    .midi-piano-key.black.active {
        height: 68px;
    }

    .midi-piano {
        height: 110px;
    }

    .midi-event-item {
        font-size: 0.75rem;
        gap: var(--space-sm);
    }

    .midi-event-time {
        min-width: 60px;
    }
}

/* ===================================
   Nav Dropdown
   =================================== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: var(--space-xs) 0;
    z-index: 1000;
    margin-top: var(--space-xs);
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.nav-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.nav-dropdown-item.active {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ===================================
   Speaker Test
   =================================== */
.speaker-control-group {
    margin-bottom: var(--space-lg);
}

.speaker-control-group .device-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.speaker-waveform-btns,
.speaker-channel-btns {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.toggle-btn {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.toggle-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.toggle-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.speaker-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

.speaker-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

.speaker-freq-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ===================================
   Network Test
   =================================== */
.network-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.network-info-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.network-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.network-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.network-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.network-result-card {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.network-result-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.network-result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
}

.network-result-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.network-progress {
    margin-bottom: var(--space-lg);
}

.network-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.network-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.network-progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===================================
   Battery Test
   =================================== */
.battery-gauge-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.battery-gauge {
    display: flex;
    align-items: center;
    gap: 4px;
}

.battery-gauge-tip {
    width: 6px;
    height: 20px;
    background: var(--border);
    border-radius: 0 3px 3px 0;
}

.battery-gauge-body {
    position: relative;
    width: 200px;
    height: 80px;
    border: 3px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battery-gauge-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--accent-success);
    transition: width 0.5s ease;
    width: 0%;
}

.battery-gauge-text {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.battery-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.battery-info-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.battery-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.battery-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.battery-not-supported {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

/* ===================================
   Touch Test
   =================================== */
.touch-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.touch-stat {
    text-align: center;
}

.touch-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.touch-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
}

.touch-canvas-container {
    position: relative;
    margin-bottom: var(--space-lg);
}

.touch-canvas {
    width: 100%;
    height: 400px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: crosshair;
    touch-action: none;
}

.touch-canvas-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.touch-not-supported {
    text-align: center;
    padding: var(--space-md);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

/* ===================================
   Gamepad Test
   =================================== */
.gamepad-placeholder {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.gamepad-placeholder svg {
    opacity: 0.3;
    margin-bottom: var(--space-md);
}

.gamepad-name {
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
    word-break: break-all;
}

.gamepad-section {
    margin-bottom: var(--space-lg);
}

.gamepad-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gamepad-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: var(--space-sm);
}

.gamepad-btn-item {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gamepad-btn-visual {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    margin: 0 auto var(--space-xs);
    transition: all 0.1s;
}

.gamepad-btn-visual.pressed {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(37,99,235,0.4);
}

.gamepad-axes-grid {
    display: grid;
    gap: var(--space-sm);
}

.gamepad-axis-item {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: var(--space-sm);
}

.gamepad-axis-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gamepad-axis-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.gamepad-axis-fill {
    height: 100%;
    background: var(--accent-primary);
    width: 50%;
    transition: width 0.05s;
}

.gamepad-axis-value {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    text-align: right;
}

/* ===================================
   Geolocation Test
   =================================== */
.geo-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.geo-info-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.geo-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.geo-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.geo-timestamp {
    text-align: center;
    padding: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* ===================================
   Vibration Test
   =================================== */
.vibration-presets {
    margin-bottom: var(--space-xl);
}

.vibration-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.vibration-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.vibration-preset-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.vibration-preset-btn:active {
    transform: translateY(0);
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.vibration-preset-icon {
    font-size: 1.5rem;
}

.vibration-preset-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.vibration-custom {
    margin-bottom: var(--space-xl);
}

.vibration-custom-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-sm) 0;
}

.vibration-duration-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 60px;
}

.vibration-custom-btn {
    margin-top: var(--space-sm);
}

.vibration-notice {
    text-align: center;
    padding: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.vibration-not-supported {
    text-align: center;
    padding: var(--space-lg);
    color: var(--accent-error);
    background: rgba(239,68,68,0.05);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

/* ===================================
   Ambient Light Test
   =================================== */
.light-gauge-container {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.light-gauge {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto var(--space-md);
}

.light-gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e293b, #fbbf24, #f59e0b);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 20px;
}

.light-gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(255,255,255,0.5);
}

.light-level-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.light-scale {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.light-not-supported {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

/* ===================================
   Gyroscope Test
   =================================== */
.gyro-3d-container {
    perspective: 600px;
    width: 200px;
    height: 200px;
    margin: 0 auto var(--space-xl);
}

.gyro-3d-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.gyro-cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    opacity: 0.85;
}

.gyro-cube-face.front  { background: rgba(37,99,235,0.7); transform: translateZ(100px); }
.gyro-cube-face.back   { background: rgba(220,38,38,0.7); transform: rotateY(180deg) translateZ(100px); }
.gyro-cube-face.right  { background: rgba(22,163,74,0.7); transform: rotateY(90deg) translateZ(100px); }
.gyro-cube-face.left   { background: rgba(147,51,234,0.7); transform: rotateY(-90deg) translateZ(100px); }
.gyro-cube-face.top    { background: rgba(234,88,12,0.7); transform: rotateX(90deg) translateZ(100px); }
.gyro-cube-face.bottom { background: rgba(8,145,178,0.7); transform: rotateX(-90deg) translateZ(100px); }

.gyro-data-grid,
.gyro-accel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.gyro-data-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.gyro-data-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.gyro-data-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.gyro-data-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-sm);
}

.gyro-data-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    transition: width 0.1s;
}

.gyro-not-supported {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

/* ===================================
   Bluetooth Test
   =================================== */
.bt-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.bt-info-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.bt-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.bt-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.bt-device-id {
    font-size: 0.75rem !important;
    word-break: break-all;
}

.bt-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bt-services-list {
    display: grid;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.bt-service-item {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.bt-not-supported {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

/* Responsive for new tests */
@media (max-width: 768px) {
    .network-info-grid,
    .geo-info-grid,
    .bt-info-grid {
        grid-template-columns: 1fr;
    }

    .network-results {
        grid-template-columns: 1fr;
    }

    .battery-info-grid {
        grid-template-columns: 1fr;
    }

    .gyro-data-grid,
    .gyro-accel-grid {
        grid-template-columns: 1fr;
    }

    .vibration-preset-grid {
        grid-template-columns: 1fr;
    }

    .nav-dropdown-menu {
        position: fixed;
        top: auto;
        right: var(--space-md);
        left: var(--space-md);
    }
}

/* ============================================
   Education Section
   ============================================ */
.education-section {
    max-width: 900px;
    margin: 0 auto var(--space-2xl);
    padding: 0 var(--space-lg);
}

.education-content {
    display: grid;
    gap: var(--space-lg);
}

.edu-article {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.edu-article:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.edu-article h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.edu-article p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.edu-article strong {
    color: var(--text-primary);
    font-weight: 600;
}

.edu-article code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent-primary);
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-section {
    max-width: 900px;
    margin: 0 auto var(--space-2xl);
    padding: 0 var(--space-lg);
}

.faq-list {
    display: grid;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-primary);
}

.faq-item[open] {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.faq-question {
    padding: var(--space-lg) var(--space-xl);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    transition: background 0.2s ease;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-tertiary);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.faq-item[open] .faq-question::after {
    content: '−';
    color: var(--accent-primary);
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-answer {
    padding: 0 var(--space-xl) var(--space-lg);
    animation: faqSlideDown 0.3s ease;
}

.faq-answer p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

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

/* Responsive */
@media (max-width: 768px) {
    .education-section,
    .faq-section {
        padding: 0 var(--space-md);
    }

    .edu-article {
        padding: var(--space-lg);
    }

    .faq-question {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 0 var(--space-lg) var(--space-md);
    }
}

/* ===================================
   Cookie Consent Banner
   =================================== */

/* Overlay */
.cookie-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.cookie-overlay.active {
    display: block;
    opacity: 1;
}

/* Banner */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-lg);
    pointer-events: none;
}

.cookie-banner.active {
    display: block;
    animation: cookieSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-banner.hiding {
    animation: cookieSlideDown 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cookieSlideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

.cookie-banner-content {
    max-width: 560px;
    margin: 0 auto;
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    pointer-events: auto;
}

/* Header */
.cookie-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.cookie-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.cookie-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-message {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Actions */
.cookie-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.cookie-btn {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.cookie-btn-primary {
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-sm), 0 0 12px rgba(37, 99, 235, 0.2);
}

.cookie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(37, 99, 235, 0.3);
}

.cookie-btn-secondary {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
}

.cookie-btn-secondary:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

/* Settings Toggle */
.cookie-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
    padding: var(--space-sm) 0;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.cookie-settings-toggle:hover {
    color: var(--accent-primary);
}

/* Settings Panel */
.cookie-settings-panel {
    display: none;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    animation: fadeIn 0.3s ease;
}

.cookie-settings-panel.active {
    display: block;
}

.cookie-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.cookie-setting-item + .cookie-setting-item {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cookie-setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cookie-setting-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-setting-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: var(--transition-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--accent-primary);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Save Button */
.cookie-btn-save {
    width: 100%;
    margin-top: var(--space-md);
}

/* Responsive */
@media (max-width: 640px) {
    .cookie-banner {
        padding: var(--space-md);
    }

    .cookie-banner-content {
        padding: var(--space-lg);
    }

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

    .cookie-btn {
        width: 100%;
    }
}