/**
 * WordPress Health Check Tool - Premium Styles v6.5.0
 * © 2013 – 2025 G Tech Group S.R.L.S.
 *
 * Features:
 * - Modern glassmorphism design
 * - Dark mode support
 * - Micro-interactions & smooth animations
 * - CSS containment for performance
 * - Mobile-first responsive
 * - WCAG 2.1 AA compliant
 * - Print optimized
 * - Fix suggestions with expandable panels
 * - Code blocks with copy functionality
 */

/* ============================================
   CSS LAYERS (Cascade Control)
   ============================================ */
@layer reset, base, components, utilities;

/* ============================================
   CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Colors - Brand */
    --primary-50: #e6f7fa;
    --primary-100: #b3e8f0;
    --primary-200: #80d9e6;
    --primary-300: #4dcadc;
    --primary-400: #26bdd2;
    --primary-500: #1493b3;
    --primary-600: #0f7490;
    --primary-700: #0a5c75;
    --primary-800: #064559;
    --primary-900: #032e3d;

    /* Colors - Semantic */
    --success-50: #e8f5e9;
    --success-500: #4caf50;
    --success-600: #43a047;
    --warning-50: #fff8e1;
    --warning-500: #ff9800;
    --warning-600: #fb8c00;
    --error-50: #ffebee;
    --error-500: #f44336;
    --error-600: #e53935;
    --info-50: #e3f2fd;
    --info-500: #2196f3;

    /* Colors - Neutral (Light Mode) */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* Semantic Colors */
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-700);
    --text-tertiary: var(--gray-600);
    --text-muted: var(--gray-500);
    --border-color: var(--gray-200);
    --border-color-hover: var(--gray-300);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */

    /* Typography Scale */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --text-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.875rem);
    --text-base: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-xl: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-2xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-3xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-4xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --text-5xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 40px rgba(20, 147, 179, 0.3);

    /* Transitions */
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;

    /* Z-Index Scale */
    --z-behind: -1;
    --z-base: 0;
    --z-above: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* ============================================
   DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #e2e8f0;
        --text-tertiary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --border-color-hover: #475569;
        --glass-bg: rgba(15, 23, 42, 0.85);
        --glass-border: rgba(255, 255, 255, 0.1);
        --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
}

/* ============================================
   FONT LOADING (Critical)
   ============================================ */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================
   RESET & BASE
   ============================================ */
@layer reset {
    *, *::before, *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        font-size: 100%;
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: var(--text-base);
        line-height: var(--leading-normal);
        color: var(--text-primary);
        background: var(--primary-500);
        min-height: 100vh;
        min-height: 100dvh;
        padding: var(--space-4);
        position: relative;
        overflow-x: hidden;
    }

    img, picture, video, canvas, svg {
        display: block;
        max-width: 100%;
        height: auto;
    }

    input, button, textarea, select {
        font: inherit;
    }

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

    button {
        cursor: pointer;
        border: none;
        background: none;
    }
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg,
            var(--primary-500) 0%,
            var(--primary-600) 25%,
            var(--primary-700) 50%,
            var(--primary-800) 75%,
            var(--primary-900) 100%
        );
    background-size: 400% 400%;
    animation: gradient-flow 20s ease infinite;
    z-index: var(--z-behind);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, var(--primary-300) 0%, transparent 30%);
    opacity: 0.3;
    z-index: var(--z-behind);
    pointer-events: none;
}

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: min(1400px, 95vw);
    margin: 0 auto;
    position: relative;
    z-index: var(--z-base);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-xl);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.logo {
    height: 48px;
    width: auto;
    transition: transform var(--duration-normal) var(--ease-bounce);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    position: relative;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-out);
    overflow: hidden;
    isolation: isolate;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-500);
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--duration-normal) var(--ease-out);
    z-index: -1;
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: white;
    transform: translateY(-2px);
}

.nav-link.cta {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: white;
    font-weight: var(--font-semibold);
    box-shadow: 0 4px 15px rgba(20, 147, 179, 0.4);
}

.nav-link.cta:hover {
    box-shadow: 0 6px 25px rgba(20, 147, 179, 0.5);
}

