/**
 * Caça Palavras Bíblico - Stylesheet
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 * Todos os direitos reservados
 */

/* === CSS RESET E VARIÁVEIS === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Vibrant Game Palette */
    --primary-color: #8B5CF6; /* Vibrant Purple */
    --secondary-color: #F59E0B; /* Golden Coin */
    --accent-color: #10B981; /* Success Green */
    --surface-color: #FFFFFF; /* Pure White */
    --text-color: #1F2937; /* Dark Slate */
    
    /* Variações automáticas */
    --primary-hover: #7C3AED;
    --primary-shadow: #6D28D9;
    --secondary-shadow: #D97706;
    --accent-shadow: #059669;
    --primary-light: #EDE9FE;
    --bg-color: #F8FAFC;
    --text-muted: #9CA3AF;
    --text-secondary: #4B5563;
    --border-color: #E2E8F0;
    
    /* Game Shadows & Effects */
    --btn-shadow-size: 6px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-floating: 0 25px 50px -12px rgba(139, 92, 246, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.6);
    
    /* Layout */
    --border-radius: 12px;
    --spacing-unit: 8px;
    --transition: all 0.3s ease;
    --header-height: 60px;
    --bottom-nav-height: 65px;
    
    /* Typography */
    --font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

/* Dark Mode */
body.dark-theme {
    --primary-color: #A78BFA;
    --secondary-color: #FBBF24;
    --accent-color: #34D399;
    --bg-color: #0F172A;
    --surface-color: #1E293B;
    --text-color: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --border-color: #334155;
    --primary-shadow: #7C3AED;
    --secondary-shadow: #D97706;
    --accent-shadow: #059669;
    --glass-bg: rgba(30, 41, 59, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-floating: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* === BASE STYLES === */
html {
    font-size: clamp(14px, 2.5vw, 18px);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: var(--header-height);
    overflow-x: hidden;
}

/* Compensar bottom nav em mobile */
@media (max-width: 899px) {
    body {
        padding-bottom: var(--bottom-nav-height);
    }
}

/* === HEADER FIXO === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    border-bottom: 3px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
}

.header-logo h1 {
    font-size: var(--font-size-xl);
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.03em;
    text-shadow: 0 2px 0 var(--border-color);
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

@media (min-width: 900px) {
    .desktop-nav {
        display: flex;
        gap: 8px;
    }
    .desktop-nav .nav-link {
        padding: 8px 16px;
        border-radius: 12px;
        color: var(--text-color);
        text-decoration: none;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background 0.2s ease;
        font-weight: 700;
        border: 2px solid transparent;
    }
    .desktop-nav .nav-link:hover {
        background: var(--surface-color);
        border-color: var(--border-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 0 var(--border-color);
    }
    .desktop-nav .nav-link.active {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-shadow);
        box-shadow: 0 4px 0 var(--primary-shadow);
        transform: translateY(-2px);
    }
    .desktop-nav .nav-link.active:active {
        transform: translateY(2px);
        box-shadow: 0 0 0 transparent;
    }
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 0 var(--border-color);
    font-size: 18px;
}

.btn-icon:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--border-color);
    color: var(--primary-color);
}

.btn-icon:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 transparent;
}

/* Back Button Highlight */
#back-btn {
    background: var(--surface-color);
    color: #ef4444;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#back-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
    box-shadow: 0 4px 0 #fca5a5;
    transform: translateY(-2px);
}

#back-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 transparent;
}

/* === BOTTOM NAVIGATION === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 3px solid var(--border-color);
    box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 700;
    transition: var(--transition);
    min-width: 56px;
    min-height: 48px;
    border-radius: 12px;
    position: relative;
    top: 2px;
}

.nav-item:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-item i {
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-item.active i {
    transform: translateY(-4px) scale(1.2);
}

.nav-item-fab.active {
    background: var(--primary-color) !important;
}

/* FAB Central */
.nav-item-fab {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: -36px;
    color: #fff !important;
    border: 4px solid var(--surface-color);
    box-shadow: 0 6px 0 var(--primary-shadow);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background 0.2s ease;
    top: 0;
    padding: 0;
}

