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

:root {
    /* Soft, Kid-Friendly Color Palette */
    --primary-color: #ec774b;
    --secondary-color: #c44569;
    --accent-purple: #a29bfe;
    --accent-blue: #74b9ff;
    --accent-green: #55efc4;
    --accent-yellow: #ffeaa7;
    --accent-orange: #fd79a8;

    /* Neutral Colors */
    --white: #ffffff;
    --cream: #fff9f0;
    --light-gray: #f8f9fa;
    --medium-gray: #e0e0e0;
    --text-dark: #343434;
    --text-light: #636e72;

    /* Fonts */
    --font-heading: "Love Ya Like A Sister", cursive;
    --font-body: "Fuzzy Bubbles", cursive;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 50px;

    /* Shadows - More Depth */
    --shadow-sm: 3px 3px 6px rgba(0, 0, 0, 0.15);
    --shadow-md: 6px 6px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 10px 10px 20px rgba(0, 0, 0, 0.25);
    --shadow-inset: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: linear-gradient(180deg, #fff9f0 0%, #ffe8f0 50%, #e8f4ff 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(
            circle at 20% 30%,
            rgba(255, 107, 157, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(162, 155, 254, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 50% 50%,
            rgba(116, 185, 255, 0.03) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

body.game-page {
    padding: 30px;
}

body.game-page::before {
    border: 30px solid #ffffff;
    z-index:100;
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== Navigation ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    border-bottom: 6px solid transparent;
    border-image: linear-gradient(
            90deg,
            var(--primary-color),
            var(--accent-purple),
            var(--accent-blue),
            var(--accent-green),
            var(--accent-yellow)
        )
        1;
    position: relative;
}

.navbar::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary-color) 0px,
        var(--primary-color) 20px,
        var(--accent-purple) 20px,
        var(--accent-purple) 40px,
        var(--accent-blue) 40px,
        var(--accent-blue) 60px,
        var(--accent-green) 60px,
        var(--accent-green) 80px,
        var(--accent-yellow) 80px,
        var(--accent-yellow) 100px
    );
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-image {
    height: 80px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--accent-purple),
        var(--accent-blue)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 1px;
    display: inline-block;
    position: relative;
}

.logo-text::after {
    content: "";
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-style: dashed;
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%,
    100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--text-dark);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    padding: calc(var(--spacing-xl) * 2) 0;
    background: url("../images/background/kids-bg.jpg") center center / cover
        no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    min-height: 750px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #ec774b 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 100%
    );
    z-index: 1;
}

/* Decorative Geometric Shapes in Hero */
.hero-content::before {
    content: "";
    position: absolute;
    top: 10%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    z-index: 0;
}

.hero-content::after {
    content: "";
    position: absolute;
    bottom: 15%;
    right: -3%;
    width: 120px;
    height: 120px;
    background: rgba(255, 234, 167, 0.2);
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    animation: morph 10s ease-in-out infinite reverse;
    z-index: 0;
}

@keyframes morph {
    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg);
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
        transform: rotate(180deg);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-subtitle-heading {
    font-family: var(--font-heading);
    font-size: 3em;
    font-weight: 400;
    color: var(--white);
    line-height: 1em;
    margin: 0;
    letter-spacing: 2px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 9em;
    font-weight: 400;
    color: var(--white);
    line-height: 1em;
    margin: var(--spacing-sm) 0;
    letter-spacing: 3px;
}

.hero-title .highlight {
    color: var(--accent-yellow);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(255, 234, 167, 0.4);
    z-index: -1;
    border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    transform: rotate(-1deg);
}

.hero-title .highlight::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: -5px;
    right: -5px;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 234, 167, 0.6) 0px,
        rgba(255, 234, 167, 0.6) 10px,
        transparent 10px,
        transparent 20px
    );
    z-index: -2;
}

.hero-subtitle {
    font-size: 1.4em;
    color: rgba(255, 255, 255, 0.98);
    /* margin-top: var(--spacing-lg); */
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.2rem;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-xl);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--accent-yellow),
        var(--accent-orange)
    );
    color: var(--text-dark);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-bottom: 5px solid rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border-bottom-width: 7px;
}

.btn-primary:active {
    transform: translateY(-2px);
    border-bottom-width: 3px;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 5px solid var(--white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-yellow);
}

.btn-play {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--accent-orange)
    );
    color: var(--white);
    padding: calc(var(--spacing-sm) * 1.2) var(--spacing-lg);
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(236, 119, 75, 0.3);
    border-bottom: 3px solid rgba(0, 0, 0, 0.15);
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-top: auto;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(236, 119, 75, 0.4);
    border-bottom-width: 4px;
    background: linear-gradient(
        135deg,
        var(--accent-orange),
        var(--primary-color)
    );
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 3px dashed var(--primary-color);
    padding: var(--spacing-md) var(--spacing-xl);
    position: relative;
}