.nav-link.cta::before {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    text-align: center;
    padding: var(--space-8) var(--space-4) var(--space-10);
    background: linear-gradient(135deg, #1493b3 0%, #0f7490 50%, #0a5c75 100%);
    margin: calc(-1 * var(--space-4));
    margin-bottom: var(--space-6);
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
    border-radius: var(--radius-2xl);
}

.hero-badge {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    color: #ffffff !important;
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3), 0 4px 60px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.03em;
    line-height: 1.1;
    -webkit-text-fill-color: #ffffff;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MAIN CARD
   ============================================ */
.main-card {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-2xl);
    position: relative;
    overflow: hidden;
}

.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg,
        var(--primary-400),
        var(--primary-500),
        var(--primary-300),
        var(--primary-600),
        var(--primary-400)
    );
    background-size: 300% 100%;
    animation: shimmer-bar 3s linear infinite;
}

@keyframes shimmer-bar {
    0% { background-position: 300% 0; }
    100% { background-position: 0% 0; }
}

.main-card::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-100) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    text-align: center;
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-lg);
    max-width: 700px;
    margin: 0 auto var(--space-10);
    line-height: var(--leading-relaxed);
}

/* ============================================
   FORM
   ============================================ */
.form-group {
    margin-bottom: var(--space-6);
}

label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

input[type="text"] {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: var(--text-base);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-out);
}

input[type="text"]:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-primary);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px var(--primary-100);
}

@media (prefers-color-scheme: dark) {
    input[type="text"]:focus {
        box-shadow: 0 0 0 4px rgba(20, 147, 179, 0.2);
    }
}

/* Button */
.btn {
    position: relative;
    width: 100%;
    padding: var(--space-4) var(--space-8);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px rgba(20, 147, 179, 0.4);
    transition: all var(--duration-normal) var(--ease-out);
    overflow: hidden;
    isolation: isolate;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    z-index: -1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--duration-slow), height var(--duration-slow);
}

@media (hover: hover) {
    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 30px rgba(20, 147, 179, 0.5);
    }

    .btn:hover::before {
        opacity: 1;
    }

    .btn:hover::after {
        width: 400px;
        height: 400px;
    }
}

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

.btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: slide-in-down var(--duration-slow) var(--ease-out);
}

@keyframes slide-in-down {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
}

.alert-error {
    background: linear-gradient(135deg, var(--error-50), #fce4ec);
    color: var(--error-600);
    border-left: 4px solid var(--error-500);
}

.alert-info {
    background: linear-gradient(135deg, var(--info-50), #e1f5fe);
    color: #0277bd;
    border-left: 4px solid var(--info-500);
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    text-align: center;
    padding: var(--space-8);
    display: none;
}

.loading.active {
    display: block;
    animation: fade-in var(--duration-normal) var(--ease-out);
}

@keyframes fade-in {
    from { opacity: 0; }
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--primary-100);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    margin: 0 auto var(--space-4);
    animation: spin 0.8s linear infinite;
}

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

.loading p {
    color: var(--primary-600);
    font-weight: var(--font-medium);
}

.loading p:last-child {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

/* New loading styles */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-6);
}

.loading-spinner svg {
    animation: spin 1s linear infinite;
    color: var(--primary-500);
    width: 56px;
    height: 56px;
}

/* Pulsing dots animation */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-4);
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary-500);
    border-radius: 50%;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

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

@keyframes pulse-dot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress bar animation */
.loading-progress {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    margin: var(--space-4) auto;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600), var(--primary-400));
    background-size: 200% 100%;
    animation: progress-flow 1.5s linear infinite;
    border-radius: var(--radius-full);
}

@keyframes progress-flow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.loading-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--primary-600);
    margin-bottom: var(--space-2);
}

.loading-subtitle {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-4);
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    opacity: 0;
    animation: step-appear 0.5s ease forwards;
}

.loading-step:nth-child(1) { animation-delay: 0.5s; }
.loading-step:nth-child(2) { animation-delay: 1.5s; }
.loading-step:nth-child(3) { animation-delay: 2.5s; }
.loading-step:nth-child(4) { animation-delay: 3.5s; }

@keyframes step-appear {
    to { opacity: 1; }
}