.nav-item-fab:hover {
    background: var(--secondary-color);
    box-shadow: 0 6px 0 var(--secondary-shadow);
    color: var(--text-color);
    transform: translateY(-4px) scale(1.05);
}

.nav-item-fab:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 transparent;
}

.nav-item-fab i {
    font-size: 26px;
    transform: none !important;
    margin-left: 4px; /* Compensate for play icon visual weight */
}

.nav-item-fab span {
    display: none;
}

/* Esconder bottom nav no desktop */
@media (min-width: 900px) {
    .bottom-nav {
        display: none !important;
    }
}

/* === LAYOUT E CONTAINERS === */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.main-content {
    min-height: calc(100vh - var(--header-height));
}

/* === BOTÕES (GAME STYLE) === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 999px; /* Pill shape */
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    font-family: 'Fredoka', inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 var(--btn-shadow-size) 0 var(--primary-shadow), 0 10px 15px rgba(0,0,0,0.1);
}

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

.btn-primary:active {
    transform: translateY(var(--btn-shadow-size));
    box-shadow: 0 0 0 var(--primary-shadow), 0 2px 4px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #FFFFFF;
    box-shadow: 0 var(--btn-shadow-size) 0 var(--secondary-shadow), 0 10px 15px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: color-mix(in srgb, var(--secondary-color) 85%, black);
}

.btn-secondary:active {
    transform: translateY(var(--btn-shadow-size));
    box-shadow: 0 0 0 var(--secondary-shadow), 0 2px 4px rgba(0,0,0,0.1);
}

.btn-accent {
    background: var(--accent-color);
    color: #FFFFFF;
    box-shadow: 0 var(--btn-shadow-size) 0 var(--accent-shadow), 0 10px 15px rgba(0,0,0,0.1);
}

.btn-accent:hover {
    background: color-mix(in srgb, var(--accent-color) 85%, black);
}

.btn-accent:active {
    transform: translateY(var(--btn-shadow-size));
    box-shadow: 0 0 0 var(--accent-shadow), 0 2px 4px rgba(0,0,0,0.1);
}

.btn-outline {
    background: var(--surface-color);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    box-shadow: 0 var(--btn-shadow-size) 0 var(--border-color);
}

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

.btn-outline:active {
    transform: translateY(var(--btn-shadow-size));
    box-shadow: 0 0 0 var(--border-color);
}

.btn-large {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}



/* === HERO SECTION === */
.hero-section {
    position: relative;
    padding: 60px 0;
    overflow: hidden;
    background: var(--surface-color);
}

/* Decorative Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    border-radius: 50%;
}

.blob-1 {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--primary-light);
}

.blob-2 {
    bottom: -150px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: rgba(16, 185, 129, 0.15); /* Emerald tint */
}

@media (prefers-color-scheme: dark) {
    .blob-1 { background: rgba(59, 130, 246, 0.2); }
    .blob-2 { background: rgba(52, 211, 153, 0.15); }
}

.hero-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
    filter: drop-shadow(0px 4px 0px var(--primary-shadow));
    transform: rotate(-2deg);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
    .hero-section {
        padding: 80px 0;
    }
}

@media (min-width: 992px) {
    .hero-section {
        padding: 100px 0;
    }
    .hero-wrapper {
        display: grid;
        grid-template-columns: 1.3fr 0.7fr;
        gap: 60px;
        align-items: center;
    }
    .hero-content {
        text-align: left;
    }
    .hero-actions {
        justify-content: flex-start;
    }
    .hero-subtitle {
        margin-left: 0;
    }
}

