/* ===== Block Blast Design System Variables ===== */
:root {
    /* Colors - Primary (Block Blast Theme: Professional deep blue) */
    --primary-color: #35497d;
    --primary-hover: #2d3e6b;
    --primary-light: #e8eef7;
    --primary-dark: #1e2d52;
    
    /* Colors - Secondary (Bright Green accent for buttons) */
    --secondary-color: #4ade80;
    --secondary-hover: #22c55e;
    --secondary-light: #dcfce7;
    
    /* Colors - Accent (Gold/Orange for highlights) */
    --accent-color: #fbbf24;
    --accent-hover: #f59e0b;
    
    /* Colors - Semantic */
    --color-success: #22c55e;
    --color-success-light: #dcfce7;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    /* Colors - Neutral */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Game specific colors - Block Blast professional blue theme */
    --game-bg: #0a1525;
    --header-gradient-start: #35497d;
    --header-gradient-end: #1e2d52;
    --block-red: #ef4444;
    --block-blue: #3b82f6;
    --block-green: #22c55e;
    --block-yellow: #eab308;
    --block-purple: #a855f7;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Layout */
    --mobile-padding: 1rem;
    --max-width: 1000px;
    --header-height: 70px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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-card: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(30, 58, 95, 0.4);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: var(--font-sans);
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
}

/* ===== Global Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: var(--line-height-normal);
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
}

/* ===== Header Navigation Styles ===== */
.site-header,
.block-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
    backdrop-filter: blur(12px);
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.4);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--mobile-padding);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 42px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-text {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
}

.nav-links li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-links li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links li a.active {
    color: #fff;
    background: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

/* Play Online Button - Special styling */
.nav-links li a.play-online-link {
    background: var(--secondary-color);
    color: #fff;
    font-weight: 600;
    border-radius: 20px;
    padding: 8px 20px;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.nav-links li a.play-online-link:hover {
    background: #3dce72;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

/* Language Selector */
.lang-selector,
.language-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.lang-dropdown.show,
.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.lang-dropdown a:hover {
    background: var(--bg-tertiary);
}

.lang-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
    padding-top: 90px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    z-index: 100;
    box-shadow: none;
}

.sidebar.open {
    right: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar-links {
    list-style: none;
    padding: 0 1rem;
}

.sidebar-links li {
    margin-bottom: 0.25rem;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sidebar-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.sidebar-links a.active {
    background: var(--secondary-color);
    color: #fff;
}

/* Play Online Button in sidebar */
.sidebar-links a.play-online-link {
    background: var(--secondary-color);
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sidebar-links a.play-online-link:hover {
    background: #3dce72;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.show {
    opacity: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .menu-btn {
        display: flex;
    }
}

/* ===== Game Preview Section ===== */
.game-preview {
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--mobile-padding);
    padding-top: calc(1rem);
}

.game-preview iframe {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 0.5rem;
    background: #000;
}

.detail-thumbnail-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
    margin: 0 auto;
}

.detail-thumbnail-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(30, 58, 95, 0.4), 0 8px 20px rgba(0, 0, 0, 0.15);
}

.detail-thumbnail-container::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.detail-game-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-now-btn {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #22c55e 100%);
    color: #0f2744;
    border: none;
    border-radius: 2rem;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.4);
    z-index: 4;
    white-space: nowrap;
    opacity: 1;
    text-align: center;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(74, 222, 128, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 24px rgba(74, 222, 128, 0.5);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(74, 222, 128, 0.4);
    }
}

.play-now-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(74, 222, 128, 0.5);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

@media (max-width: 480px) {
    .play-now-btn {
        padding: 0.8rem 2.5rem;
        font-size: 1.1rem;
        animation: pulse 2s infinite;
    }
}

/* ===== PC Desktop Game Container ===== */
.desktop-game-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 563px;
    margin: 48px auto 40px auto;
    background: var(--game-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Block Blast: landscape container */
.block-blast-container {
    max-width: 1000px;
    height: 563px;
    margin: 48px auto 40px auto;
}

.desktop-game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: var(--game-bg);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(15, 39, 68, 0.95) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.game-overlay .loading-content {
    text-align: center;
    padding: 2rem;
    width: 80%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: logoPulse 2s ease-in-out infinite;
}

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

.game-overlay .loading-text {
    color: white;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.game-overlay .progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.game-overlay .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #86efac);
    border-radius: 4px;
    transition: width 0.1s linear;
}

/* PWA Install Banner - Bottom sheet style */
.pwa-install-banner {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%) !important;
    padding: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    z-index: 9999 !important;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3) !important;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
}

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

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-app-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pwa-app-info {
    flex: 1;
    min-width: 0;
}

.pwa-app-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.pwa-app-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #0f2744;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(74, 222, 128, 0.3);
    white-space: nowrap;
}

.pwa-install-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
}

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

.pwa-dismiss-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .pwa-install-content {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .pwa-app-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .pwa-app-name {
        font-size: 0.95rem;
    }
    
    .pwa-app-desc {
        font-size: 0.8rem;
    }
    
    .pwa-install-btn {
        padding: 9px 18px;
        font-size: 0.9rem;
    }
    
    .pwa-dismiss-btn {
        width: 32px;
        height: 32px;
    }
}

.play-button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #22c55e 100%);
    color: #0f2744;
    border: none;
    border-radius: 2rem;
    padding: 1.2rem 3.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: not-allowed;
    transition: all 0.3s ease;
    opacity: 0.7;
    min-width: 200px;
    white-space: nowrap;
    display: none;
}