.loading-step svg {
    color: var(--primary-500);
    animation: none;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   SEARCH FORM (New Design)
   ============================================ */
.search-form {
    max-width: 700px;
    margin: 0 auto var(--space-10);
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: var(--space-2);
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.search-wrapper:hover {
    border-color: var(--primary-300);
    background: var(--bg-primary);
}

.search-wrapper:focus-within {
    border-color: var(--primary-500);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px var(--primary-100), 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    color: var(--text-muted);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-3) 0;
    font-size: var(--text-lg);
    color: var(--text-primary);
    min-width: 0;
}

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

.search-input:focus {
    outline: none;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    white-space: nowrap;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    transform: translateX(2px);
}

.search-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.btn-arrow {
    transition: transform var(--duration-normal) var(--ease-out);
}

.search-btn:hover .btn-arrow {
    transform: translateX(4px);
}

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

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    margin-top: var(--space-12);
    padding-top: var(--space-10);
    border-top: 1px solid var(--border-color);
}

.features-title {
    text-align: center;
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.features-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-lg);
    margin-bottom: var(--space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.feature-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.feature-icon-security { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.feature-icon-seo { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1565c0; }
.feature-icon-performance { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: #f57f17; }
.feature-icon-wordpress { background: linear-gradient(135deg, #e1f5fe, #b3e5fc); color: #0277bd; }
.feature-icon-mobile { background: linear-gradient(135deg, #fce4ec, #f8bbd9); color: #c2185b; }
.feature-icon-accessibility { background: linear-gradient(135deg, #ede7f6, #d1c4e9); color: #5e35b1; }

.feature-card h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.features-cta {
    text-align: center;
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--primary-50), var(--info-50));
    border-radius: var(--radius-xl);
    border: 1px solid var(--primary-100);
}

.features-cta h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--primary-700);
    margin-bottom: var(--space-3);
}

.features-cta p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-section {
    margin-top: var(--space-12);
    padding-top: var(--space-10);
    border-top: 1px solid var(--border-color);
}

.how-section h2 {
    text-align: center;
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-10);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0 auto var(--space-4);
}

.step h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.step p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* ============================================
   TRUST SECTION
   ============================================ */
.trust-section {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.trust-badge svg {
    color: var(--primary-500);
}

/* ============================================
   SCORE CIRCLE (New Design)
   ============================================ */
.score-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: var(--space-6) auto;
}

.score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: var(--score-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: calc(283 - (283 * var(--percentage)) / 100);
    transition: stroke-dashoffset 1s ease-out;
}

.score-circle .score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    color: var(--score-color);
}

.score-circle .score-value span {
    font-size: var(--text-xl);
}

.score-url {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    word-break: break-all;
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* ============================================
   STAT CARDS (New Design)
   ============================================ */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-success .stat-icon { background: var(--success-50); color: var(--success-500); }
.stat-warning .stat-icon { background: var(--warning-50); color: var(--warning-500); }
.stat-error .stat-icon { background: var(--error-50); color: var(--error-500); }
.stat-info .stat-icon { background: var(--info-50); color: var(--info-500); }

.results-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-color);
}

/* Alert success */
.alert-success {
    background: linear-gradient(135deg, var(--success-50), #e8f5e9);
    color: var(--success-600);
    border-left: 4px solid var(--success-500);
}

/* ============================================
   RESULTS CONTAINER
   ============================================ */
.results-container {
    margin-top: var(--space-10);
    animation: fade-in-up var(--duration-slow) var(--ease-out);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* ============================================
   SCORE CARD
   ============================================ */
.score-card {
    position: relative;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: white;
    padding: var(--space-12);
    border-radius: var(--radius-2xl);
    text-align: center;
    margin-bottom: var(--space-8);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(20, 147, 179, 0.4);
}

.score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255,255,255,0.1) 60deg,
        transparent 120deg
    );
    animation: rotate-glow 10s linear infinite;
}

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

.score-title {
    position: relative;
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
    opacity: 0.95;
}

.score-value {
    position: relative;
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    margin: var(--space-4) 0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    letter-spacing: -0.02em;
}

.score-bar {
    position: relative;
    max-width: 500px;
    height: 16px;
    margin: var(--space-6) auto;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #fff, rgba(255,255,255,0.8));
    border-radius: var(--radius-full);
    transition: width 1.5s var(--ease-out);
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    position: relative;
}

.score-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.score-message {
    position: relative;
    font-size: var(--text-lg);
    margin-top: var(--space-4);
    opacity: 0.95;
}

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--bg-primary);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all var(--duration-normal) var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   RESULTS GRID
   ============================================ */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.result-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-md);
    border-left: 4px solid;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: currentColor;
    opacity: 0.03;
    border-radius: 50%;
    transform: translate(30px, -30px);
}

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

