/* ============================================
   GUÍA DE APUESTAS DEPORTIVAS - STYLES.CSS
   Autor: Fran Exposito Alentorn
   Web: librodeapuestasdeportivas.com
   ============================================ */

/* ============================================
   1. CSS VARIABLES & ROOT
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #dc2626;
    --secondary-light: #ef4444;
    --accent: #16a34a;
    --accent-light: #22c55e;
    
    /* Neutral Colors */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Semantic Colors */
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #ea580c;
    --warning-light: #ffedd5;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0284c7;
    --info-light: #e0f2fe;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    --gradient-secondary: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-overlay: 1000;
    --z-modal: 5000;
    --z-age-gate: 10000;
    --z-toast: 15000;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

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

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-800);
    background-color: var(--gray-50);
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Selection */
::selection {
    background: var(--secondary);
    color: var(--white);
}

/* ============================================
   3. AGE GATE OVERLAY
   ============================================ */
.age-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(12px);
    z-index: var(--z-age-gate);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    opacity: 1;
    visibility: visible;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
    overflow-y: auto;
}

.age-gate-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.age-gate-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: ageGateSlideIn 0.5s ease-out;
    margin: auto;
}

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

.age-gate-logo {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.age-gate-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.age-gate-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.age-gate-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-left: 4px solid var(--warning);
}

.age-gate-warning-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.age-gate-warning-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.age-gate-warning-detail {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.age-gate-warning-detail strong {
    color: var(--danger);
}

.cookies-section {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    text-align: left;
}

.cookies-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-sm);
}

.cookies-text {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.cookies-link {
    color: var(--info);
    text-decoration: underline;
}

.cookies-link:hover {
    color: var(--secondary);
}

/* Age Gate Buttons - ALL EQUAL VISIBILITY */
.age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.age-gate-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.age-gate-btn-necessary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.age-gate-btn-necessary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.age-gate-btn-all {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

.age-gate-btn-all:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.age-gate-btn-reject {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.age-gate-btn-reject:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    transform: translateY(-2px);
}

.age-gate-legal {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.age-gate-legal a {
    color: var(--info);
    text-decoration: underline;
}

/* Age Gate Rejected State */
.age-gate-rejected {
    text-align: center;
    padding: var(--space-xl);
}

.age-gate-rejected-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}

.age-gate-rejected-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--danger);
    margin-bottom: var(--space-md);
}

.age-gate-rejected-text {
    color: var(--gray-600);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

/* ============================================
   4. NAVIGATION
   ============================================ */
.navbar {
    background: var(--gradient-primary);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-lg);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar-brand-icon {
    font-size: 1.5rem;
}

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

.navbar-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    transition: var(--transition);
}

.navbar-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

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

.navbar-progress-text {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.navbar-progress-bar {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.navbar-progress-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    width: 0%;
}

/* ============================================
   5. HERO SECTION
   ============================================ */
.hero {
    background: var(--gradient-hero);
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    max-width: 600px;
    margin: 0 auto;
}

.hero-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.hero-stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.hero-stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.hero-stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-xs);
    font-weight: 500;
}

/* ============================================
   6. PROGRESS PANEL
   ============================================ */
.progress-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: calc(-1 * var(--space-xl)) var(--space-lg) var(--space-2xl);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.progress-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.progress-panel-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.progress-stats {
    display: flex;
    gap: var(--space-xl);
}

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

.progress-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
}

.progress-stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-container {
    background: var(--gray-200);
    border-radius: var(--radius-full);
    height: 12px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    width: 0%;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

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

/* ============================================
   7. SECTIONS & CHAPTERS
   ============================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-3xl);
}

.section {
    margin-bottom: var(--space-3xl);
}

.section-header {
    margin-bottom: var(--space-xl);
    position: relative;
}

.section-number {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    padding-left: 50px;
}

.section-description {
    color: var(--gray-600);
    padding-left: 50px;
    margin-bottom: var(--space-sm);
}

.difficulty-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 50px;
}

.difficulty-badge.beginner {
    background: var(--success-light);
    color: var(--success);
}

.difficulty-badge.intermediate {
    background: var(--warning-light);
    color: var(--warning);
}

.difficulty-badge.advanced {
    background: var(--danger-light);
    color: var(--danger);
}

.difficulty-badge.essential {
    background: var(--info-light);
    color: var(--info);
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

/* ============================================
   8. CHAPTER CARDS
   ============================================ */
.chapter-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gray-300);
    transition: var(--transition);
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.chapter-card:hover::before {
    background: var(--secondary);
}

.chapter-card.completed::before {
    background: var(--accent);
}

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

