/* Group Members Modal Styles (Blue Theme) */
.group-modal {
    display: none;
    /* Toggled to flex by JS */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    /* Darker backdrop for the blue modal */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease-out;
}

.group-modal-content {
    /* BLUE THEME BACKGROUND */
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    /* Fallback if vars aren't loaded, usually blue */
    background-color: #2563EB;
    padding: 50px 30px;
    border-radius: 40px;
    width: 90%;
    max-width: 480px;
    box-shadow:
        0 20px 60px rgba(37, 99, 235, 0.4),
        /* Blue Shadow */
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    text-align: center;
    border: none;
    animation: modalBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    /* Default text white */
}

/* Pulsing Aura REMOVED - Clean Style */
.group-modal-content::before {
    display: none;
}

@keyframes animeGlow {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

@keyframes modalBounceIn {
    0% {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.group-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white */
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.group-close:hover {
    background: white;
    color: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Slides Container */
.group-slides {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.group-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.group-slide.active {
    display: flex;
}

/* Image Container for Rotation Effect */
.img-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatImage 4s ease-in-out infinite;
}

/* Moving Border - White on Blue */
.img-wrapper::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    /* Subtle white ring */
    z-index: 0;
}

@keyframes rotateBorder {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes floatImage {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.group-slide img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    /* Crisp white border */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    background: white;
}

/* Typography - Clean White */
.group-slide h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    /* White text */
    background: none;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    letter-spacing: -0.5px;
    transform: scale(0.9);
    animation: popText 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    animation-delay: 0.1s;
    line-height: 1.2;
    padding: 0 10px;
}

.group-slide p.metric-id {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    /* Slightly dimmed white */
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: slideUpFade 0.5s ease forwards 0.2s;
}

@keyframes slideUpFade {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes popText {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Navigation Buttons - White Glassy */
.group-prev,
.group-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
    color: white;
    font-size: 1.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    /* Glassy white */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    z-index: 30;
}

/* Push buttons slightly outside the card */
.group-prev {
    left: -25px;
}

.group-next {
    right: -25px;
}

.group-prev:hover,
.group-next:hover {
    transform: translateY(-50%) scale(1.1);
    background: white;
    color: var(--primary-color);
    /* Blue text on white hover */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .group-modal-content {
        padding: 30px 20px;
        width: 85%;
    }

    .group-prev {
        left: -10px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .group-next {
        right: -10px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .group-slide h3 {
        font-size: 2rem;
    }

    .img-wrapper {
        width: 140px;
        height: 140px;
    }

    .group-slide img {
        width: 130px;
        height: 130px;
    }
}

/* --- ANIMATIONS (Keep existing logic keys) --- */
.slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    display: flex;
}

.slide-out-left {
    animation: slideOutLeft 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    display: flex;
}

.slide-in-left {
    animation: slideInLeft 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    display: flex;
}

.slide-out-right {
    animation: slideOutRight 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    display: flex;
}

@keyframes slideInRight {
    0% {
        transform: translateX(60%) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-60%) scale(0.8);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-60%) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(60%) scale(0.8);
        opacity: 0;
    }
}

/* Remove old nav button style if unused, or keep for legacy/fallback (keeping minimal just in case) */
.group-modal-btn {
    display: none;
    /* Hidden as we are moving to floating button */
}

/* Colorful Modern student Design */
:root {
    /* Background - Cool & Clean */
    --bg-body: #F0F4F8;

    /* Surfaces */
    --surface: #FFFFFF;
    --shadow-soft: 0 10px 25px rgba(148, 163, 184, 0.15);
    --shadow-hover: 0 20px 40px rgba(148, 163, 184, 0.25);

    /* Vibrant Identity */
    --primary-color: #3B82F6;
    /* Vibrant Blue */
    --primary-hover: #2563EB;
    --accent-yellow: #F59E0B;
    --accent-red: #EF4444;
    --accent-green: #10B981;

    /* Gradients for Borders/Highlights */
    --gradient-germany: linear-gradient(90deg, #111827 0%, #EF4444 50%, #F59E0B 100%);
    --gradient-malaysia: linear-gradient(90deg, #1E3A8A 0%, #EF4444 50%, #F59E0B 100%);
    --gradient-fun: linear-gradient(135deg, #6EE7B7 0%, #3B82F6 100%);

    /* Typography */
    --font-main: 'Poppins', sans-serif;
    --text-main: #1F2937;
    --text-light: #6B7280;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    /* Subtle dot pattern for texture without clutter */
    background-image: radial-gradient(#CBD5E1 1px, transparent 1px);
    background-size: 20px 20px;
    margin: 0;
    padding: 0;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
}

/* H1 & Hero Typography */
.hero-title {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-section {
    text-align: center;
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header & Nav */
/* Header & Nav */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 15px 40px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 40px;
    width: auto;
}

nav {
    display: flex;
    gap: 10px;
}

/* Nav Links are handled by nav a below, just need to reset container */
/* Old nav styles removed */

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Card Containers (replacing glass-panel logic) */
.glass-panel,
.container,
.game-container,
.game-box,
.drop-zone,
.fun-facts {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    max-width: 800px;
    width: 90%;
    /* Responsive width */
    margin: 20px auto;
    border-top: 8px solid var(--primary-color);
    /* Pop of color */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

/* Germany specific card border */
.glass-panel:has(h2:contains("Deutschland")),
.game-container:has(h1:contains("Deutsch")),
.game-box:has(.flag img[src*="flagde"]) {
    border-top-color: #EF4444;
    /* Red top */
}

/* Hover Effect for Cards */
.glass-panel:hover,
.container:hover,
.game-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Buttons - Chunky & colorful */
button,
.btn {
    font-family: var(--font-main);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0px #1D4ED8;
    /* Hard shadow for 'clicky' feel */
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    margin: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0px #1D4ED8;
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 0px 0px #1D4ED8;
}

/* Inputs */
input[type="text"],
input[type="number"] {
    width: 70%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #F9FAFB;
    text-align: center;
    font-family: var(--font-main);
    transition: border-color 0.2s;
    margin: 10px 0;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

/* Game Elements - Brand Cards */
/* Game Elements - Brand Cards */
.game-box img,
.flag img {
    max-width: 150px;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
}

.brand-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin: 15px;
    display: inline-block;
    vertical-align: top;
    width: 200px;
    box-shadow: var(--shadow-soft);
    border-bottom: 4px solid #E5E7EB;
    transition: transform 0.2s;
}

/* Override for Grid Layout to match .game-card */
.game-grid .brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    margin: 0;
    height: 100%;
    /* Match game-card style */
    padding: 30px;
    border-radius: 20px;
    border-bottom: none;
    border-top: 8px solid var(--primary-color);
    box-shadow: var(--shadow-soft);
    justify-content: flex-start;
    text-align: center;
}

.game-grid .brand-card p {
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

.game-grid .brand-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--accent-yellow);
    border-bottom: none;
}

.brand-card img {
    border-radius: 12px;
    max-width: 100%;
    height: 100px;
    /* Fixed height for consistency */
    object-fit: contain;
    /* Keep aspect ratio */
    margin-bottom: 15px;
}

/* Hint Boxes */
.hint-box,
.brand-hint {
    background: #FEF3C7;
    /* Soft Yellow */
    color: #92400E;
    /* Dark Yellow/Brown */
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    margin: 10px;
    border: 2px solid #FCD34D;
}

.hint-box.blue,
.brand-hint.blue {
    background: #DBEAFE;
    /* Soft Blue */
    color: #1E40AF;
    /* Dark Blue */
    border-color: var(--primary-color);
}


.clue-text {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}


/* Feedback */
.feedback {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 15px;
    border-radius: 12px;
}

.feedback.correct {
    background: #D1FAE5;
    color: #065F46;
    border: 2px solid #34D399;
}

.feedback.wrong {
    background: #FEE2E2;
    color: #991B1B;
    border: 2px solid #F87171;
}

.feedback:empty {
    display: none;
}

/* Drop Zones */
.drop-zone {
    border: 3px dashed #CBD5E1;
    background: white;
    min-height: 450px;
}

.drop-zone.hover {
    background: #EFF6FF;
    border-color: var(--primary-color);
}

/* Memory Cards */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    width: 100%;
    margin: 30px auto;
}

.card {
    width: 100%;
    height: 100px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card.matched {
    background: var(--accent-green);
    cursor: default;
    transform: none;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    /* Inset for 'pressed' look */
}

/* Fun Facts Card */
/* Styling inherited from .glass-panel */
.fun-facts h3 {
    margin-top: 0;
    color: var(--text-main);
}

/* Footer */
footer {
    color: var(--text-light);
    margin-top: 40px;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    padding-bottom: 20px;
}

/* Exit Button */
#exitBtn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

#exitBtn:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* Language Selector in Games */
.lang-selector {
    position: fixed;
    top: 110px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.lang-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 0;
}

.lang-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.15);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* -------------------------------------------------- */
/* 🔼 FLOATING ACTION BUTTONS (MODERN UI)          */
/* -------------------------------------------------- */

/* Common Styles for Floating Buttons */
#topBtn,
#musicToggle,
#groupBtn {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */

    /* Modern Gradient Blue Body */
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;

    /* Soft Shadow */
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);

    /* Glass border feel */
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Hover Effects */
#topBtn:hover,
#musicToggle:hover,
#groupBtn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

/* Active Click Effect */
#topBtn:active,
#musicToggle:active,
#groupBtn:active {
    transform: translateY(0) scale(0.95);
}

/* --- Position Specifics --- */

/* Scroll To Top - Bottom Right */
#topBtn {
    bottom: 30px;
    right: 30px;
    display: none;
    /* Hidden by default */
}

#topBtn.show {
    display: flex;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Music Toggle - Bottom Left */
#musicToggle {
    bottom: 30px;
    left: 30px;
}

/* Group Button - Above Music Toggle */
#groupBtn {
    bottom: 130px;
    left: 30px;
    /* Background inherited from common style (Blue) */
}

#groupBtn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4);
}