/* Animations & Effects */
.animate-float {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.glow-effect {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}
.glow-effect:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
}
@media (prefers-color-scheme: dark) {
    .glow-effect { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
    .glow-effect:hover { box-shadow: 0 0 30px rgba(59, 130, 246, 0.7); }
}

/* Game Preview */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-floating);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.glass-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-grid.simulated-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 24px;
}

.preview-cell {
    width: 100%;
    aspect-ratio: 1;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 8px;
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
    
    /* Entry animation */
    opacity: 0;
    animation: cellEntry 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: calc(var(--anim-order) * 0.04s);
}

@keyframes cellEntry {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Simulated Gameplay Highlight Loop */
@keyframes highlightLoop {
    0%, 100% {
        background: var(--surface-color);
        color: var(--primary-color);
        border-color: var(--border-color);
        transform: translateY(0);
        box-shadow: 0 4px 0 var(--border-color);
    }
    10%, 80% {
        background: var(--accent-color);
        color: #FFFFFF;
        border-color: var(--accent-shadow);
        transform: translateY(4px);
        box-shadow: 0 0 0 var(--accent-shadow);
    }
}

.cell-anim {
    /* Base entry animation overridden by multiple animations */
    animation: 
        cellEntry 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
        highlightLoop 10s infinite;
    animation-delay: calc(var(--anim-order) * 0.04s), var(--hl-delay);
}

.preview-words {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #fff;
}

@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; background: var(--surface-color); color: var(--text-color); border: 1px solid var(--border-color); }
    10%, 80% { transform: scale(1); opacity: 1; background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
    90%, 100% { transform: scale(0); opacity: 0; }
}

.badge-anim {
    opacity: 0;
    animation: badgePop 10s infinite;
    animation-delay: var(--badge-delay);
}

.word-found {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--font-size-sm);
    text-decoration: line-through;
}

.word-pending {
    background: var(--border-color);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--font-size-sm);
}

/* === SECTIONS === */
.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

.features-section {
    padding: 100px 0 80px;
    background: var(--primary-light);
    border-top: 4px dashed var(--border-color);
    border-bottom: 4px dashed var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px 32px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    text-align: center;
    padding: 40px 24px 32px;
    background: var(--surface-color);
    border-radius: 24px;
    box-shadow: 0 8px 0 var(--border-color);
    border: 3px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
    z-index: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 0 var(--border-color);
    border-color: var(--primary-color);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--secondary-color);
    box-shadow: 0 6px 0 var(--secondary-shadow);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -70px auto 24px;
    font-size: 36px;
    color: var(--surface-color);
    box-shadow: 0 6px 0 var(--primary-shadow);
    border: 4px solid var(--surface-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: rotate(-3deg);
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

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

/* === PAGE HEADER === */
.page-header {
    padding: 60px 0 40px;
    text-align: center;
    background: var(--bg-color);
}

.page-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    filter: drop-shadow(0px 3px 0px var(--primary-shadow));
    transform: rotate(-1deg);
}

.page-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
    font-weight: 500;
}

@media (max-width: 767px) {
    .page-header {
        padding: 40px 20px 20px;
    }
}

/* === CATEGORIES === */
.categories-preview,
.categories-section {
    padding: 80px 0;
    background: var(--surface-color);
}

.categories-filter-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.categories-filter-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--surface-color) 90%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.categories-filter-wrapper.is-scrolled-end::after {
    opacity: 0;
}

.categories-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
    padding-right: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.categories-filter::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

@media (min-width: 768px) {
    .categories-filter-wrapper::after {
        display: none;
    }
    .categories-filter {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 0;
        padding-right: 0;
    }
}

.filter-btn {
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--bg-color);
    color: var(--text-color);
    font-weight: 700;
    font-size: var(--font-size-base);
    font-family: 'Fredoka', inherit;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, color 0.2s;
}

.filter-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border-color);
    background: var(--primary-light);
}

