/* ===== static/css/style3.css ===== */

/*
 * Modern, Accessible CSS Framework
 * Features: Dark/Light mode, Reduced brightness, Professional styling
 * Author: ch3fdan.com
 * Version: 3.0
 */

/* ====================================================================
   CSS VARIABLES & DESIGN TOKENS
   ==================================================================== */

:root {
    /* ===== COLOR PALETTE - Reduced Brightness ===== */
    --primary: #2563eb;           /* Primary brand blue */
    --primary-dark: #1d4ed8;      /* Darker blue for hover states */
    --secondary: #64748b;         /* Secondary text and elements */
    --light: #f1f5f9;             /* Light background - reduced brightness */
    --dark: #1e293b;              /* Dark text and footer */
    --green: #10b981;             /* Success color */
    --border: #e2e8f0;            /* Border color */
    --background: #fafafa;        /* Main background - off-white */
    --surface: #fff;           /* Surface/card background */
    --text: #1e293b;              /* Primary text color */
    --text-muted: #64748b;        /* Muted/secondary text */

    /* ===== SHADOWS ===== */
    --shadow: 0 4px 6px rgb(0 0 0 / 10%);
    --shadow-lg: 0 10px 15px rgb(0 0 0 / 10%);

    /* ===== TYPOGRAPHY SCALE ===== */
    --font-main: 'Inter', -apple-system, blinkmacsystemfont, sans-serif;
    --font-size-xs: 0.75rem;      /* 12px - captions, labels */
    --font-size-sm: 0.875rem;     /* 14px - small text */
    --font-size-base: 1rem;       /* 16px - body text */
    --font-size-lg: 1.125rem;     /* 18px - lead text */
    --font-size-xl: 1.25rem;      /* 20px - headings */

    /* ===== SPACING SCALE ===== */
    --space-1: 0.25rem;   /* 4px  - micro spacing */
    --space-2: 0.5rem;    /* 8px  - small spacing */
    --space-3: 0.75rem;   /* 12px - medium spacing */
    --space-4: 1rem;      /* 16px - base spacing */
    --space-5: 1.25rem;   /* 20px - large spacing */
    --space-6: 1.5rem;    /* 24px - x-large spacing */
    --space-8: 2rem;      /* 32px - section spacing */
    --space-12: 3rem;     /* 48px - major spacing */
    --space-16: 4rem;     /* 64px - hero spacing */

    /* ===== BORDER RADIUS ===== */
    --radius-sm: 0.125rem;    /* 2px  - subtle rounding */
    --radius: 0.25rem;        /* 4px  - default rounding */
    --radius-md: 0.375rem;    /* 6px  - medium rounding */
    --radius-lg: 0.5rem;      /* 8px  - large rounding */
}

/* ====================================================================
   CSS RESET & BASE STYLES
   ==================================================================== */

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

/* ===== BASE DOCUMENT STYLES ===== */
body {
    font-family: var(--font-main), sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ====================================================================
   LAYOUT COMPONENTS
   ==================================================================== */

/* ===== NAVIGATION COMPONENT ===== */
.navbar {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    align-items: center;
}

.nav-link {
    font-size: var(--font-size-sm);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: var(--space-2) 0;
}

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

.nav-link.active {
    border-bottom: 2px solid var(--primary);
}

/* ===== FOOTER COMPONENT ===== */
footer {
    background: var(--dark);
    color: var(--light);
    padding: var(--space-12) 0;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

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

.footer-section h5 {
    margin-bottom: var(--space-4);
    color: var(--light);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-links a {
    color: var(--secondary);
    font-size: 1.25rem;
    transition: color 0.2s ease;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--light);
}

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

.footer-bottom {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--secondary);
}

/* ====================================================================
   UI COMPONENTS - Reusable Elements
   ==================================================================== */

/* ===== BUTTON SYSTEM ===== */
.btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: var(--font-size-sm);
    cursor: pointer;
    text-align: center;
    color: inherit;
}

/* Button Variants */
.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: black;
    border: 1px solid #ffc107;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #e0a800;
    transform: translateY(-1px);
    color: black;
}

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

.btn-secondary:hover {
    background: #475569;
    border-color: #475569;
    color: white;
}

/* Button Sizes */
.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.btn-start {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgb(40 167 69 / 30%);
    color: white;
}

/* Preset Button Variants */
.btn-preset {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}