.btn-outline::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px dotted var(--accent-purple);
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.btn-outline:hover::after {
    opacity: 0.5;
}

/* ===== Hero Animal Card Stack ===== */
.hero-cards {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 500px;
}

.animal-card-stack {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 550px;
}

.animal-card {
    position: absolute;
    width: 200px;
    height: 240px;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid #f0f0f0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.animal-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Default positions - spread out in 2x2 grid */
.animal-card.card-1 {
    top: 20px;
    left: 20px;
    transform: rotate(-8deg);
    z-index: 1;
}

.animal-card.card-2 {
    top: 20px;
    right: 20px;
    transform: rotate(6deg);
    z-index: 2;
}

.animal-card.card-3 {
    bottom: 20px;
    left: 20px;
    transform: rotate(5deg);
    z-index: 3;
}

.animal-card.card-4 {
    bottom: 20px;
    right: 20px;
    transform: rotate(-7deg);
    z-index: 4;
}

/* Hover effect - shuffle and rearrange positions */
.animal-card-stack:hover .animal-card.card-1 {
    top: 50px;
    left: 50px;
    transform: rotate(12deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 4;
}

.animal-card-stack:hover .animal-card.card-2 {
    top: 80px;
    right: 60px;
    transform: rotate(-15deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

.animal-card-stack:hover .animal-card.card-3 {
    bottom: 60px;
    left: 80px;
    transform: rotate(-10deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.animal-card-stack:hover .animal-card.card-4 {
    bottom: 40px;
    right: 40px;
    transform: rotate(8deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 1;
}

/* Individual card hover within the stack */
.animal-card:hover {
    transform: scale(1.15) rotate(0deg) !important;
    z-index: 10 !important;
}

/* Legacy floating shapes - keeping for other pages if needed */
.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(8px 8px 16px rgba(0, 0, 0, 0.3));
}

.shape-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.1);
}

.animal-float {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.35));
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    padding: 1rem;
}

.animal-1 {
    top: 5%;
    left: 5%;
    animation-delay: 0s;
    max-width: 240px;
}

.animal-2 {
    bottom: 20%;
    right: 8%;
    animation-delay: 1.5s;
    max-width: 200px;
}

.animal-3 {
    top: 40%;
    right: 3%;
    animation-delay: 2.5s;
    max-width: 180px;
}

.shape-circle {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(255, 234, 167, 0.2);
}

.shape-1 {
    top: 2%;
    left: 35%;
    animation-delay: 1s;
}

.shape-squiggle {
    width: 100px;
    height: 100px;
    border: 4px dashed rgba(255, 255, 255, 0.6);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: rgba(255, 107, 157, 0.2);
}

.shape-2 {
    bottom: 5%;
    left: 15%;
    animation-delay: 2s;
}

.shape-doodle {
    width: 90px;
    height: 90px;
    border: 4px solid rgba(255, 255, 255, 0.6);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: rgba(162, 155, 254, 0.2);
    border-style: dotted;
}

.shape-3 {
    top: 55%;
    left: 8%;
    animation-delay: 0.5s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-25px) rotate(5deg);
    }
    66% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

/* ===== Wavy Divider ===== */
.wave-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin: 0;
    position: relative;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-divider--top {
    transform: rotate(180deg);
    margin-bottom: -1px;
}

.wave-divider--bottom {
    margin-top: -1px;
}

/* ===== Decorative Animals ===== */
.decorative-animal {
    position: absolute;
    max-width: 250px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(6px 6px 12px rgba(0, 0, 0, 0.15));
    z-index: 1;
    animation: gentle-float 8s ease-in-out infinite;
}

.animal-left {
    left: -50px;
    top: 20%;
    transform: rotate(-15deg);
}

.animal-right {
    right: -50px;
    bottom: 15%;
    transform: rotate(15deg);
}

@keyframes gentle-float {
    0%,
    100% {
        transform: translateY(0) rotate(-15deg);
    }
    50% {
        transform: translateY(-20px) rotate(-10deg);
    }
}

.animal-right {
    animation-name: gentle-float-right;
}

@keyframes gentle-float-right {
    0%,
    100% {
        transform: translateY(0) rotate(15deg);
    }
    50% {
        transform: translateY(-20px) rotate(20deg);
    }
}

/* ===== Section Styles ===== */
.featured-games,
.features {
    padding: calc(var(--spacing-xl) * 2) 0;
    position: relative;
    background: linear-gradient(
        180deg,
        rgba(255, 250, 245, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
    overflow: hidden;
}

.featured-games {
    padding: calc(var(--spacing-md) * 2) 0;
    background-image:
        linear-gradient(
            180deg,
            rgba(255, 250, 245, 0.85) 0%,
            rgba(255, 255, 255, 0.85) 100%
        ),
        url("../images/background/bg-01.jpg");
    background-size: contain;
    background-position: center top;
    background-repeat: repeat;
}

.featured-games::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle, var(--accent-blue) 1.5px, transparent 1.5px),
        radial-gradient(circle, var(--primary-color) 1.5px, transparent 1.5px),
        radial-gradient(circle, var(--accent-purple) 1.5px, transparent 1.5px);
    background-size:
        100px 100px,
        150px 150px,
        120px 120px;
    background-position:
        0 0,
        50px 50px,
        75px 25px;
    opacity: 0.05;
    z-index: 0;
}

.featured-games::after {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(255, 107, 157, 0.05) 0%,
        transparent 70%
    );
    border-radius: 50%;
    z-index: 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: "";
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    width: 35px;
    height: 35px;
    border: 3px solid var(--primary-color);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.7;
}