.chapter-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chapter-check {
    width: 28px;
    height: 28px;
    background: var(--gray-200);
    color: var(--gray-400);
    border-radius: var(--radius-full);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.chapter-card.completed .chapter-check {
    display: flex;
    background: var(--accent);
    color: var(--white);
}

.chapter-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.chapter-card-description {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.chapter-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--gray-500);
}

.chapter-card-meta .difficulty-badge {
    margin-left: 0;
}

/* ============================================
   9. AD BANNER SYSTEM (Conditional)
   ============================================ */
.ad-banner-space {
    display: none; /* Hidden by default */
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--primary) 100%);
    border: 2px dashed var(--gray-600);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    margin: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.ad-banner-space.active {
    display: block;
}

.ad-banner-space::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.ad-banner-label {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    font-size: 0.65rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-banner-content {
    padding: var(--space-md) 0;
}

.ad-banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.ad-banner-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-md);
}

.ad-banner-cta {
    display: inline-block;
    background: var(--gradient-secondary);
    color: var(--white);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.ad-banner-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.ad-banner-disclaimer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-banner-disclaimer p {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin: var(--space-xs) 0;
}

.age-badge {
    display: inline-block;
    background: var(--danger);
    color: var(--white);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: var(--space-xs);
}

/* ============================================
   10. ACHIEVEMENTS SECTION
   ============================================ */
.achievements-section {
    margin: var(--space-3xl) 0;
    padding: var(--space-2xl);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.achievements-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.achievement {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition);
    opacity: 0.5;
    filter: grayscale(100%);
    border: 2px solid transparent;
}

.achievement.unlocked {
    opacity: 1;
    filter: grayscale(0%);
    background: var(--white);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.achievement-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.achievement-description {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* ============================================
   11. AUTHOR SECTION
   ============================================ */
.author-section {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin: var(--space-3xl) 0;
    color: var(--white);
}

.author-avatar {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.author-info {
    flex: 1;
}

.author-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.author-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.author-bio {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.author-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.author-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   12. RESPONSIBLE GAMBLING BANNER
   ============================================ */
.responsible-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    margin: var(--space-2xl) 0;
    border: 2px solid #f59e0b;
}

.responsible-banner-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.responsible-banner-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.responsible-banner-text {
    color: var(--gray-700);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.responsible-banner-phone {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--danger);
    color: var(--white);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.responsible-banner-phone:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
}

/* ============================================
   13. FOOTER
   ============================================ */
.footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 0.95rem;
}

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

.footer-section ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-section ul a:hover {
    color: var(--white);
    padding-left: var(--space-sm);
}

/* Legal Badges Section */
.footer-legal-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.legal-badge-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0.8;
    transition: var(--transition);
}

.legal-badge-link:hover {
    opacity: 1;
}

.legal-badge-link img {
    height: 45px;
    width: auto;
}

.badge-18 {
    width: 45px;
    height: 45px;
    border: 3px solid var(--danger);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--danger);
    font-weight: 800;
    font-size: 0.9rem;
}

/* Footer Legal Text */
.footer-legal {
    text-align: center;
    padding: var(--space-xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-lg);
}

.footer-legal p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: var(--space-sm) 0;
    line-height: 1.6;
}

.footer-legal strong {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: var(--space-xs) 0;
}

/* ============================================
   14. CHAPTER PAGE STYLES
   ============================================ */
.chapter-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-3xl);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--gray-600);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary);
}

.breadcrumb-separator {
    color: var(--gray-400);
}

.breadcrumb-current {
    color: var(--gray-800);
    font-weight: 500;
}

/* Chapter Header */
.chapter-header {
    background: var(--gradient-primary);
    padding: var(--space-2xl) 0;
    margin-bottom: 0;
}

.chapter-header .chapter-number {
    display: inline-block;
    background: var(--gradient-secondary);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.chapter-header h1,
.chapter-header .chapter-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.chapter-header .subtitle,
.chapter-header .chapter-subtitle {
    font-size: 1.15rem;
    color: var(--gray-300);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

/* Chapter Content */
.chapter-content {
    color: var(--gray-800);
}

.chapter-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--gray-200);
}

.chapter-content h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.chapter-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.chapter-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.chapter-content ul, .chapter-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
}

.chapter-content ul {
    list-style: disc;
}

.chapter-content ol {
    list-style: decimal;
}

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

.chapter-content strong {
    color: var(--gray-900);
    font-weight: 600;
}

.chapter-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chapter-content a:hover {
    color: var(--secondary-light);
}

/* Info Boxes */
.info-box {
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    border-left: 4px solid;
}

.info-box-title {
    font-weight: 700;
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box.tip {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: var(--success);
}

.info-box.tip .info-box-title {
    color: var(--success);
}

.info-box.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: var(--warning);
}