.btn-easy {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-normal {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.btn-hard {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

.btn-expert {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
}

/* ===== CARD COMPONENT ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

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

.card-header {
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-3);
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary);
}

.card-meta {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
    line-height: 1.4;
}

.card-meta span {
    display: inline-block;
    margin-right: var(--space-2);
}

.meta-separator {
    margin: 0 var(--space-1);
    color: var(--text-muted);
}

.card-excerpt {
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-list {
    display: grid;
    gap: var(--space-6);
}

/* ====================================================================
   PAGE SECTIONS - Homepage & Blog
   ==================================================================== */

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--light) 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    min-height: 70vh;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-6);
    line-height: 1.2;
}

.hero-text p {
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: var(--space-4) var(--space-8);
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.hero-buttons .btn i {
    margin-right: var(--space-2);
}

/* ===== BLOG SECTIONS ===== */
.post-list {
    display: grid;
    gap: var(--space-6);
}

.post-item {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border);
}

.post-item:last-child {
    border-bottom: none;
}

.post-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8) 0;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text);
    line-height: 1.3;
    text-align: center;
}

.post-content {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--text);
    margin-bottom: var(--space-8);
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
    margin-top: var(--space-8);
    padding: var(--space-6);
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.comment {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    transition: all 0.2s ease;
}

/* ===== UTILITY BACKGROUNDS ===== */
.bg-light {
    background: var(--surface);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ====================================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ==================================================================== */

.float-anim {
    animation: float 6s ease-in-out infinite;
}

.float-delay-1 { animation-delay: -2s; }
.float-delay-2 { animation-delay: -4s; }
.float-delay-3 { animation-delay: -1.5s; }
.float-delay-4 { animation-delay: -3s; }

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

.code-line {
    animation: codeTyping 2s ease-in-out infinite;
}

.code-delay-1 { animation-delay: 0.4s; }
.code-delay-2 { animation-delay: 0.8s; }
.code-delay-3 { animation-delay: 1.2s; }
.code-delay-4 { animation-delay: 1.6s; }

@keyframes codeTyping {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

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

.laptop-container {
    animation: gentleFloat 8s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(0.5deg); }
    66% { transform: translateY(-5px) rotate(-0.5deg); }
}

/* ====================================================================
   DROPDOWN MENUS & NAVIGATION ENHANCEMENTS
   ==================================================================== */

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle .bi-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin: 0;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover .dropdown-toggle .bi-chevron-down {
    transform: rotate(180deg);
}

/* ====================================================================
   UTILITY CLASSES - Helper classes
   ==================================================================== */

.text-center { text-align: center; }
.mb-3 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-16 { margin-bottom: var(--space-16); }
.mt-8 { margin-top: var(--space-8); }
.text-muted { color: var(--text-muted); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }


/* ====================================================================
   DARK MODE THEME
   ==================================================================== */

[data-bs-theme="dark"] {
    /* ===== DARK MODE COLOR TOKENS ===== */
    --background: #0f172a;        /* Dark background */
    --surface: #1e293b;           /* Dark surface/cards */
    --text: #f1f5f9;              /* Light text */
    --text-muted: #94a3b8;        /* Muted light text */
    --border: #334155;            /* Dark borders */
    --light: #374151;             /* Light elements in dark mode */
    --dark: #0f172a;              /* Dark elements */
    --secondary: #64748b;         /* Secondary elements */
    --green: #10b981;             /* Success color */
}

[data-bs-theme="dark"] body {
    color: var(--text);
    background-color: var(--background);
}

[data-bs-theme="dark"] .navbar {
    background: var(--background);
    border-bottom-color: var(--border);
}

[data-bs-theme="dark"] .nav-link {
    color: var(--text);
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    color: var(--primary);
}

[data-bs-theme="dark"] .dropdown-menu {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 10px 15px rgb(0 0 0 / 30%);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--text);
    background: var(--surface);
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background: var(--primary);
    color: white;
}

[data-bs-theme="dark"] .card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-title a,
[data-bs-theme="dark"] .post-content,
[data-bs-theme="dark"] .post-content p {
    color: var(--text);
}