.play-button.ready {
    cursor: pointer;
    opacity: 1;
    animation: pulse 2s infinite;
}

.play-button.ready:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

@media (max-width: 1024px) {
    .block-blast-container {
        max-width: 100%;
        height: 56.3vw;
        margin: 24px auto 40px auto;
    }
}

/* Solver page needs taller height on mobile for usability */
@media (max-width: 768px) {
    .block-blast-container {
        height: 80vh;
        min-height: 500px;
        max-height: 700px;
        margin: 16px auto 24px auto;
    }
}

/* ===== Mobile Game Styles ===== */
.mobile-game-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: transparent;
}

.mobile-game-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.back-to-details {
    position: fixed;
    top: 30%;
    left: 0;
    z-index: 1010;
    background: rgba(30, 58, 95, 0.9);
    border: 2px solid rgba(74, 222, 128, 0.6);
    border-left: none;
    border-radius: 0 12px 12px 0;
    width: 36px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: white;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.4);
    padding: 0;
    touch-action: none;
    user-select: none;
}

.back-to-details:hover {
    background: rgba(30, 58, 95, 1);
    transform: translateX(2px);
}

.back-to-details:active,
.back-to-details.dragging {
    cursor: grabbing;
    background: var(--primary-color);
    transform: scale(1.05);
}

.back-to-details svg {
    width: 22px;
    height: 22px;
    fill: white;
    stroke: white;
    stroke-width: 0.5;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.mobile-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(15, 39, 68, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.mobile-game-overlay .loading-content {
    text-align: center;
    padding: 2rem;
    width: 80%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-game-overlay .loading-text {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
    .game-preview {
        padding: 0.5rem var(--mobile-padding);
        padding-top: calc(2rem);
    }

    .back-to-details {
        top: 12px;
        left: 0;
        width: 32px;
        height: 40px;
    }

    .mobile-game-overlay .loading-content {
        padding: 1.5rem;
        max-width: 250px;
    }

    .mobile-game-overlay .loading-text {
        font-size: 1.3rem;
    }
}

/* ===== Game Description Section ===== */
.game-description {
    max-width: var(--max-width);
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-xl) var(--spacing-xl);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .game-description {
        margin: 2rem 1rem;
        padding: var(--spacing-lg);
    }
}

.description-content {
    display: grid;
    gap: 2rem;
}

.description-section {
    margin-bottom: 2rem;
}

.description-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.description-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.description-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 1rem;
    text-align: left;
}

.mode-list, .feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mode-list li, .feature-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.05rem;
}

.mode-list li:before {
    content: "✓";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.feature-list li:before {
    content: "🎯";
    position: absolute;
    left: 0;
}

/* FAQ Styles */
.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.faq-item h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Tips Box */
.tips-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, #bae6fd 100%);
    border: 1px solid rgba(30, 58, 95, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.tips-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tips-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

.tips-box li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Quote/Testimonial */
.testimonial {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.testimonial::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: Georgia, serif;
}

@media (max-width: 768px) {
    .game-description h2 {
        font-size: 1.3rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .mode-list li, .feature-list li {
        font-size: 1rem;
    }
}

/* ===== Footer Styles ===== */
.site-footer {
    background: linear-gradient(180deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
    color: #fff;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--mobile-padding);
}

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

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: #fff;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 1px;
}

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

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

.footer-links-list li {
    margin-bottom: var(--spacing-sm);
}

.footer-links-list a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
}

.footer-links-list a:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .site-footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ===== Toast Styles ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 27, 75, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 480px) {
    .toast {
        top: 16px;
        padding: 10px 20px;
        font-size: 13px;
        max-width: 85%;
    }
}

/* ===== Feedback Button ===== */
.feedback-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.feedback-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feedback-btn:active {
    transform: scale(0.95);
}

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

/* Feedback Modal */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 95, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.feedback-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: modalSlideIn 0.3s ease;
}

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

.feedback-modal h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.feedback-modal textarea {
    width: 100%;
    height: 120px;
    padding: var(--spacing-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    resize: vertical;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: all var(--transition-fast);
}

.feedback-modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.feedback-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.feedback-modal button {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.feedback-modal .cancel-feedback {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.feedback-modal .cancel-feedback:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
}

.feedback-modal .submit-feedback {
    background: linear-gradient(135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
    color: white;
}

.feedback-modal .submit-feedback:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

@media (max-width: 768px) {
    .feedback-modal {
        align-items: flex-start;
        padding-top: 12vh;
        transition: padding-top 0.3s ease;
    }
    
    .feedback-modal.keyboard-open {
        padding-top: 3vh;
    }
    
    .feedback-modal-content {
        width: 92%;
        max-width: 400px;
        padding: var(--spacing-lg);
        max-height: 85vh;
        overflow-y: auto;
    }

    .feedback-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    
    .feedback-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== High Score Display ===== */
.score-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: #92400e;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

.score-display .score-icon {
    font-size: 1.25rem;
}

.score-display .score-value {
    font-size: 1.1rem;
}

/* ===== Block Decorations ===== */
.block-decoration {
    position: absolute;
    border-radius: 4px;
    opacity: 0.1;
    pointer-events: none;
}

.block-red { background: var(--block-red); }
.block-blue { background: var(--block-blue); }
.block-green { background: var(--block-green); }
.block-yellow { background: var(--block-yellow); }
.block-purple { background: var(--block-purple); }