.result-card.success {
    border-color: var(--success-500);
    background: linear-gradient(to right, var(--success-50), var(--bg-primary));
}

.result-card.warning {
    border-color: var(--warning-500);
    background: linear-gradient(to right, var(--warning-50), var(--bg-primary));
}

.result-card.error {
    border-color: var(--error-500);
    background: linear-gradient(to right, var(--error-50), var(--bg-primary));
}

.result-title {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: var(--leading-snug);
}

.result-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: var(--leading-normal);
}

.result-suggestion {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
    line-height: var(--leading-relaxed);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    text-align: center;
    padding: var(--space-12);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: var(--radius-2xl);
    margin-top: var(--space-8);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, var(--primary-100) 0%, transparent 70%);
    opacity: 0.5;
}

.cta-section h3 {
    position: relative;
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--primary-600);
    margin-bottom: var(--space-4);
}

.cta-section p {
    position: relative;
    max-width: 600px;
    margin: 0 auto var(--space-6);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.cta-button {
    position: relative;
    display: inline-block;
    padding: var(--space-4) var(--space-10);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px rgba(20, 147, 179, 0.4);
    transition: all var(--duration-normal) var(--ease-out);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(20, 147, 179, 0.5);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    color: white;
    padding: var(--space-10) 0;
    margin-top: var(--space-12);
}

.footer p {
    margin: var(--space-1) 0;
    opacity: 0.9;
    font-size: var(--text-sm);
}

.footer a {
    font-weight: var(--font-semibold);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: opacity var(--duration-fast);
}

.footer a:hover {
    opacity: 0.8;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-card {
        padding: var(--space-8);
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: var(--space-3);
    }

    .header {
        padding: var(--space-4);
    }

    .header-content {
        justify-content: center;
        text-align: center;
    }

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

    .nav-link {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    .main-card {
        padding: var(--space-5);
        border-radius: var(--radius-xl);
    }

    .score-card {
        padding: var(--space-8);
    }

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

    .cta-section {
        padding: var(--space-8);
    }

    .cta-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .result-card {
        padding: var(--space-4);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    body {
        background: white;
        padding: 0;
    }

    body::before, body::after {
        display: none;
    }

    .header, .footer, .cta-section, .nav-menu, .btn, .loading {
        display: none !important;
    }

    .main-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .result-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .score-card {
        background: white !important;
        color: black !important;
        border: 2px solid var(--primary-500);
    }

    .fix-content {
        display: block !important;
    }
}

/* ============================================
   FIX SUGGESTIONS (Expandable)
   ============================================ */
.result-fix {
    margin-top: var(--space-4);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-4);
}

.fix-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, var(--primary-50), var(--info-50));
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-md);
    color: var(--primary-700);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.fix-toggle:hover {
    background: linear-gradient(135deg, var(--primary-100), var(--info-50));
    border-color: var(--primary-300);
    transform: translateY(-1px);
}

.fix-toggle .toggle-icon {
    font-size: 0.8em;
    transition: transform var(--transition-fast);
}

.fix-content {
    margin-top: var(--space-4);
    padding: var(--space-5);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease;
}

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

.fix-content h4 {
    margin: 0 0 var(--space-4) 0;
    color: var(--primary-600);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--primary-200);
}

.fix-steps,
.fix-plugins,
.fix-code,
.fix-warning,
.fix-manual {
    margin-bottom: var(--space-4);
}

.fix-steps strong,
.fix-plugins strong,
.fix-code strong {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.fix-steps ol {
    margin: 0;
    padding-left: var(--space-6);
}

.fix-steps li {
    margin-bottom: var(--space-2);
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.fix-plugins ul {
    margin: 0;
    padding-left: var(--space-6);
    list-style-type: none;
}

.fix-plugins li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-4);
    position: relative;
}

.fix-plugins li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-500);
}