.section-title::after {
    content: "";
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%) rotate(15deg);
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent-purple);
    border-radius: 50%;
    border-style: dashed;
    opacity: 0.7;
}

.section-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 150px;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary-color) 0px,
        var(--primary-color) 12px,
        transparent 12px,
        transparent 18px
    );
    border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

.section-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

.section-footer::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -35px;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-yellow);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: bounce-gentle 2s ease-in-out infinite;
}

/* ===== Games Grid ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.game-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid var(--medium-gray);
    position: relative;
    display: flex;
    flex-direction: column;
}

.game-card::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 10%;
    right: 10%;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    filter: blur(4px);
    transition: all 0.3s ease;
}

.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-purple),
        var(--accent-blue)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.game-card:hover::after {
    bottom: -6px;
    height: 10px;
    opacity: 0.3;
}

.game-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.game-card-image::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
}

.game-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.game-category {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(236, 119, 75, 0.3);
}

.game-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-placeholder::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 70%
    );
    transform: scale(0);
    transition: transform 0.6s ease;
}

.game-card:hover .game-placeholder::before {
    transform: scale(1);
}

.game-icon {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
    animation: icon-pulse 3s ease-in-out infinite;
    object-fit: contain;
}

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

.game-card:hover .game-icon {
    transform: scale(1.15) rotate(5deg);
    animation: none;
}

.game-card-content {
    padding: var(--spacing-md);
    background: var(--white);
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-card-content::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border: 3px dashed var(--primary-color);
    opacity: 0.1;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.game-card-content::after {
    content: "";
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    border: 3px dotted var(--accent-blue);
    opacity: 0.1;
    border-radius: 50%;
}

.game-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.game-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

/* ===== Age Filter ===== */
.age-filter-container {
    background: linear-gradient(135deg, #fff8f0 0%, #ffe6f0 100%);
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.age-filter-container::before {
    content: "🎨";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 3rem;
    opacity: 0.1;
}

.age-filter-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.filter-icon {
    font-size: 2rem;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.age-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.age-filter-btn {
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    position: relative;
}

.age-filter-btn:hover {
    background: var(--accent-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(236, 119, 75, 0.3);
}

.age-filter-btn:active {
    transform: translateY(0);
}

.age-filter-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 20px rgba(236, 119, 75, 0.4);
}

.age-filter-btn.active:hover {
    background: var(--accent-purple);
}

.btn-badge {
    background: rgba(236, 119, 75, 0.2);
    color: var(--text-dark);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.age-filter-btn.active .btn-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.filter-description {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
    text-align: center;
}

.game-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-card.filtered-out {
    opacity: 0;
    transform: scale(0.8);
}

/* ===== Floating Characters ===== */
.floating-character {
    position: absolute;
    max-width: 200px;
    height: auto;
    opacity: 0.85;
    filter: drop-shadow(8px 8px 15px rgba(0, 0, 0, 0.2));
    animation: bounce-gentle 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

.character-1 {
    top: 10%;
    right: 5%;
    animation-delay: 0s;
}

.character-2 {
    bottom: -10%;
    left: 0;
    animation-delay: 2s;
    max-width: 180px;
    z-index: 10;
}

@keyframes bounce-gentle {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* ===== Features Grid ===== */
.features {
    background: url("../images/background/bg-02.jpg");
    background-size: contain;
    background-position: center top;
    background-repeat: repeat;
    position: relative;
    overflow: hidden;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

.feature-card {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
    border: 4px dashed transparent;
    position: relative;
    overflow: hidden;
}

.feature-card:nth-child(1) {
    border-color: rgba(255, 107, 157, 0.3);
}
.feature-card:nth-child(2) {
    border-color: rgba(162, 155, 254, 0.3);
}
.feature-card:nth-child(3) {
    border-color: rgba(116, 185, 255, 0.3);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 107, 157, 0.05),
        rgba(162, 155, 254, 0.05)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.feature-card:nth-child(1):hover {
    border-color: var(--primary-color);
}
.feature-card:nth-child(2):hover {
    border-color: var(--accent-purple);
}
.feature-card:nth-child(3):hover {
    border-color: var(--accent-blue);
}

.feature-icon {
    font-size: 4rem;
    margin: 0 auto var(--spacing-md);
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(-5deg);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.feature-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #2d3561 0%, #1a1a2e 100%);
    color: var(--white);
    padding: calc(var(--spacing-xl) * 1.5) 0 var(--spacing-md);
    position: relative;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Colorful top border with gradient */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary-color) 0px,
        var(--primary-color) 30px,
        var(--accent-purple) 30px,
        var(--accent-purple) 60px,
        var(--accent-blue) 60px,
        var(--accent-blue) 90px,
        var(--accent-green) 90px,
        var(--accent-green) 120px,
        var(--accent-yellow) 120px,
        var(--accent-yellow) 150px
    );
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Decorative wave pattern */
.footer::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q 25 0, 50 10 T 100 10' stroke='rgba(255,255,255,0.03)' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: 0.5;
    animation: wave 20s linear infinite;
}

@keyframes wave {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 0;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: calc(var(--spacing-lg) * 1.5);
    margin-bottom: calc(var(--spacing-lg) * 1.5);
    position: relative;
    z-index: 1;
}

/* Brand section with logo */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-logo {
    height: 60px;
    width: fit-content;
    filter: brightness(1.2) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.6;
    font-family: var(--font-body);
}

.footer-decoration {
    display: flex;
    gap: 1rem;
    margin-top: var(--spacing-sm);
}

.footer-emoji {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}

.footer-emoji:nth-child(1) {
    animation-delay: 0s;
}

.footer-emoji:nth-child(2) {
    animation-delay: 0.5s;
}

.footer-emoji:nth-child(3) {
    animation-delay: 1s;
}

.footer-emoji:nth-child(4) {
    animation-delay: 1.5s;
}

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

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
    color: var(--white);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-purple)
    );
    border-radius: 2px;
}

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

.footer-links li {
    margin-bottom: var(--spacing-sm);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.footer-links li:hover {
    transform: translateX(5px);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(236, 119, 75, 0.3);
}

.footer-bottom {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    position: relative;
}

.footer-bottom p {
    position: relative;
    z-index: 1;
}

/* Responsive footer */
@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }

    .footer-logo {
        height: 50px;
    }

    .footer-decoration {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

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

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .footer-links a {
        justify-content: center;
    }
}

/* ===== Accessibility Enhancements ===== */

/* Skip to main content link for screen readers and keyboard users */
.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-to-main:focus {
    left: 0;
    outline: 4px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Enhanced focus indicators for keyboard navigation */
*:focus {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
}

button:focus,
a:focus,
.btn:focus {
    outline: 4px solid var(--accent-yellow);
    outline-offset: 4px;
}

/* High contrast focus for game cards */
.game-card:focus-within {
    outline: 4px solid var(--primary-color);
    outline-offset: 4px;
    box-shadow: 0 0 0 8px rgba(236, 119, 75, 0.2);
}

/* Enhanced touch targets - minimum 44x44px for accessibility */
.nav-menu a,
.btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle {
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
}

/* Larger touch targets for children on touch devices */
@media (pointer: coarse) {
    .btn,
    .nav-menu a {
        min-height: 56px;
        min-width: 56px;
        padding: var(--spacing-md) var(--spacing-xl);
    }

    .game-card {
        cursor: pointer;
    }

    .mobile-menu-toggle {
        min-height: 56px;
        min-width: 56px;
        padding: var(--spacing-md);
    }
}

/* Reduce motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Responsive Design ===== */

/* Tablet Landscape (iPad Pro, iPad Air) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-lg);
    }

    .hero {
        min-height: 600px;
        padding: calc(var(--spacing-xl) * 1.5) 0;
    }

    .hero-content {
        gap: var(--spacing-lg);
    }

    .hero-subtitle-heading {
        font-size: 2.5em;
    }

    .hero-title {
        font-size: 7em;
    }

    .hero-subtitle {
        font-size: 1.3em;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .animal-float {
        max-width: 180px !important;
    }
}

/* Tablet Portrait (iPad) - Optimized for kids using tablets */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg) 0;
        z-index: 999;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Better spacing for readability on tablets */
    .container {
        padding: 0 var(--spacing-lg);
    }

    .hero {
        min-height: 500px;
        padding: var(--spacing-xl) 0;
        background-attachment: scroll;
    }

    .page-hero {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: var(--spacing-xl) 0;
        background-attachment: scroll;
    }

    .games-hero-large {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: var(--spacing-xl) 0;
        background-attachment: scroll;
    }

    .games-hero-large .page-title {
        font-size: 3rem;
    }

    .games-hero-large .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Age Filter responsive */
    .age-filter-container {
        padding: var(--spacing-lg);
    }

    .filter-title {
        font-size: 1.3rem;
    }

    .age-filter-btn {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-content::before,
    .hero-content::after {
        display: none;
    }

    .hero-subtitle-heading {
        font-size: 2em;
        letter-spacing: 1.5px;
    }

    .hero-title {
        font-size: 6em;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.3em;
        line-height: 1.6;
    }

    .animal-card-stack {
        max-width: 480px;
        height: 480px;
    }

    .animal-card {
        width: 170px;
        height: 200px;
        padding: 1.2rem;
    }

    /* Default positions for tablet - spread out */
    .animal-card.card-1 {
        top: 15px;
        left: 15px;
    }

    .animal-card.card-2 {
        top: 15px;
        right: 15px;
    }

    .animal-card.card-3 {
        bottom: 15px;
        left: 15px;
    }

    .animal-card.card-4 {
        bottom: 15px;
        right: 15px;
    }

    /* Hover positions for tablet */
    .animal-card-stack:hover .animal-card.card-1 {
        top: 40px;
        left: 40px;
        transform: rotate(10deg) scale(1.05);
    }

    .animal-card-stack:hover .animal-card.card-2 {
        top: 60px;
        right: 50px;
        transform: rotate(-12deg) scale(1.05);
    }

    .animal-card-stack:hover .animal-card.card-3 {
        bottom: 50px;
        left: 60px;
        transform: rotate(-8deg) scale(1.05);
    }

    .animal-card-stack:hover .animal-card.card-4 {
        bottom: 35px;
        right: 35px;
        transform: rotate(7deg) scale(1.05);
    }

    .shape {
        font-size: 2.5rem !important;
    }

    .animal-float {
        max-width: 140px !important;
    }

    .decorative-animal,
    .floating-character {
        display: none;
    }

    /* Tablet-optimized grid - 2 columns for better layout */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .game-card-image {
        height: 180px;
    }

    /* Keep 2 columns on tablet for features */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .section-title {
        font-size: 2.8rem;
    }

    .section-title::before,
    .section-title::after {
        display: none;
    }

    .page-title {
        font-size: 3rem;
    }

    .page-hero .page-title::before,
    .page-hero .page-title::after {
        display: none;
    }

    .logo-image {
        height: 70px;
    }

    .logo-text::after {
        right: -35px;
        width: 25px;
        height: 25px;
        border-width: 2px;
    }

    /* Larger buttons for touch on tablets */
    .btn {
        padding: var(--spacing-md) calc(var(--spacing-lg) * 1.2);
        font-size: 1.3rem;
    }

    .btn-play {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1.25rem;
    }

    /* Better touch targets for navigation */
    .nav-menu a {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1.4rem;
    }
}

/* Mobile phones - Extra touch-friendly for kids */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .logo-image {
        height: 60px;
    }

    .logo-text {
        font-size: 1.7rem;
    }

    .logo-text::after {
        right: -30px;
        width: 20px;
        height: 20px;
        border-width: 2px;
    }

    .hero {
        min-height: 450px;
        background-attachment: scroll;
        background-position: center center;
        padding: calc(var(--spacing-lg) * 1.5) 0;
    }

    .page-hero {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: var(--spacing-lg) 0;
    }

    .games-hero-large {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: var(--spacing-lg) 0;
    }

    .games-hero-large .page-title {
        font-size: 2.2rem;
    }

    .games-hero-large .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 var(--spacing-md);
    }

    .hero-subtitle-heading {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .hero-title {
        font-size: 4em;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        font-size: 1.15em;
        padding: 0 var(--spacing-sm);
    }

    .section-title {
        font-size: 2rem;
        padding: 0 var(--spacing-sm);
    }

    .section-subtitle {
        font-size: 1.1rem;
        padding: 0 var(--spacing-md);
    }

    .page-title {
        font-size: 2.2rem;
    }

    .page-hero {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
        padding: var(--spacing-lg) 0;
    }

    /* Full-width stacked buttons for easy tapping */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-md);
    }

    /* Extra large touch targets for children */
    .btn {
        width: 100%;
        text-align: center;
        font-size: 1.2rem;
        padding: calc(var(--spacing-md) * 1.2) var(--spacing-lg);
        min-height: 56px;
    }

    .btn-play {
        font-size: 1.2rem;
        padding: calc(var(--spacing-md) * 1.2) var(--spacing-lg);
        min-height: 56px;
    }

    /* Age Filter mobile */
    .age-filter-container {
        padding: var(--spacing-md);
    }

    .filter-title {
        font-size: 1.2rem;
    }

    .age-filter-buttons {
        justify-content: center;
    }

    .age-filter-btn {
        flex: 1 1 calc(50% - var(--spacing-xs));
        min-width: 120px;
        justify-content: center;
    }

    .hero-cards {
        padding: 1rem;
    }

    .animal-card-stack {
        max-width: 340px;
        height: 380px;
    }

    .animal-card {
        width: 140px;
        height: 160px;
        padding: 0.8rem;
        border-radius: 15px;
        border-width: 2px;
    }

    /* Default positions for mobile - spread out */
    .animal-card.card-1 {
        top: 10px;
        left: 10px;
    }

    .animal-card.card-2 {
        top: 10px;
        right: 10px;
    }

    .animal-card.card-3 {
        bottom: 10px;
        left: 10px;
    }

    .animal-card.card-4 {
        bottom: 10px;
        right: 10px;
    }

    /* Hover effect on mobile - shuffle positions */
    .animal-card-stack:hover .animal-card.card-1 {
        top: 30px;
        left: 30px;
        transform: rotate(8deg) scale(1.05);
    }

    .animal-card-stack:hover .animal-card.card-2 {
        top: 50px;
        right: 40px;
        transform: rotate(-10deg) scale(1.05);
    }

    .animal-card-stack:hover .animal-card.card-3 {
        bottom: 40px;
        left: 50px;
        transform: rotate(-7deg) scale(1.05);
    }

    .animal-card-stack:hover .animal-card.card-4 {
        bottom: 25px;
        right: 25px;
        transform: rotate(6deg) scale(1.05);
    }

    .animal-float {
        max-width: 120px !important;
        padding: 0.5rem;
    }

    /* Single column for cards on mobile */
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .game-card-image {
        height: 180px;
    }

    .game-card-content {
        padding: var(--spacing-lg);
    }

    .game-title {
        font-size: 1.4rem;
    }

    .game-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Single column for features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .feature-card {
        padding: var(--spacing-lg);
    }

    .feature-title {
        font-size: 1.5rem;
    }

    .feature-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Mobile navigation - larger touch targets */
    .nav-menu a {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1.3rem;
        min-height: 56px;
    }

    .mobile-menu-toggle {
        min-height: 56px;
        min-width: 56px;
    }

    /* Content cards on mobile */
    .content-card {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }

    .content-card h3 {
        font-size: 1.6rem;
    }

    .content-card p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .faq-item {
        padding: var(--spacing-md);
    }

    .faq-question {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .faq-answer {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .footer-title {
        padding-left: 0;
    }

    .footer-title::before {
        display: none;
    }

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

    .wave-divider svg {
        height: 50px;
    }
}

/* ===== About Page Styles ===== */
.page-hero {
    padding: calc(var(--spacing-xl) * 1.5) 0;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffeaa7 100%);
    color: var(--text-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    display: flex;
    align-items: center;
}

/* Scattered Decorative Circles */
.page-hero::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 5%;
    width: 80px;
    height: 80px;
    border: 5px dashed rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin-slow 20s linear infinite;
    z-index: 0;
}