.filter-btn.active {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-shadow);
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--primary-shadow);
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-card {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 0 var(--border-color);
    border: 3px solid var(--border-color);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 12px 0 var(--primary-light);
}

.category-card:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 var(--primary-light);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.category-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
}

.difficulty-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

.words-list .word.found {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-shadow);
    box-shadow: 0 0px 0 var(--accent-shadow);
    transform: translateY(4px);
    opacity: 0.8;
    text-decoration: line-through;
}

/* === WORD INSIGHTS === */
.found-words-insights {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed var(--border-color);
    animation: fadeInUp 0.4s ease-out;
}

.found-words-insights h3 {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 16px;
    text-align: center;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 0 var(--border-color);
    animation: fadeInUp 0.3s ease-out;
    text-align: left;
}

.insight-word {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 999px;
    text-transform: uppercase;
}

.insight-meaning {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    line-height: 1.5;
    font-weight: 600;
}

/* === TOAST === */
.difficulty-easy {
    background: var(--accent-color);
    color: #ffffff;
    border: 2px solid var(--accent-shadow);
    box-shadow: 0 3px 0 var(--accent-shadow);
}

.difficulty-medium {
    background: var(--secondary-color);
    color: #ffffff;
    border: 2px solid var(--secondary-shadow);
    box-shadow: 0 3px 0 var(--secondary-shadow);
}

.difficulty-hard {
    background: #ef4444;
    color: #ffffff;
    border: 2px solid #b91c1c;
    box-shadow: 0 3px 0 #b91c1c;
}

.category-card h3 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-color);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 1.5;
}

.category-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    font-weight: 700;
}

.stat i {
    font-size: 12px;
}

.category-progress {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background: var(--bg-color);
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 999px;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.15);
}

.category-play-btn {
    width: 100%;
}

/* === DAILY CHALLENGE === */
.daily-challenge {
    padding: 80px 0;
}

.challenge-card {
    background: linear-gradient(135deg, var(--secondary-color), #fcd34d);
    border-radius: 28px;
    padding: 32px;
    border: 4px solid var(--surface-color);
    box-shadow: 0 12px 0 var(--secondary-shadow), 0 24px 30px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    color: var(--surface-color);
    text-align: left;
}

.challenge-card::before {
    content: '\f091'; /* fa-trophy */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -40px;
    font-size: 160px;
    opacity: 0.15;
    transform: rotate(-15deg);
    pointer-events: none;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 12px;
}

.challenge-header h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 900;
    text-shadow: 0 3px 0 rgba(0,0,0,0.15);
    letter-spacing: -0.02em;
    margin: 0;
}

.challenge-timer {
    background: rgba(0,0,0,0.25);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: monospace;
    font-size: var(--font-size-lg);
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    color: #fff;
    letter-spacing: 2px;
}

.challenge-card p {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: 24px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    max-width: 80%;
}

.challenge-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.challenge-category, .challenge-reward {
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.challenge-category {
    background: var(--surface-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
}

.challenge-reward {
    background: var(--accent-color);
    color: var(--surface-color);
    box-shadow: 0 4px 0 var(--accent-shadow);
}

#daily-challenge-btn {
    width: 100%;
    font-size: var(--font-size-lg);
    font-weight: 800;
    padding: 16px;
    background: var(--surface-color);
    color: var(--secondary-color);
    border: 2px solid transparent;
    border-radius: 999px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
}

#daily-challenge-btn:active {
    box-shadow: 0 0px 0 rgba(0,0,0,0.1);
    transform: translateY(6px);
}

/* === STATS SECTION === */
.stats-section {
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: 32px 16px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-floating);
    border-color: var(--primary-light);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* === FAQ SECTION === */
.faq-section {
    padding: 100px 0;
    background: var(--surface-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-color);
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 6px 0 var(--border-color);
    border: 3px solid var(--border-color);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 var(--border-color);
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    padding: 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--surface-color);
}