[data-bs-theme="dark"] .card-meta,
[data-bs-theme="dark"] .card-excerpt {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .comments-section,
[data-bs-theme="dark"] .comment {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] footer {
    background: var(--dark);
    color: var(--text);
}

[data-bs-theme="dark"] .footer-section h5 {
    color: var(--text);
}

[data-bs-theme="dark"] .footer-links a,
[data-bs-theme="dark"] .social-links a {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .footer-links a:hover,
[data-bs-theme="dark"] .social-links a:hover {
    color: var(--text);
}

[data-bs-theme="dark"] .footer-bottom {
    border-top-color: var(--border);
    color: var(--text-muted);
}

[data-bs-theme="dark"] .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-bs-theme="dark"] .hero-text h1 {
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-bs-theme="dark"] .hero-text p {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .bg-light {
    background: var(--surface);
    color: var(--text);
}

/* Fix for SVG illustrations in dark mode */
[data-bs-theme="dark"] .hero-illustration [fill="#0f172a"] {
    fill: #1e293b;
}

[data-bs-theme="dark"] .hero-illustration [fill="#1e293b"] {
    fill: #0f172a;
}

[data-bs-theme="dark"] .hero-illustration [stroke="var(--border)"] {
    stroke: var(--border);
}


/* ====================================================================
   GAMES SECTION - Math Game & Flappy Bird
   ==================================================================== */

/* ===== MATH GAME STYLES ===== */
.math-game-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.math-game-container h1,
.math-game-container h3 {
    color: var(--text);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Settings Panel - Controls game configuration */
.settings-panel {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
    transition: background-color 0.3s ease;
}

/* Setting Group - Individual configuration items */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.setting-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}

.setting-group label {
    font-weight: 600;
    color: var(--text);
    font-size: var(--font-size-sm);
}

.setting-group input,
.setting-group select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: var(--font-size-sm);
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 10%);
}

.setting-group select option {
    background: var(--surface);
    color: var(--text);
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Game Stats - Shows current game state */
.math-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.math-stats div {
    background: var(--surface);
    padding: 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: background-color 0.3s ease;
    color: var(--text);
}

/* Progress Bar - Visual progress indicator */
.progress-bar {
    height: 12px;
    background-color: var(--border);
    border-radius: 6px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    width: 0%;
    transition: width 0.3s ease;
}

/* Question Display - Current math question */
.question {
    font-size: 2.5rem;
    margin: 2rem 0;
    color: var(--primary);
    font-weight: 700;
    text-align: center;
    min-height: 60px;
}

/* Answer Input - User input field */
.answer-input {
    font-size: 1.5rem;
    padding: 0.75rem;
    width: 140px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 10%);
}

/* Submit Button - Check answer */
.math-game-container .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    display: block;
    margin: 0 auto 1.5rem;
}

/* Feedback - Correct/incorrect messages */
.feedback {
    margin: 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    min-height: 2rem;
    color: var(--text);
}

.feedback.correct {
    color: #27ae60;
}

.feedback.incorrect {
    color: #e74c3c;
}

/* Scoreboard - High scores display */
.scoreboard {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius-lg);
    transition: background-color 0.3s ease;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.score-item:last-child {
    border-bottom: none;
}

.score-name {
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.score-value {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    margin: 0 1rem;
}

.score-details {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.no-scores {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
}

/* ===== FLAPPY BIRD GAME STYLES ===== */
.flappy-bird-container {
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
}

/* Game Canvas Container - Wraps the game canvas */
.game-canvas-container {
    position: relative;
    margin: 0 auto;
    width: 600px;
    height: 499px;
    border: 3px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgb(0 0 0 / 30%);
    background: #000;
}

#flappyCanvas {
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F7FF 100%);
    display: block;
}

/* Game Controls - Control panel below game */
.game-controls {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

/* Controls Info - Keyboard shortcuts display */
.controls-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.control-item {
    background: var(--background);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid var(--primary);
    color: var(--text);
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.score-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 1rem 0;
}

.game-buttons {
    margin: 1rem 0;
}

/* Game Over Screen - End game display */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgb(0 0 0 / 80%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    display: none;
}

/* Enhanced scoreboard styles */
.flappy-bird-container .scoreboard {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 10px;
    border: 1px solid var(--border);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.flappy-bird-container .scoreboard h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text);
}

.flappy-bird-container .score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    margin: 0.25rem 0;
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--text);
}

.flappy-bird-container .score-item:last-child {
    border-bottom: none;
}

.flappy-bird-container .score-rank {
    font-weight: bold;
    color: var(--primary);
    min-width: 25px;
}