.page-hero::after {
    content: "";
    position: absolute;
    bottom: 15%;
    right: 8%;
    width: 100px;
    height: 100px;
    border: 5px dotted rgba(255, 255, 255, 0.6);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 8s ease-in-out infinite;
    z-index: 0;
}

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

.games-hero {
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-orange) 100%
    );
}

.games-hero::before,
.games-hero::after {
    opacity: 0.5;
}

.games-hero-large {
    padding: calc(var(--spacing-xl) * 1.5) 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    display: flex;
    align-items: center;
}

/* Fun Wavy Pattern Overlay */
.games-hero-large::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(
            circle at 20% 80%,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 40%,
            rgba(255, 234, 167, 0.1) 0%,
            transparent 50%
        );
    z-index: 0;
}

/* Scattered Decorative Shapes */
.games-hero-large::after {
    content: "★";
    position: absolute;
    top: 15%;
    right: 10%;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    animation: twinkle 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) rotate(180deg);
    }
}

.games-hero-large .page-title {
    position: relative;
    z-index: 2;
    color: var(--white);
    font-size: 4.5rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15));
}

.games-hero-large .hero-subtitle {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 400;
    /* margin-bottom: var(--spacing-md); */
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

/* Fun Decorative Shapes Around Page Title */
.page-hero .page-title::before {
    content: "●";
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    animation: bounce-gentle 2s ease-in-out infinite;
}

.page-hero .page-title::after {
    content: "■";
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    animation: bounce-gentle 2s ease-in-out infinite 1s;
}

/* Additional Decorative Doodles for About Page */
.page-hero .container::before {
    content: "";
    position: absolute;
    top: 20%;
    right: 15%;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

.page-hero .container::after {
    content: "";
    position: absolute;
    bottom: 25%;
    left: 12%;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 7s ease-in-out infinite 2s;
    z-index: 0;
}

/* Scattered Stars for Games Hero */
.games-hero-large .container::before {
    content: "✦";
    position: absolute;
    top: 25%;
    left: 8%;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.4);
    animation: twinkle 4s ease-in-out infinite 1s;
    z-index: 0;
}

.games-hero-large .container::after {
    content: "◆";
    position: absolute;
    bottom: 20%;
    left: 15%;
    font-size: 2rem;
    color: rgba(255, 234, 167, 0.5);
    animation: float 5s ease-in-out infinite;
    transform: rotate(45deg);
    z-index: 0;
}

.content-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
    background: var(--white);
}