.faq-icon {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-color);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.2s ease;
    background: var(--bg-color);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 0 var(--border-color);
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg) translateY(4px);
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-shadow);
    box-shadow: 0 0 0 transparent;
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 600;
    font-size: var(--font-size-base);
    border-top: 2px dashed transparent;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    border-top-color: var(--border-color);
    padding-top: 20px;
}

.faq-answer[hidden] {
    display: none;
}

/* === GAMEPLAY STYLES === */
.gameplay-body {
    background: var(--surface-color);
}

.gameplay-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.level-text {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1;
}

.level-number {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-color);
    line-height: 1;
}

.category-name {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-color);
}

.score-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: #ffffff;
    background: var(--secondary-color);
    padding: 6px 16px;
    border-radius: 999px;
    border: 2px solid var(--secondary-shadow);
    box-shadow: 0 3px 0 var(--secondary-shadow);
}

.game-info-bar {
    background: var(--bg-color);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-color);
    background: var(--surface-color);
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid var(--border-color);
    box-shadow: 0 3px 0 var(--border-color);
}

.info-item i {
    color: var(--primary-color);
}

/* === GAMEPLAY LAYOUT === */
.gameplay-body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.05) 2px, transparent 2px), 
        linear-gradient(90deg, rgba(139, 92, 246, 0.05) 2px, transparent 2px), 
        linear-gradient(rgba(139, 92, 246, 0.02) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(139, 92, 246, 0.02) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

/* Game Grid */
.game-container {
    padding: 24px 0;
}

.game-grid-container {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 12px; /* Extra space for the 3D shadow */
}

.game-grid {
    display: grid;
    gap: 2px;
    background: var(--border-color);
    border-radius: 12px;
    padding: 6px;
    width: 100%;
    max-width: min(100%, 600px);
    margin: 0 auto;
    overflow: hidden;
    touch-action: none; /* Helps prevent browser scroll when sliding on cells */
    
    /* 3D Board Relief Effect */
    border: 3px solid var(--border-color);
    box-shadow: 0 8px 0 var(--border-color), 0 14px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-cell {
    width: 100%;
    aspect-ratio: 1;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(12px, 3.5vw, 22px);
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    box-shadow: 0 3px 0 var(--border-color);
}

@media (min-width: 768px) {
    .grid-cell {
        font-size: clamp(14px, 2vw, var(--font-size-xl));
        border-width: 3px;
        box-shadow: 0 4px 0 var(--border-color);
        border-radius: 8px;
    }
}

.grid-cell:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border-color);
    background: var(--primary-light);
}

.grid-cell.selected {
    background: var(--primary-color);
    border-color: var(--primary-shadow);
    color: #FFFFFF;
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--primary-shadow);
}

@media (min-width: 768px) {
    .grid-cell:hover {
        transform: translateY(3px);
        box-shadow: 0 3px 0 var(--border-color);
    }
    .grid-cell.selected {
        transform: translateY(6px);
        box-shadow: 0 0 0 var(--primary-shadow);
    }
}

.grid-cell.found {
    background: var(--accent-color);
    border-color: var(--accent-shadow);
    color: #FFFFFF;
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--accent-shadow);
}

@media (min-width: 768px) {
    .grid-cell.found {
        transform: translateY(6px);
        box-shadow: 0 0 0 var(--accent-shadow);
    }
}

/* Words List */
.words-list-container {
    margin-bottom: 32px;
}

.words-list-container h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    color: var(--text-color);
}

.words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.word-item {
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    border: 2px solid transparent;
    transition: var(--transition);
}

.word-item.found {
    background: var(--accent-color);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Game Actions */
.game-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === MODALS === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--surface-color);
    color: var(--text-color);
}

.modal-body {
    padding: 24px;
}