.fix-plugins a {
    color: var(--primary-600);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.fix-plugins a:hover {
    color: var(--primary-800);
    text-decoration: underline;
}

.fix-plugins small {
    color: var(--text-muted);
    font-size: var(--text-xs);
    margin-left: var(--space-2);
}

.fix-code {
    position: relative;
}

.fix-code pre {
    margin: var(--space-2) 0 var(--space-3) 0;
    padding: var(--space-4);
    background: var(--gray-900);
    border-radius: var(--radius-md);
    overflow-x: auto;
    max-height: 200px;
}

.fix-code code {
    color: #00ff88;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: var(--text-xs);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.fix-warning {
    padding: var(--space-3) var(--space-4);
    background: var(--warning-50);
    border-left: 4px solid var(--warning-500);
    border-radius: var(--radius-sm);
    color: var(--warning-600);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.fix-manual {
    padding: var(--space-3) var(--space-4);
    background: var(--info-50);
    border-left: 4px solid var(--info-500);
    border-radius: var(--radius-sm);
    color: var(--primary-700);
    font-size: var(--text-sm);
}

/* Dark mode per fix */
@media (prefers-color-scheme: dark) {
    .fix-toggle {
        background: linear-gradient(135deg, rgba(20, 147, 179, 0.2), rgba(33, 150, 243, 0.1));
        border-color: var(--primary-600);
        color: var(--primary-300);
    }

    .fix-toggle:hover {
        background: linear-gradient(135deg, rgba(20, 147, 179, 0.3), rgba(33, 150, 243, 0.2));
    }

    .fix-content {
        background: rgba(30, 41, 59, 0.8);
        border-color: var(--gray-700);
    }

    .fix-content h4 {
        color: var(--primary-300);
        border-bottom-color: var(--primary-700);
    }

    .fix-steps li,
    .fix-plugins li {
        color: var(--gray-300);
    }

    .fix-plugins a {
        color: var(--primary-300);
    }

    .fix-code pre {
        background: #0d1117;
    }

    .fix-warning {
        background: rgba(255, 152, 0, 0.15);
        border-left-color: var(--warning-500);
        color: #ffb74d;
    }

    .fix-manual {
        background: rgba(33, 150, 243, 0.15);
        border-left-color: var(--info-500);
        color: #64b5f6;
    }
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s var(--ease-out);
}

.cookie-banner[style*="display: none"] {
    display: none !important;
}

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

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.cookie-banner-text p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.cookie-banner-text a {
    color: var(--primary-600);
    text-decoration: underline;
    transition: color var(--duration-fast);
}

.cookie-banner-text a:hover {
    color: var(--primary-800);
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.cookie-btn {
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: 2px solid transparent;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

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

.cookie-btn-necessary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-hover);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--primary-600);
    border-color: var(--primary-500);
}

.cookie-btn-settings:hover {
    background: var(--primary-50);
    border-color: var(--primary-600);
}

/* ============================================
   COOKIE SETTINGS MODAL
   ============================================ */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: modalSlideIn 0.3s var(--ease-out);
}

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

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.cookie-modal-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--text-xl);
    transition: all var(--duration-fast);
    border: none;
    cursor: pointer;
}

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

.cookie-modal-body {
    padding: var(--space-6);
}

.cookie-modal-body > p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    border: 1px solid var(--border-color);
}

.cookie-option-info h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.cookie-option-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: background var(--duration-normal);
}

.cookie-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--duration-normal) var(--ease-out);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-switch input:checked + .cookie-slider {
    background: var(--success-500);
}

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

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

.cookie-modal-footer {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
}

/* ============================================
   TERMS CHECKBOX (Form)
   ============================================ */
.terms-checkbox {
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
    display: flex;
    justify-content: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    text-align: left;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
    margin-top: 1px;
}

.checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--duration-fast) var(--ease-out);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-label input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label input:focus-visible + .checkbox-custom {
    outline: 3px solid var(--primary-300);
    outline-offset: 2px;
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary-400);
}

.checkbox-text {
    flex: 1;
}

.checkbox-text a {
    color: var(--primary-600);
    text-decoration: underline;
    font-weight: var(--font-medium);
    transition: color var(--duration-fast);
}

.checkbox-text a:hover {
    color: var(--primary-800);
}