.content-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
    border-left: 6px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.content-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.content-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.content-card h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary-color) 0px,
        var(--primary-color) 8px,
        transparent 8px,
        transparent 16px
    );
}

.content-card p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.faq-item {
    background: var(--light-gray);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

.faq-question {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.5px;
}

.faq-answer {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===== Game Page Styles ===== */
.game-container {
    padding: var(--spacing-lg) 0;
}

.game-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.game-window {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-canvas {
    width: 100%;
    max-width: 800px;
    height: 600px;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--spacing-md);
}

.back-link {
    display: inline-block;
    margin: var(--spacing-lg) 0;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

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

/* ===== Additional Accessibility Enhancements ===== */

/* Ensure sufficient color contrast for text */
.hero-subtitle,
.section-subtitle,
.game-description,
.feature-description,
.faq-answer {
    color: #111;
    font-weight: 400;
}

.hero-text .hero-subtitle,
.footer-text {
    color: #fff;
    font-weight: 400;
}

/* Make links more accessible */
a:not(.btn) {
    color: var(--primary-color);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:not(.btn):hover {
    text-decoration-thickness: 3px;
}

/* Ensure buttons have visible focus states even on touch */
.btn:focus-visible {
    outline: 4px solid var(--accent-yellow);
    outline-offset: 4px;
}

/* Screen reader only content */
.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;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn,
    .game-card,
    .feature-card,
    .content-card {
        border-width: 3px;
        border-style: solid;
    }

    .btn-primary {
        border-color: var(--text-dark);
    }

    .game-card {
        border-color: var(--primary-color);
    }
}

/* Print styles */
@media print {
    .navbar,
    .mobile-menu-toggle,
    .hero-cards,
    .animal-card-stack,
    .decorative-animal,
    .floating-character,
    .footer,
    .btn {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .container {
        max-width: 100% !important;
    }
}

/* ===== Game Page Responsive Enhancements ===== */
@media (max-width: 768px) {
    .game-window {
        padding: var(--spacing-md);
        min-height: 400px;
    }

    .game-canvas {
        height: auto;
        min-height: 400px;
        padding: var(--spacing-md);
    }

    .game-header .section-title {
        font-size: 2.2rem;
    }

    .instructions {
        font-size: 1.1rem;
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .game-window {
        padding: var(--spacing-sm);
        min-height: 350px;
        border-radius: var(--radius-md);
    }

    .game-canvas {
        min-height: 350px;
        padding: var(--spacing-sm);
    }

    .game-header .section-title {
        font-size: 1.8rem;
    }

    .instructions {
        font-size: 1rem;
        line-height: 1.6;
    }

    .back-link {
        font-size: 1rem;
        margin: var(--spacing-md) 0;
    }
}

/* ===== Page Transition Loader ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8f0 50%, #e8f4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    animation: fadeInScale 0.6s ease;
}

.loader-logo {
    width: 200px;
    height: auto;
    animation: pulse 2s ease-in-out infinite;
}

.loader-text {
    margin-top: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

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

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

@media (max-width: 768px) {
    .loader-logo {
        width: 150px;
    }

    .loader-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 120px;
    }

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

/* ===== Mobile Bottom Navigation (App-Style) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 249, 240, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    border-top: 2px solid transparent;
    border-image: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-purple),
        var(--accent-blue)
    ) 1;
    padding: 0.3rem 0 calc(0.3rem + env(safe-area-inset-bottom));
    z-index: 1000;
    display: none;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 0.6rem;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    position: relative;
    min-width: 42px;
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    opacity: 0;
    border-radius: var(--radius-sm);
    transition: opacity 0.3s ease;
}

.bottom-nav-item.active::before {
    opacity: 0.12;
}

.bottom-nav-icon {
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.15) translateY(-1px);
}

.bottom-nav-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

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

.bottom-nav-item.active .bottom-nav-label {
    font-weight: 700;
}

/* Show bottom nav on mobile */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }

    /* Hide desktop nav on mobile */
    .navbar {
        display: none;
    }

    /* Add padding to body to account for bottom nav */
    body {
        padding-bottom: 45px;
    }

    .game-container {
        padding-bottom: calc(var(--spacing-xl) + 45px);
    }
}

/* Enhanced Mobile Game Cards */
@media (max-width: 768px) {
    .game-card {
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border-width: 3px;
        background: linear-gradient(135deg, #ffffff 0%, #faf9f7 100%);
    }

    .game-card:active {
        transform: translateY(-2px) scale(0.98);
    }

    .game-card-image {
        height: 220px;
    }

    .game-icon {
        max-width: 140px;
        max-height: 140px;
    }

    .game-title {
        font-size: 1.6rem;
        font-weight: 600;
    }

    .game-description {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .btn-play {
        font-size: 1.3rem;
        padding: var(--spacing-md) var(--spacing-xl);
        min-height: 60px;
        font-weight: 700;
        letter-spacing: 0.5px;
    }
}

/* Mobile-First Typography Enhancements */
@media (max-width: 768px) {
    body {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .section-title {
        font-size: 2.5rem;
        font-weight: 600;
        text-align: center;
    }

    .section-subtitle {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .hero-subtitle-heading {
        font-size: 2.2em;
    }

    .hero-title {
        font-size: 5em;
        font-weight: 600;
    }

    .hero-subtitle {
        font-size: 1.25em;
        line-height: 1.7;
        padding-left: 0;
        padding-top: var(--spacing-md);
    }

    .hero-cards {
        display: none;
    }
}

/* Vibrant Color Enhancements for Mobile */
@media (max-width: 768px) {
    .featured-games {
        background: linear-gradient(180deg,
            rgba(255, 250, 245, 0.95) 0%,
            rgba(255, 240, 245, 0.95) 50%,
            rgba(240, 248, 255, 0.95) 100%
        );
    }

    .page-hero {
        background: linear-gradient(135deg,
            #ff6b9d 0%,
            #c44569 50%,
            #ffa07a 100%
        );
    }

    .games-hero-large {
        background: linear-gradient(135deg,
            #667eea 0%,
            #764ba2 30%,
            #f093fb 70%,
            #ffd3a5 100%
        );
    }
}

/* App-Style Animations for Touch */
@media (max-width: 768px) {
    @keyframes tap-feedback {
        0% {
            transform: scale(1);
        }
        50% {
            transform: scale(0.95);
        }
        100% {
            transform: scale(1);
        }
    }

    .btn:active,
    .game-card:active,
    .age-filter-btn:active {
        animation: tap-feedback 0.2s ease;
    }

    /* Add bounce animation to icons */
    .bottom-nav-item:active .bottom-nav-icon {
        animation: iconBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    @keyframes iconBounce {
        0%, 100% {
            transform: scale(1.2) translateY(-2px);
        }
        50% {
            transform: scale(1.4) translateY(-6px);
        }
    }
}

/* Mobile Header Simplification */
@media (max-width: 768px) {
    .page-hero,
    .games-hero-large {
        padding: calc(var(--spacing-lg) * 1.5) 0;
    }

    .page-title {
        font-size: 2.8rem;
        font-weight: 700;
        text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.25);
    }
}

/* Enhanced Touch Targets for Kids */
@media (max-width: 768px) and (pointer: coarse) {
    .game-card {
        margin-bottom: var(--spacing-lg);
    }

    .btn,
    .age-filter-btn {
        min-height: 64px;
        font-size: 1.3rem;
        padding: var(--spacing-md) calc(var(--spacing-lg) * 1.5);
    }

    .btn-play {
        min-height: 68px;
        font-size: 1.4rem;
    }

    .bottom-nav-item {
        min-width: 48px;
        padding: 0.45rem 0.75rem;
    }

    .bottom-nav-icon {
        font-size: 1.2rem;
    }
}