/* --- States --- */

/* Muted State (Red Gradient) */
#musicToggle.muted {
    background: linear-gradient(135deg, #EF4444, #C0392B);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

#musicToggle.muted:hover {
    background: linear-gradient(135deg, #C0392B, #EF4444);
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.5);
}

/* Playing State (Pulse Animation) */
#musicToggle:not(.muted)::after,
#groupBtn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0;
    z-index: -1;
    animation: ripple 2s infinite;
}

#musicIcon,
#groupBtn .icon {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}



.hidden {
    display: none;
}

/* Game Menu Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.game-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border-top: 8px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--accent-yellow);
}

.game-card h3 {
    margin: 15px 0 10px;
    font-size: 1.4rem;
    color: var(--text-main);
}

.game-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.game-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.game-card .play-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Language Buttons on Home Page */
.lang-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.lang-buttons button {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 0px #1D4ED8;
    transition: all 0.2s ease;
}

.lang-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0px #1D4ED8;
}

.lang-buttons button:active {
    transform: translateY(2px);
    box-shadow: 0 0px 0px #1D4ED8;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Tablet and smaller devices (768px and below) */
@media screen and (max-width: 768px) {

    /* Header adjustments */
    .site-header {
        flex-direction: column;
        padding: 15px 20px;
        gap: 15px;
    }

    .logo {
        font-size: 1.4rem;
        gap: 10px;
    }

    .logo img {
        height: 30px;
    }

    /* Navigation - Stack vertically or wrap */
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    nav a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Hero section */
    .hero-section {
        padding: 30px 15px 15px;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    /* Language buttons */
    .lang-buttons {
        gap: 10px;
    }

    .lang-buttons button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    /* Cards and containers */
    .glass-panel,
    .container,
    .game-container,
    .game-box,
    .drop-zone,
    .fun-facts {
        padding: 25px 20px;
        width: 95%;
        border-radius: 16px;
        border-top-width: 6px;
    }

    /* Typography */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.95rem;
    }

    /* Buttons - Make them more touch-friendly */
    button,
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        margin: 8px 5px;
        border-radius: 10px;
    }

    /* Inputs - Full width on mobile */
    input[type="text"],
    input[type="number"] {
        width: 90%;
        padding: 12px;
        font-size: 1rem;
    }

    /* Game grid - Single column on mobile */
    .game-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
        margin: 20px auto;
    }

    .game-card {
        padding: 25px;
        min-height: 180px;
    }

    .game-card h3 {
        font-size: 1.2rem;
    }

    .game-card p {
        font-size: 0.9rem;
    }

    .game-card .icon {
        font-size: 2.5rem;
    }

    /* Memory game board - 3 columns on mobile */
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
        padding: 0 10px;
    }

    .card {
        height: 80px;
        font-size: 0.85rem;
    }

    /* Brand cards */
    .brand-card {
        width: 100%;
        margin: 10px 0;
        padding: 15px;
    }

    .game-grid .brand-card {
        padding: 20px;
    }

    .brand-card img {
        height: 80px;
    }

    /* Hint boxes */
    .hint-box,
    .brand-hint {
        padding: 12px 20px;
        font-size: 1.1rem;
        margin: 8px 0;
    }

    .clue-text {
        font-size: 1rem;
    }

    /* Feedback */
    .feedback {
        font-size: 1rem;
        padding: 12px;
    }

    /* Exit button - Smaller on mobile */
    #exitBtn {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.9rem;
        border-radius: 25px;
    }

    /* Language selector - Adjust position */
    .lang-selector {
        top: 95px;
        right: 15px;
        gap: 8px;
    }

    .lang-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Scroll to top button */
    #topBtn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }

    /* Drop zones */
    .drop-zone {
        min-height: 300px;
        padding: 20px;
    }

    /* Game box images */
    .game-box img,
    .flag img {
        max-width: 120px;
        margin-bottom: 15px;
    }

    /* Footer */
    footer {
        font-size: 0.85rem;
        padding-bottom: 15px;
        margin-top: 30px;
    }
}

/* Small phones (480px and below) */
@media screen and (max-width: 480px) {

    /* Further reduce sizes for very small screens */
    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 25px;
    }

    nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .glass-panel,
    .container,
    .game-container,
    .game-box {
        padding: 20px 15px;
    }

    button,
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* Memory game - 2 columns for very small screens */
    .game-board {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card {
        height: 70px;
        font-size: 0.75rem;
    }

    .lang-buttons button {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    #exitBtn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .lang-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Large desktop screens (1200px and above) */
@media screen and (min-width: 1200px) {

    .glass-panel,
    .container,
    .game-container,
    .game-box {
        max-width: 900px;
    }

    .game-grid {
        max-width: 1200px;
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Landscape orientation adjustments for mobile ONLY */
@media screen and (max-height: 600px) and (orientation: landscape) and (max-width: 900px) {
    .hero-section {
        padding: 20px 15px 10px;
    }

    .hero-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .glass-panel,
    .game-container,
    .game-box {
        padding: 20px;
    }

    #exitBtn {
        top: 10px;
        right: 10px;
    }

    .lang-selector {
        top: 85px;
        right: 10px;
    }
}