.info-box.warning .info-box-title {
    color: var(--warning);
}

.info-box.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: var(--danger);
}

.info-box.danger .info-box-title {
    color: var(--danger);
}

.info-box.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--info);
}

.info-box.info .info-box-title {
    color: var(--info);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
}

.stat-card-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: var(--space-xs);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Formula Box */
.formula-box {
    background: var(--gray-900);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    text-align: center;
}

.formula {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--secondary-light);
    margin-bottom: var(--space-sm);
}

.formula-description {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: 0;
}

/* Tables */
.chapter-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: 0.95rem;
}

.chapter-table th,
.chapter-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.chapter-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-800);
}

.chapter-table tr:hover td {
    background: var(--gray-50);
}

/* Code Blocks */
.code-block {
    background: var(--gray-900);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--gray-300);
    line-height: 1.6;
}

/* Example Box */
.example-box {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.example-box-title {
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Complete Chapter Button */
.complete-chapter-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: var(--space-2xl) auto;
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-success);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.complete-chapter-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.complete-chapter-btn.completed {
    background: var(--gray-400);
    cursor: default;
}

.complete-chapter-btn.completed:hover {
    transform: none;
    box-shadow: none;
}

/* Chapter Navigation */
.chapter-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

.chapter-nav-link {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: var(--transition);
}

.chapter-nav-link:hover {
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.chapter-nav-link.prev {
    text-align: left;
}

.chapter-nav-link.next {
    text-align: right;
}

.chapter-nav-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.chapter-nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xs);
}

.chapter-nav-title {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
}

/* ============================================
   15. CALCULATORS PAGE
   ============================================ */
.calculators-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-3xl);
}

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

.calculators-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.calculators-header p {
    font-size: 1.15rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.calculators-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.calculator {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
}

.calculator-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.calculator-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.calculator-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.calculator-description {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.calculator-form {
    margin-bottom: var(--space-xl);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

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

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select {
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.calculator-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: var(--gradient-secondary);
    color: var(--white);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    width: 100%;
}

.calculator-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.calculator-result {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

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

.result-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--radius);
}

.result-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.result-value.positive {
    color: var(--success);
}

.result-value.negative {
    color: var(--danger);
}

.result-status {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
}

.result-status.success {
    background: var(--success-light);
    color: var(--success);
}

.result-status.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.result-status.warning {
    background: var(--warning-light);
    color: var(--warning);
}

/* ============================================
   16. TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: toastSlideIn 0.3s ease, toastFadeOut 0.3s ease 2.7s forwards;
    max-width: 350px;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    font-weight: 500;
    color: var(--gray-800);
}

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

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ============================================
   17. LEGAL PAGES
   ============================================ */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-3xl);
}

.legal-page h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
    text-align: center;
}

.legal-page .last-updated {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: var(--space-2xl);
}

.legal-page h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.legal-page h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.legal-page p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
    color: var(--gray-700);
}

.legal-page ul {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
    list-style: disc;
}

.legal-page li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
    color: var(--gray-700);
}

.legal-page a {
    color: var(--secondary);
    text-decoration: underline;
}