/* Validation styling */
.terms-checkbox.invalid .checkbox-custom {
    border-color: var(--error-500);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.terms-error {
    color: var(--error-500);
    font-size: var(--text-xs);
    margin-top: var(--space-2);
    display: none;
}

.terms-checkbox.invalid + .terms-error {
    display: block;
}

/* ============================================
   FOOTER LINKS
   ============================================ */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.footer-links a,
.footer-links .link-button {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-sm);
    transition: all var(--duration-fast);
    border-bottom: 1px solid transparent;
}

.footer-links a:hover,
.footer-links .link-button:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    display: inline;
}

/* ============================================
   DARK MODE - Cookie & Terms
   ============================================ */
@media (prefers-color-scheme: dark) {
    .cookie-banner {
        background: var(--bg-secondary);
        border-top-color: var(--border-color);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
    }

    .cookie-banner-text a {
        color: var(--primary-400);
    }

    .cookie-btn-necessary {
        background: var(--bg-tertiary);
        border-color: var(--border-color);
    }

    .cookie-btn-settings {
        color: var(--primary-400);
        border-color: var(--primary-600);
    }

    .cookie-btn-settings:hover {
        background: rgba(20, 147, 179, 0.2);
    }

    .cookie-modal {
        background: rgba(0, 0, 0, 0.8);
    }

    .cookie-modal-content {
        background: var(--bg-secondary);
    }

    .cookie-option {
        background: var(--bg-tertiary);
        border-color: var(--border-color);
    }

    .cookie-slider {
        background: var(--gray-600);
    }

    .checkbox-text a {
        color: var(--primary-400);
    }
}

/* ============================================
   MOBILE RESPONSIVE - Cookie, Terms & Forms
   ============================================ */
@media (max-width: 768px) {
    /* Cookie Banner Mobile */
    .cookie-banner {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .cookie-banner-content {
        padding: var(--space-4);
        gap: var(--space-3);
    }

    .cookie-banner-text h3 {
        font-size: var(--text-base);
    }

    .cookie-banner-text p {
        font-size: var(--text-xs);
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
        gap: var(--space-2);
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
    }

    /* Cookie Modal Mobile */
    .cookie-modal-content {
        margin: var(--space-4);
        max-height: calc(100vh - var(--space-8));
        border-radius: var(--radius-xl);
    }

    .cookie-modal-header {
        padding: var(--space-4);
    }

    .cookie-modal-header h3 {
        font-size: var(--text-lg);
    }

    .cookie-modal-body {
        padding: var(--space-4);
    }

    .cookie-option {
        flex-direction: column;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .cookie-option-info {
        order: 2;
    }

    .cookie-switch {
        order: 1;
        align-self: flex-start;
    }

    .cookie-modal-footer {
        padding: var(--space-4);
    }

    /* Terms Checkbox Mobile */
    .terms-checkbox {
        margin-top: var(--space-3);
        padding: 0 var(--space-2);
    }

    .checkbox-label {
        font-size: var(--text-xs);
        gap: var(--space-2);
    }

    .checkbox-custom {
        width: 20px;
        height: 20px;
    }

    /* Search Form Mobile */
    .search-wrapper {
        flex-direction: column;
        padding: var(--space-3);
        border-radius: var(--radius-xl);
    }

    .search-icon {
        display: none;
    }

    .search-input {
        width: 100%;
        text-align: center;
        padding: var(--space-3);
        font-size: var(--text-base);
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        margin-top: var(--space-2);
        padding: var(--space-4);
    }

    .search-hint {
        font-size: var(--text-xs);
    }

    /* Footer Mobile */
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: var(--space-3);
    }

    .footer-links a,
    .footer-links .link-button {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    /* Extra small mobile */
    .cookie-banner-content {
        padding: var(--space-3);
    }

    .cookie-banner-text h3 {
        font-size: var(--text-sm);
        margin-bottom: var(--space-1);
    }

    .cookie-banner-text p {
        font-size: 11px;
        line-height: 1.4;
    }

    .cookie-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .checkbox-label {
        font-size: 11px;
    }

    .checkbox-custom {
        width: 18px;
        height: 18px;
    }

    .checkbox-custom::after {
        width: 5px;
        height: 8px;
        border-width: 0 2px 2px 0;
    }

    .terms-checkbox {
        margin-top: var(--space-2);
    }
}