.flappy-bird-container .score-name {
    font-weight: 600;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 0.5rem;
}

.flappy-bird-container .score-value {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    font-size: 0.8rem;
}

/* Size Selector - Game canvas size options */
.size-selector {
    margin-bottom: 1rem;
    text-align: center;
}

.size-selector label {
    font-weight: 600;
    margin-right: 0.5rem;
    color: var(--text);
}

.size-selector select {
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

/* Fullscreen mode - Expands game to full viewport */
.flappy-bird-container.fullscreen-mode {
    max-width: none;
    margin: 1rem;
}

.flappy-bird-container.fullscreen-mode .game-canvas-container {
    width: 100%;
    max-width: 100%;
}

.flappy-bird-container.fullscreen-mode #flappyCanvas {
    width: 100%;
    height: calc(100vh - 200px);
}

/* ===== GAME SETTINGS PANEL - Advanced configuration ===== */
.game-settings-panel {
    margin: 1rem 0;
    padding: 2rem;
    background: var(--light);
    border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    transition: all 0.3s ease;
}

.game-settings-panel[style*="display: none"] {
    animation: slideUp 0.3s ease;
}

.game-settings-panel h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.5rem;
}

.game-settings-panel h4 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.1rem;
}

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

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

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

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Settings Grid - Layout for game settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Setting Value Display - Shows current slider value */
.setting-value {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Setting Description - Explains what each setting does */
.setting-description {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Settings Buttons - Action buttons for settings */
.settings-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.settings-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
}

.settings-presets {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Settings Toggle Section - Shows/hides advanced settings */
.settings-toggle-section {
    text-align: center;
    margin: 1.5rem 0;
}

.settings-toggle-section .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* Quick Presets Panel - Pre-configured difficulty levels */
.quick-presets-panel {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 10px;
    border: 1px solid var(--border);
    text-align: center;
    transition: background-color 0.3s ease;
}

.quick-presets-panel h4 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.1rem;
}

.preset-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====================================================================
   DARK MODE GAME SPECIFIC FIXES
   ==================================================================== */

[data-bs-theme="dark"] .math-game-container,
[data-bs-theme="dark"] .game-controls,
[data-bs-theme="dark"] .quick-presets-panel,
[data-bs-theme="dark"] .game-settings-panel,
[data-bs-theme="dark"] .flappy-bird-container {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .math-game-container h1,
[data-bs-theme="dark"] .math-game-container h3,
[data-bs-theme="dark"] .quick-presets-panel h4,
[data-bs-theme="dark"] .game-settings-panel h3,
[data-bs-theme="dark"] .game-settings-panel h4,
[data-bs-theme="dark"] .flappy-bird-container h1,
[data-bs-theme="dark"] .flappy-bird-container h3 {
    color: var(--text);
}

[data-bs-theme="dark"] .setting-group label {
    color: var(--text);
    font-weight: 600;
}

[data-bs-theme="dark"] .setting-group input,
[data-bs-theme="dark"] .setting-group select {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

[data-bs-theme="dark"] .setting-group input:focus,
[data-bs-theme="dark"] .setting-group select:focus {
    border-color: var(--primary);
    background: var(--surface);
    color: var(--text);
}

[data-bs-theme="dark"] .setting-group input::placeholder {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .control-item {
    background: var(--background);
    color: var(--text);
    border-color: var(--primary);
}

[data-bs-theme="dark"] .size-selector label {
    color: var(--text);
}

[data-bs-theme="dark"] .size-selector select {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

[data-bs-theme="dark"] .settings-panel,
[data-bs-theme="dark"] .math-stats div,
[data-bs-theme="dark"] .scoreboard {
    background: var(--surface);
    color: var(--text);
}

[data-bs-theme="dark"] .score-item {
    background: var(--background);
    border-bottom-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .score-name {
    color: var(--text);
}

[data-bs-theme="dark"] .score-details {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .test-green {
    color: var(--green);
    background: #1e293b;
    border: 1px solid var(--green);
}

/* ====================================================================
   PAGES SECTION - About, Contact, and Content Pages
   ==================================================================== */

/* ===== PAGE CONTAINER & LAYOUT ===== */
.page-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.page-content {
    width: 100%;
}

/* ===== PAGE HEADER COMPONENT ===== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--primary);
    background: linear-gradient(135deg, var(--light) 0%, var(--surface) 100%);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #3b82f6, var(--primary));
}

.page-header h1 {
    font-size: 3rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PAGE BODY CONTENT ===== */
.page-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    background: var(--surface);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.page-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.page-body strong {
    color: var(--primary);
    font-weight: 600;
}

.page-body h2 {
    color: var(--primary);
    margin: 2.5rem 0 1rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.page-body h3 {
    color: var(--text);
    margin: 2rem 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.page-body ul, .page-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.page-body li {
    margin-bottom: 0.5rem;
    position: relative;
}

.page-body ul li::before {
    content: '▸';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -1rem;
}

/* ===== CONTACT PAGE SPECIFIC STYLES ===== */
.contact-info {
    background: linear-gradient(135deg, var(--light) 0%, var(--surface) 100%);
    padding: 2.5rem;
    border-radius: 15px;
    margin: 2.5rem 0;
    border-left: 5px solid var(--primary);
    transition: background 0.3s ease;
}

.contact-methods {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.contact-method {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.contact-method:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.contact-method i {
    font-size: 2rem;
    color: var(--primary);
    margin-right: 1.5rem;
    width: 40px;
    text-align: center;
}

.contact-method-content {
    flex: 1;
}

.contact-method h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.2rem;
}

.contact-method p {
    margin: 0;
    color: var(--text-muted);
}

.contact-method a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== INTERESTS GRID - Used in About/Contact ===== */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.interest-card {
    background: linear-gradient(135deg, var(--light) 0%, var(--surface) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.interest-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.interest-card h4 {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
}

/* ===== TECH STACK DISPLAY ===== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.tech-tag:hover {
    background: var(--primary-dark);
}

/* ===== PAGE SPECIFIC ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================================================
   DARK MODE SUPPORT FOR PAGES
   ==================================================================== */

[data-bs-theme="dark"] .page-header {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

[data-bs-theme="dark"] .page-body {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

[data-bs-theme="dark"] .contact-info {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

[data-bs-theme="dark"] .contact-method {
    background: var(--surface);
    color: var(--text);
}

[data-bs-theme="dark"] .interest-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

[data-bs-theme="dark"] .page-body h2 {
    color: var(--primary);
}

[data-bs-theme="dark"] .page-body h3 {
    color: var(--text);
}

/* ====================================================================
   BLOG IMAGE GALLERY & EXPANDABLE THUMBNAILS
   ==================================================================== */

/* ===== EXPANDABLE IMAGE CONTAINER ===== */
.expandable-image {
    position: relative;
    display: inline-block;
    margin: 1rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%;
}

.expandable-image:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== IMAGE THUMBNAIL BASE STYLES ===== */
.image-thumbnail {
    display: block;
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Featured image container - makes it full width */
.featured-image-container {
    width: 50%;
    text-align: center;
    display: inline-block;
}

/* Make sure the overlay matches the image size */
.featured-image-container .image-overlay {
    width: 100%;
    height: 100%;
}

/* Featured image thumbnail - large but constrained */
.featured-thumbnail {
    width: 100%;
    height: auto; /* Limit height for featured images */
    object-fit: contain; /* Show entire image without cropping */
}

/* Gallery image container - small fixed size */
.gallery-image-container {
    width: 200px;
    height: 150px;
    display: inline-block;
}

/* Gallery image thumbnail - small and cropped */
.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fit container */
}

/* ===== IMAGE OVERLAY EFFECT ===== */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
}

.expandable-image:hover .image-overlay {
    opacity: 1;
}

.expand-icon {
    font-size: 2rem;
    color: white;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.expandable-image:hover .expand-icon {
    transform: scale(1);
}

/* ===== GALLERY GRID LAYOUT ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    justify-items: center; /* Center the gallery items */
}

.gallery-item {
    text-align: center;
}

.gallery-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* ===== BLOG POST SPECIFIC STYLES ===== */
.post-image {
    text-align: center;
    margin: 2rem 0;
}

.post-gallery {
    margin: 3rem 0;
    padding: 2.5rem;
    background: var(--light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.post-gallery:hover {
    box-shadow: var(--shadow);
}

.post-gallery h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

/* ===== LIGHTBOX CUSTOMIZATION ===== */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.95) !important;
}

.modal-content {
    background: transparent !important;
    border: none !important;
}

.modal-body {
    text-align: center;
    padding: 0 !important;
}

.modal-body img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .gallery-image-container {
        width: 150px;
        height: 120px;
    }

    .featured-thumbnail {
        max-height: 300px;
    }

    .post-gallery {
        padding: 1.5rem;
        margin: 2rem 0;
    }

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

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .gallery-image-container {
        width: 120px;
        height: 100px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
[data-bs-theme="dark"] .post-gallery {
    background: var(--surface);
    border-color: var(--border);
}

[data-bs-theme="dark"] .image-thumbnail {
    border: 1px solid var(--border);
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.image-expand {
    text-decoration: none;
    outline: none;
    display: block;
}

.image-expand:focus .image-overlay {
    opacity: 1;
}

.image-expand:focus .image-thumbnail {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/*
 ======================================
 BLOG POST LAYOUT ENHANCEMENTS
 ======================================= */

/* Post Detail Container */
.post-detail {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .post-detail {
    background: var(--surface);
    border-color: var(--border);
}

/* Post Header Styling */
.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--primary);
    background: linear-gradient(135deg, var(--light) 0%, transparent 100%);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-date, .post-author {
    font-weight: 500;
}

.post-categories {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.category-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* Post Content Styling */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin: 2rem 0;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2, .post-content h3, .post-content h4 {
    color: var(--primary);
    margin: 2.5rem 0 1rem 0;
    font-weight: 600;
}

.post-content h2 {
    font-size: 1.8rem;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

/* Comments Section Styling */
.comments-section {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin: 3rem 0;
    border: 1px solid var(--border);
}

[data-bs-theme="dark"] .comments-section {
    background: var(--surface);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.comments-header h3 {
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
}

.comment-count {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Comments List */
.comments-list {
    margin-bottom: 2rem;
}

.comment {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.comment-author {
    font-weight: 600;
    color: var(--text);
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comment-body p {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
}

/* Comment Form Fixes */
.comment-form .card {
    border: 1px solid var(--border);
    background: var(--surface);
}

.comment-form .card-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.comment-form textarea.form-control {
    resize: none; /* Prevent resizing */
    min-width: 50%;
    min-height: 120px; /* Fixed height */
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
    padding: 1rem;
}

.comment-form textarea.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
    background: var(--surface);
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.login-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

/* Post Navigation */
.post-navigation {
    text-align: center;
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-detail {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .comments-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .comments-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ====================================================================
   RESPONSIVE DESIGN - Mobile & Tablet
   ==================================================================== */

@media (width <= 768px) {
    .container {
        padding: 0 var(--space-4);
    }

    /* Mobile Navigation */
    .navbar-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        border: 1px solid var(--border);
        padding: var(--space-4);
        gap: var(--space-3);
    }

    .navbar-toggle {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
        background: none;
        border: none;
        cursor: pointer;
        padding: var(--space-2);
    }

    .navbar-toggle span {
        width: 20px;
        height: 2px;
        background: var(--text);
        transition: 0.3s;
    }

    .navbar-nav.active {
        display: flex;
    }

    /* Mobile Hero */
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-illustration {
        max-width: 300px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Mobile Dropdowns */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--light);
        margin-left: 16px;
        display: none;
        width: calc(100% - 16px);
    }

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

    /* Games Mobile Styles */
    .math-game-container {
        margin: 1rem;
        padding: 1rem;
    }

    .settings-panel {
        grid-template-columns: 1fr;
    }

    .math-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .question {
        font-size: 2rem;
        margin: 1.5rem 0;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .score-value {
        margin: 0;
        align-self: flex-start;
    }

    .size-selector {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .flappy-bird-container .scoreboard {
        max-width: 100%;
        margin: 1rem 0;
    }

    #gameSize option[value="large"],
    #gameSize option[value="fullscreen"] {
        display: none;
    }

    .game-canvas-container {
        width: 100%;
        height: 400px;
    }

    .controls-info {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .settings-buttons {
        flex-direction: column;
        align-items: center;
    }

    .settings-buttons .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .game-settings-panel {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .preset-buttons {
        flex-direction: column;
        align-items: center;
    }

    .preset-buttons .btn-preset {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .quick-presets-panel {
        padding: 1rem;
        margin: 1rem 0;
    }

    /* === PAGES SECTION - About, Contact, and Content Pages === */
    .page-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .page-header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-body {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .contact-method i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

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

    .tech-stack {
        justify-content: center;
    }
}