/* === LOADING SCREEN === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-screen.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 24px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

@media (min-width: 768px) {
    .toast-container {
        bottom: 32px;
    }
}

.toast {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 999px;
    margin-top: 12px;
    transform: translateY(50px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: max-content;
    max-width: 90vw;
    text-align: center;
    font-weight: 800;
    font-size: var(--font-size-sm);
    border: 3px solid var(--border-color);
    box-shadow: 0 6px 0 var(--border-color), 0 12px 20px rgba(0,0,0,0.15);
    pointer-events: auto;
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast.success {
    border-color: var(--accent-color);
    color: var(--accent-shadow);
    box-shadow: 0 6px 0 var(--accent-shadow);
}

.toast.error {
    border-color: #ef4444;
    color: #b91c1c;
    box-shadow: 0 6px 0 #b91c1c;
}

.toast.warning {
    border-color: var(--secondary-color);
    color: var(--secondary-shadow);
    box-shadow: 0 6px 0 var(--secondary-shadow);
}


/* === BEAUTIFUL FOOTER === */
.app-footer {
    padding: 40px 0 100px 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    color: var(--text-secondary);
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

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

.footer-brand {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-brand {
        text-align: left;
    }
}

.footer-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.footer-brand h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 4px;
    font-weight: 800;
}

.footer-brand p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-share-section {
    display: flex;
    justify-content: center;
}

.share-btn {
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px var(--primary-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.footer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0 0 24px 0;
    opacity: 0.5;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer-nav .separator {
    color: var(--border-color);
}

.footer-credits {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (min-width: 768px) {
    .footer-credits {
        align-items: flex-end;
    }
}

.b20-link {
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: none;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}
/* === MODALS (Game Aesthetic) === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-color);
    width: 100%;
    max-width: 480px;
    border-radius: 28px;
    padding: 32px 24px;
    border: 4px solid var(--border-color);
    box-shadow: 0 16px 0 var(--border-color), 0 24px 40px rgba(0,0,0,0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--border-color);
    transition: transform 0.1s, box-shadow 0.1s;
    flex-shrink: 0;
}

.modal-close:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border-color);
}

.celebration-icon {
    font-size: 48px;
    animation: pulse 2s infinite;
}

.completion-stats, .pause-stats {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.05);
}

.stat-large {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px dashed var(--border-color);
}

.stat-value {
    font-size: 56px;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 0 4px 0 var(--accent-shadow);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stats-grid .stat, .pause-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.pause-stats .stat {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.pause-stats .stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stats-grid .stat i {
    font-size: 24px;
    color: var(--primary-color);
}

.stats-grid .stat span, .pause-stats .stat span:last-child {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text-color);
}

.stats-grid .stat small, .pause-stats .stat span:first-child {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-secondary);
}

.biblical-insight {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 3px solid var(--secondary-color);
    box-shadow: 6px 6px 0 var(--secondary-shadow);
}

.biblical-insight h4 {
    color: var(--secondary-color);
    font-weight: 800;
    font-size: var(--font-size-lg);
    margin-bottom: 12px;
}

.biblical-insight p {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 16px;
    line-height: 1.5;
}

.bible-verse {
    font-style: italic;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    background: var(--bg-color);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.bible-verse cite {
    display: block;
    margin-top: 8px;
    font-weight: 800;
    font-style: normal;
    color: var(--text-color);
}

.completion-actions, .pause-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 480px) {
    .completion-actions, .pause-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .completion-actions .btn, .pause-actions .btn {
        flex: 1;
    }
    .completion-actions .btn-outline, .pause-actions .btn-outline {
        flex-basis: 100%;
    }
}

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

.hidden {
    display: none !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-width: 0;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .btn {
        padding: 10px 20px;
        font-size: var(--font-size-sm);
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: var(--font-size-base);
    }
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

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

/* Focus styles */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.5);
    }
}

.footer-share {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}
.share-btn {
    padding: 12px 32px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px var(--primary-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.share-btn:active {
    transform: scale(0.95);
}