/* Data Protection Box */
.data-protection-box {
    background: var(--info-light);
    border: 1px solid var(--info);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.data-protection-box h4 {
    color: var(--info);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

/* ============================================
   18. UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }
.visible { display: block !important; }

.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;
}

/* ============================================
   19. ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

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

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   20. RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets & Small Desktops */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-stats {
        max-width: 500px;
    }
    
    .progress-panel {
        margin-left: var(--space-lg);
        margin-right: var(--space-lg);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-md);
    }
    
    .navbar-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .hero {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 350px;
    }
    
    .progress-panel {
        padding: var(--space-lg);
    }
    
    .progress-panel-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-number {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: var(--space-md);
    }
    
    .section-title,
    .section-description,
    .difficulty-badge {
        padding-left: 0;
        margin-left: 0;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .author-section {
        flex-direction: column;
        text-align: center;
    }
    
    .author-links {
        justify-content: center;
    }
    
    .chapter-header h1 {
        font-size: 2rem;
    }
    
    .chapter-nav {
        grid-template-columns: 1fr;
    }
    
    .age-gate-container {
        padding: var(--space-xl);
    }
    
    .age-gate-title {
        font-size: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-legal-badges {
        gap: var(--space-md);
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .navbar-brand span:not(.navbar-brand-icon) {
        display: none;
    }
    
    .hero {
        padding: var(--space-xl) var(--space-md);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        max-width: 200px;
    }
    
    .hero-stat {
        padding: var(--space-md);
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .progress-panel {
        margin-top: calc(-1 * var(--space-md));
        padding: var(--space-md);
    }
    
    .progress-stats {
        gap: var(--space-lg);
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .chapter-card {
        padding: var(--space-lg);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calculator {
        padding: var(--space-lg);
    }
    
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .toast-container {
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
    }
    
    .toast {
        max-width: 100%;
    }
    
    .chapter-header h1 {
        font-size: 1.5rem;
    }
    
    .chapter-content h2 {
        font-size: 1.35rem;
    }
    
    .chapter-content h3 {
        font-size: 1.15rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .legal-page h1 {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .age-gate-overlay,
    .toast-container,
    .complete-chapter-btn,
    .chapter-nav,
    .ad-banner-space,
    .responsible-banner {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    .chapter-page {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
    /* Placeholder for future dark mode implementation */
}

/* ============================================
   CHAPTER PAGE SPECIFIC STYLES
   ============================================ */

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

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

.nav-logo .logo-icon {
    font-size: 1.5rem;
}

.nav-logo .logo-text {
    font-family: var(--font-display);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-links a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--white);
}

.nav-progress {
    width: 100px;
    height: 4px;
    background: var(--gray-700);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.nav-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.5s ease;
}

/* Chapter Breadcrumb */
.chapter-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.chapter-breadcrumb a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition);
}

.chapter-breadcrumb a:hover {
    color: var(--white);
    text-decoration: underline;
}

.chapter-breadcrumb span {
    color: var(--gray-500);
}

/* Chapter Title & Meta */
.chapter-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.chapter-subtitle {
    font-size: 1.2rem;
    color: var(--gray-300);
    margin-bottom: var(--space-lg);
}

.chapter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9rem;
    color: var(--gray-400);
    background: rgba(255,255,255,0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
}

.meta-icon {
    font-size: 1rem;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

/* Table of Contents */
.toc {
    position: relative;
}

.toc-sticky {
    position: sticky;
    top: 100px;
}

.toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

.toc-list li {
    margin-bottom: var(--space-sm);
}

.toc-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 2px solid var(--gray-200);
    transition: var(--transition);
}

.toc-link:hover,
.toc-link.active {
    color: var(--secondary);
    border-left-color: var(--secondary);
    background: var(--gray-50);
}

/* Chapter Article */
.chapter-article {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
}

/* Content Sections */
.content-section {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--gray-200);
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: var(--space-lg);
}

.content-section h3 {
    font-size: 1.25rem;
    color: var(--gray-800);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

.content-section p {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.content-section ul,
.content-section ol {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.content-section li {
    margin-bottom: var(--space-sm);
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-left: 4px solid var(--secondary);
    padding: var(--space-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-lg) 0;
}

.highlight-box h4 {
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.highlight-box p {
    margin-bottom: var(--space-sm);
    color: var(--gray-700);
}

/* Example Box Updates */
.example-box {
    background: var(--info-light);
    border: 1px solid var(--info);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.example-box h4 {
    color: var(--info);
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.example-box p {
    margin-bottom: var(--space-sm);
    color: var(--gray-700);
}

/* Info Box Updates */
.info-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-content strong {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--gray-900);
}

.info-box.info {
    background: var(--info-light);
    border: 1px solid var(--info);
}

.info-box.tip {
    background: var(--success-light);
    border: 1px solid var(--success);
}

.info-box.warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
}

.info-box.danger {
    background: var(--danger-light);
    border: 1px solid var(--danger);
}

/* Chapter Summary */
.chapter-summary {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-top: var(--space-2xl);
}

.chapter-summary h2 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.summary-content {
    color: var(--gray-300);
    line-height: 1.8;
}

.summary-content p {
    color: var(--gray-300);
}

/* Chapter Navigation */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

.nav-button {
    display: flex;
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    min-width: 200px;
}

.nav-button:hover {
    background: var(--gray-100);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-button.prev {
    align-items: flex-start;
}

.nav-button.next {
    align-items: flex-end;
    text-align: right;
}

.nav-direction {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xs);
}

.nav-title {
    font-weight: 600;
    color: var(--gray-800);
}

/* FAB - Floating Action Button */
.fab {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--secondary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: var(--z-dropdown);
}

.fab:hover {
    background: var(--secondary-light);
    transform: scale(1.1);
}

.fab.completed {
    background: var(--accent);
}

.fab-icon {
    font-weight: bold;
}

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

/* Footer for chapter pages */

/* Responsive for chapter pages */
@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .toc {
        display: none;
    }
    
    .chapter-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .chapter-header {
        padding: var(--space-xl) 0;
    }
    
    .chapter-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .chapter-navigation {
        flex-direction: column;
    }
    
    .nav-button {
        width: 100%;
    }
}
