/* =========================================
   GLOBAL STYLES
========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Noto Sans Malayalam', sans-serif;
    background: #fdfdfd;
    color: #181d21;
}

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


/* =========================================
   HEADER
========================================= */

.header {
    border-bottom: 1px solid #d5dce5;
    background: white;
}

.header-inner {
    max-width: 1220px;
    margin: auto;
    min-height: 82px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date {
    position: absolute;
    left: 4%;
    top: 45px;
    font-size: 12px;
    font-weight: 600;
    color: #414957;
}

.brand {
    text-align: center;
}

.logo {
    color: #1674bd;
    font-size: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logo-icon {
    background: #1976bc;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}


.brand-sep {
    margin: 0 4px;
}


/* =========================================
   MAIN CONTAINER
========================================= */

.container {
    width: 88%;
    max-width: 1320px;
    margin: 30px auto 80px;
}


/* =========================================
   NAVIGATION
========================================= */

/* Category menu scroller (arrows + edge fades) */
.nav-scroller {
    position: relative;
    margin-bottom: 32px;
}

.nav-scroller .navigation {
    margin-bottom: 0;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #cfd8e3;
    background: #fff;
    color: #005d91;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.nav-arrow:hover {
    background: #005d91;
    color: #fff;
}

.nav-arrow-left  { left: 0; }
.nav-arrow-right { right: 0; }

.nav-scroller.can-left  .nav-arrow-left,
.nav-scroller.can-right .nav-arrow-right {
    display: inline-flex;
}

/* soft fade under the arrows so cut-off items look intentional */
.nav-scroller::before,
.nav-scroller::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.nav-scroller::before { left: 0;  background: linear-gradient(to right, #fdfdfd 40%, rgba(253,253,253,0)); }
.nav-scroller::after  { right: 0; background: linear-gradient(to left,  #fdfdfd 40%, rgba(253,253,253,0)); }
.nav-scroller.can-left::before,
.nav-scroller.can-right::after {
    opacity: 1;
}

.nav-item:focus { outline: none; }
.nav-item:focus-visible { outline: 2px solid #005d91; outline-offset: 2px; }

.navigation.dragging { cursor: grabbing; }
.navigation.dragging .nav-item { pointer-events: none; }

a.logo { text-decoration: none; }

.navigation {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;          /* keep all categories on one line */
    gap: 6px;
    margin-bottom: 32px;
    overflow-x: auto;           /* scroll sideways if the screen is narrow */
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;      /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
}

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

.nav-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid #cfd8e3;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    background: white;
    transition: 0.2s;
}

.nav-item.active,
.nav-item:hover {
    background: #005d91;
    color: white;
    border-color: #005d91;
}

.nav-item small {
    font-size: 11px;
}

.orange-icon {
    color: #a34600;
}

.green-icon {
    color: #006b60;
}

.blue-icon {
    color: #005d91;
}

.nav-item.active i,
.nav-item:hover i {
    color: white;
}


/* =========================================
   AUTOMATIC GAME THUMBNAIL SLIDER
========================================= */

.thumbnail-slider {
    width: 100%;
    margin: 25px auto 35px;
    position: relative;
}

.thumbnail-slider-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 0;
    background: transparent;
}

.thumbnail-slider-track {
    display: flex;
    width: 100%;
    gap: 0;
    padding: 0;
    margin: 0;
    transition: transform 0.7s ease-in-out;
}

.thumbnail-slide {
    display: block;
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 500px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
}

.thumbnail-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Slider Game Name */

.thumbnail-game-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 35px 20px 20px;
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.8)
    );
    text-align: center;
}

.thumbnail-game-title h2 {
    color: #ffffff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    overflow-wrap: anywhere;
}


/* Hide Arrows and Navigation Dots */

.thumbnail-arrow,
.thumbnail-slider-dots {
    display: none !important;
}


/* Missing Slider Thumbnail */

.thumbnail-slide-placeholder {
    width: 100%;
    height: 100%;
    background: #e6f0f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #005d91;
}

.thumbnail-slide-placeholder i {
    font-size: 70px;
}


/* =========================================
   SECTION HEADING
========================================= */

.section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 30px;
}

.heading-icon {
    background: #005d91;
    color: white;
    width: 51px;
    height: 49px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex-shrink: 0;
}

.section-heading h2 {
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.8px;
}

.section-heading p {
    font-family: 'Noto Sans Malayalam', sans-serif;
    font-size: 14px;
    color: #414957;
    margin-top: 5px;
}


/* =========================================
   GAME GRID
========================================= */

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 50px 46px;
}


/* =========================================
   GAME CARD
========================================= */

.game-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: white;
    border: 1px solid #d4dce6;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 4px 0 #d5dae1;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px #00000015;
}


/* =========================================
   GAME CARD THUMBNAIL
========================================= */

.game-image {
    display: block;
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: #edf4fa;
}

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


/* =========================================
   CATEGORY AND GAME BADGES
========================================= */

.top-category,
.category,
.extra-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.top-category {
    position: absolute;
    top: 9px;
    left: 9px;
}

.image-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.category {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.blue {
    background: #00659c;
}

.orange {
    background: #a44600;
}

.green,
.new {
    background: #00695c;
}

.popular {
    background: #ffca00;
    color: #352800;
}


/* =========================================
   GAME INFORMATION
========================================= */

.game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 5px 0;
    margin-top: 5px;
}

.game-text {
    flex: 1;
    min-width: 0;
}

.game-text h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 5px;
    overflow-wrap: anywhere;
}

.game-text p {
    font-family: 'Noto Sans Malayalam', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
    overflow-wrap: anywhere;
}


/* =========================================
   PLAY BUTTON
========================================= */

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    background: #005d91;
    color: white;
    padding: 10px 18px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: 0.2s;
}

.play-button i {
    font-size: 11px;
}

.play-button:hover {
    background: #00476f;
}


/* =========================================
   MAKE ENTIRE GAME CARD CLICKABLE
========================================= */

.game-card:not(.video-game-card) {
    cursor: pointer;
}

.game-card:not(.video-game-card) .play-button {
    position: static;
}

.game-card:not(.video-game-card) .play-button::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: inherit;
}


/* =========================================
   MISSING GAME THUMBNAIL
========================================= */

.game-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #e8f2fa;
    color: #005d91;
}

.game-placeholder i {
    font-size: 40px;
}

.game-placeholder span {
    font-size: 13px;
    color: #64748b;
}


/* =========================================
   NO GAMES MESSAGE
========================================= */

.no-games-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-games-message i {
    font-size: 45px;
    color: #005d91;
    margin-bottom: 15px;
}

.play-unavailable {
    color: #64748b;
    font-size: 12px;
}


/* =========================================
   VIDEO SECTION
========================================= */

.latest-videos {
    margin-top: 50px;
}

.video-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.video-section-header h2 {
    font-size: 30px;
    font-weight: 700;
}

.video-section-header p {
    font-size: 14px;
    color: #64748b;
    margin-top: 5px;
}

.view-all-videos {
    color: #005d91;
    font-size: 14px;
    font-weight: 600;
}

.view-all-videos:hover {
    text-decoration: underline;
}

.video-game-card .game-image {
    cursor: pointer;
}

.video-game-card .game-info {
    justify-content: flex-start;
}


/* =========================================
   TABLET RESPONSIVE DESIGN
========================================= */

@media (max-width: 1000px) {

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px;
    }

    .date {
        display: none;
    }

}

@media (max-width: 768px) {

    .thumbnail-slide {
        height: 300px;
    }

}


/* =========================================
   MOBILE RESPONSIVE DESIGN
========================================= */

@media (max-width: 600px) {

    .container {
        width: 94%;
        margin-top: 20px;
    }

    .navigation {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        margin-bottom: 20px;
    }

    .nav-item {
        white-space: nowrap;
        font-size: 12px;
    }

    .thumbnail-slider {
        margin: 20px auto 25px;
    }

    .thumbnail-slider-wrapper {
        border-radius: 15px;
    }

    .thumbnail-game-title {
        padding: 25px 12px 15px;
    }

    .thumbnail-game-title h2 {
        font-size: 20px;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .section-heading p {
        font-size: 11px;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .game-info {
        padding: 12px 5px;
    }

    .game-text h3 {
        font-size: 16px;
    }

    .video-section-header h2 {
        font-size: 24px;
    }

}

@media (max-width: 480px) {

    .thumbnail-slide {
        height: 220px;
    }

}
/* Fix Category Game Section */

#games {
    display: block;
    width: 100%;
}

#games .section-heading {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
}

#gamesContainer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 30px;
    align-items: start;
}

#gamesContainer .game-card {
    width: 100%;
    min-width: 0;
}

#gamesContainer .game-image {
    width: 100%;
    height: 200px;
}

#gamesContainer .game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#gamesContainer .game-text h3 {
    word-break: normal;
    overflow-wrap: break-word;
}

/* Tablet */

@media (max-width: 1000px) {
    #gamesContainer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 600px) {
    #gamesContainer {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   HOMEPAGE FOOTER
========================================= */

.home-footer {
    width: 100%;
    background: #0b3954;
    color: #ffffff;
    padding: 20px 0;
}

.home-footer-container {
    width: 88%;
    max-width: 1320px;
    margin: 0 auto;
}

/* All Games Link */

.footer-all-games {
    text-align: center;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-all-games a {
    color: #81d4fa;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.footer-all-games a:hover {
    color: #ffffff;
}

/* Footer Bottom */

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 15px;
}

/* Social Media Sharing */

.footer-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-share span {
    font-size: 14px;
    font-weight: 600;
}

.footer-share button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.footer-share button:hover {
    background: #1674bd;
    transform: translateY(-3px);
}

/* Copyright */

.footer-copyright {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
}

/* Mobile Responsive */

@media (max-width: 600px) {

    .home-footer-container {
        width: 94%;
    }

    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 15px;
    }

    .footer-copyright {
        font-size: 11px;
    }

}

.game-card {
    height: 330px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.game-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.game-info h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-info p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-btn {
    flex-shrink: 0;
}

/* AI Generated Image Credit */

.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.footer-copyright .ai-image-credit {
    color: #d5e2eb;
    font-size: 12px;
    font-weight: 400;
}

.footer-copyright .copyright-divider {
    color: #8ba9bc;
}

/* Mobile Responsive */

@media (max-width: 600px) {

    .footer-copyright {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .footer-copyright .copyright-divider {
        display: none;
    }

}


/* =========================================
   HERO BANNER (text over game thumbnail)
========================================= */

.thumbnail-slider-wrapper {
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.thumbnail-slide {
    height: 420px;
}

.thumbnail-slide img {
    position: absolute;
    inset: 0;
    transition: transform 0.6s ease;
}

.thumbnail-slide:hover img {
    transform: scale(1.03);
}

.thumbnail-game-title {
    display: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.45) 35%,
        rgba(0, 0, 0, 0) 62%
    );
    pointer-events: none;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 4%;
    transform: translateY(-50%);
    width: min(44%, 520px);
    color: #ffffff;
    text-align: left;
}

.hero-title {
    font-family: 'Luckiest Guy', 'Noto Sans Malayalam', 'Poppins', cursive;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 1px;
    margin: 0 0 18px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    overflow-wrap: anywhere;
}

.hero-title-top {
    display: block;
    color: #ffe03a;
    font-size: 56px;
}

.hero-title-bottom {
    display: block;
    color: #ffffff;
    font-size: 56px;
}

.hero-description {
    font-size: 15px;
    line-height: 1.6;
    color: #f3f3f3;
    margin-bottom: 22px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 12px 26px;
    background: #e3191f;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 0 #a90f14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.2s, box-shadow 0.2s;
}

.thumbnail-slide:hover .hero-play-btn {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #a90f14;
}

.hero-play-btn i {
    font-size: 13px;
}

/* "Pick Your Game" heading in the same style */

#games .section-heading h2 {
    font-family: 'Luckiest Guy', 'Noto Sans Malayalam', 'Poppins', cursive;
    font-weight: 400;
    letter-spacing: 1px;
    color: #ffb400;
    font-size: 38px;
}

@media (max-width: 1000px) {

    .hero-content {
        width: 60%;
    }

    .hero-title-top,
    .hero-title-bottom {
        font-size: 44px;
    }

}

@media (max-width: 768px) {

    .thumbnail-slide {
        height: 340px;
    }

    .hero-overlay {
        background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.5) 55%,
            rgba(0, 0, 0, 0.15) 100%
        );
    }

    .hero-content {
        width: 80%;
    }

    .hero-title-top,
    .hero-title-bottom {
        font-size: 36px;
    }

    .hero-description {
        font-size: 13px;
    }

}

@media (max-width: 480px) {

    .thumbnail-slide {
        height: 300px;
    }

    .hero-content {
        left: 6%;
        width: 88%;
    }

    .hero-title-top,
    .hero-title-bottom {
        font-size: 30px;
    }

    .hero-description {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 16px;
    }

    .hero-play-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    #games .section-heading h2 {
        font-size: 30px;
    }

}


/* =========================================
   GAME CARD TITLES - same font as hero banner
========================================= */

.game-text h3,
#gamesContainer .game-text h3 {
    font-family: 'Luckiest Guy', 'Noto Sans Malayalam', 'Poppins', cursive;
    font-weight: 400;
    font-size: 24px;
    letter-spacing: 1px;
    line-height: 1.2;
    color: #000000;
}

@media (max-width: 600px) {

    .game-text h3,
    #gamesContainer .game-text h3 {
        font-size: 20px;
    }

}

/* =========================================
   COMPACT, DIMMED FOOTER
   (smaller text + muted colours; overrides earlier footer rules)
========================================= */

.home-footer,
.game-footer {
    padding-top: 14px;
    padding-bottom: 12px;
}

.footer-all-games {
    padding-bottom: 10px;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-all-games a,
.all-games-link a {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}

.footer-all-games a:hover,
.all-games-link a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.footer-bottom,
.game-footer-bottom {
    padding-top: 10px;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.footer-share span,
.share-section span {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
}

.footer-share,
.share-section {
    gap: 6px;
}

.footer-share button,
.share-button {
    width: 26px;
    height: 26px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
}

.footer-share button:hover,
.share-button:hover {
    color: #ffffff;
}

.landing-copyright,
.footer-copyright,
.copyright {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.45);
}

.landing-copyright .ai-image-credit,
.footer-copyright .ai-image-credit,
.copyright .ai-image-credit,
.game-footer .ai-image-credit {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

.landing-copyright .copyright-divider,
.footer-copyright .copyright-divider,
.game-footer .copyright-divider {
    color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {

    .landing-copyright,
    .footer-copyright,
    .copyright {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 2px;
    }

    .landing-copyright .copyright-divider,
    .footer-copyright .copyright-divider,
    .game-footer .copyright-divider {
        display: none;
    }

}

/* =========================================
   MOBILE HEADER: smaller logo, room for the theme button
========================================= */

@media (max-width: 600px) {

    .header-inner {
        min-height: 64px;
        padding: 8px 56px;      /* keeps the logo clear of the theme switch */
    }

    .logo {
        font-size: 18px;
        gap: 6px;
    }

    .logo-icon {
        width: 22px;
        height: 22px;
        border-radius: 6px;
        font-size: 12px;
    }

    .brand-links {
        font-size: 10px;
        margin-top: 2px;
    }

    .brand-links a {
        margin: 0 3px;
    }

    .header-inner .theme-toggle {
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
    }

}

@media (max-width: 360px) {

    .logo {
        font-size: 16px;
    }



}

/* =========================================
   HERO SLIDER: SOFT CROSS-FADE + SLOW ZOOM
   (enabled by script.js adding .is-fade)
========================================= */

.thumbnail-slider.is-fade .thumbnail-slider-track {
    display: grid;
    transform: none !important;
    transition: none;
}

.thumbnail-slider.is-fade .thumbnail-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    transition: opacity 1.6s ease-in-out, visibility 0s linear 1.6s;
}

.thumbnail-slider.is-fade .thumbnail-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition: opacity 1.6s ease-in-out, visibility 0s;
}

/* outgoing slide stays visible underneath while the new one fades in */
.thumbnail-slider.is-fade .thumbnail-slide.is-leaving {
    visibility: visible;
    z-index: 1;
}

/* slow zoom on the active picture */
.thumbnail-slider.is-fade .thumbnail-slide img {
    transform: scale(1.0);
    transition: none;
}

.thumbnail-slider.is-fade .thumbnail-slide.is-active img {
    animation: hero-kenburns calc(var(--slide-interval, 7000ms) + 2000ms) ease-out forwards;
}

.thumbnail-slider.is-fade .thumbnail-slide.is-leaving img {
    transform: scale(1.08);
}

.thumbnail-slider.is-fade.is-paused .thumbnail-slide.is-active img {
    animation-play-state: paused;
}

@keyframes hero-kenburns {
    from { transform: scale(1.0)  translate(0, 0); }
    to   { transform: scale(1.08) translate(-1.5%, -1%); }
}

/* text floats in after the picture */
.thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-title,
.thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-description,
.thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-play-btn {
    animation: hero-text-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-title       { animation-delay: 0.5s; }
.thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-description { animation-delay: 0.75s; }
.thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-play-btn    { animation-delay: 1.0s; }

@keyframes hero-text-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Dots with a progress fill ---------- */

.thumbnail-slider.is-fade .thumbnail-slider-dots {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.thumbnail-slider.is-fade .thumbnail-dot {
    position: relative;
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #c9d6e2;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.4s ease, background 0.3s ease;
}

.thumbnail-slider.is-fade .thumbnail-dot:hover {
    background: #9fb4c7;
}

.thumbnail-slider.is-fade .thumbnail-dot.active {
    width: 38px;
    background: #c9d6e2;
}

.thumbnail-slider.is-fade .thumbnail-dot.active::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #005d91;
    transform-origin: left center;
    animation: hero-dot-progress var(--slide-interval, 7000ms) linear forwards;
}

.thumbnail-slider.is-fade.is-paused .thumbnail-dot.active::after {
    animation-play-state: paused;
}

@keyframes hero-dot-progress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

html[data-theme="dark"] .thumbnail-slider.is-fade .thumbnail-dot {
    background: #2a3744;
}

html[data-theme="dark"] .thumbnail-slider.is-fade .thumbnail-dot.active::after {
    background: #6cc4f5;
}

@media (prefers-reduced-motion: reduce) {
    .thumbnail-slider.is-fade .thumbnail-slide,
    .thumbnail-slider.is-fade .thumbnail-slide.is-active {
        transition-duration: 0.01s;
    }
    .thumbnail-slider.is-fade .thumbnail-slide.is-active img,
    .thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-title,
    .thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-description,
    .thumbnail-slider.is-fade .thumbnail-slide.is-active .hero-play-btn {
        animation: none;
    }
}

/* =========================================
   GAME CARD - thumbnail fills the card edge to edge (no gap)
========================================= */

.game-card {
    padding: 0;
    height: auto;
}

.game-card .game-image,
#gamesContainer .game-image {
    border-radius: 24px 24px 0 0;
}

.game-card .game-info {
    flex: 0 0 auto;
    padding: 12px 16px;
    margin-top: 0;
}

/* =========================================
   STICKY CATEGORY BAR (stays on top while scrolling)
========================================= */

.nav-scroller {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px 0;
    background: #fdfdfd;
    /* stretch the background across the full screen width */
    box-shadow: 0 0 0 100vmax #fdfdfd;
    clip-path: inset(0 -100vmax);
    transition: box-shadow 0.2s;
}

.nav-scroller.is-stuck {
    box-shadow: 0 0 0 100vmax #fdfdfd, 0 6px 14px -6px rgba(15, 23, 42, 0.18);
    clip-path: inset(0 -100vmax -20px);
}

html[data-theme="dark"] .nav-scroller {
    background: #0f1720;
    box-shadow: 0 0 0 100vmax #0f1720;
}

html[data-theme="dark"] .nav-scroller.is-stuck {
    box-shadow: 0 0 0 100vmax #0f1720, 0 6px 14px -6px rgba(0, 0, 0, 0.6);
}

@media (max-width: 600px) {

    .nav-scroller {
        padding: 8px 0;
    }

}

/* =========================================
   CATEGORY TILES (pastel cards with icon)
========================================= */

.navigation {
    gap: 14px;
    padding: 8px 6px 10px;
}

html .navigation .cat-tile,
html[data-theme="dark"] .navigation .cat-tile {
    --cat-bg: color-mix(in srgb, var(--cat) 52%, #ffffff);
    --cat-edge: color-mix(in srgb, var(--cat) 60%, #8a7f70);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 186px;
    padding: 15px 26px 15px 15px;
    border: 0;
    border-radius: 22px;
    background: var(--cat-bg);
    color: #3b2412;
    box-shadow: 0 4px 0 var(--cat-edge);
    transition: transform 0.15s, box-shadow 0.15s;
}

html .navigation .cat-tile:hover,
html[data-theme="dark"] .navigation .cat-tile:hover {
    background: var(--cat-bg);
    color: #3b2412;
    transform: translateY(-3px);
    box-shadow: 0 7px 0 var(--cat-edge);
}

/* Selected tile: blue ring around it */
html .navigation .cat-tile.active,
html[data-theme="dark"] .navigation .cat-tile.active {
    background: var(--cat-bg);
    color: #3b2412;
    outline: 3px solid #0a5a95;
    outline-offset: 3px;
}

.cat-tile .cat-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

html .navigation .cat-tile .cat-icon i,
html .navigation .cat-tile:hover .cat-icon i,
html .navigation .cat-tile.active .cat-icon i {
    font-size: 19px;
    color: color-mix(in srgb, var(--cat) 80%, #000000);
}

.cat-tile .cat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.cat-tile .cat-text strong {
    font-family: 'Luckiest Guy', 'Noto Sans Malayalam', 'Poppins', cursive;
    font-weight: 400;
    font-size: 17px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #2b1608;
}

.cat-tile .cat-text small {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 500;
    color: #3b2412;
}

/* Sticky bar needs a little more room for the tiles */
.nav-scroller {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Phones: smaller tiles */
@media (max-width: 600px) {

    .navigation {
        gap: 10px;
    }

    html .navigation .cat-tile,
    html[data-theme="dark"] .navigation .cat-tile {
        min-width: 0;
        padding: 9px 16px 9px 10px;
        border-radius: 18px;
        gap: 9px;
    }

    .cat-tile .cat-icon {
        width: 36px;
        height: 36px;
    }

    html .navigation .cat-tile .cat-icon i {
        font-size: 16px;
    }

    .cat-tile .cat-text strong {
        font-size: 15px;
    }

    .cat-tile .cat-text small {
        font-size: 11px;
    }

}

/* =========================================
   CATEGORY TILES - smaller and more colourful
========================================= */

.navigation {
    gap: 10px;
}

html .navigation .cat-tile,
html[data-theme="dark"] .navigation .cat-tile {
    --cat-bg: var(--cat);
    --cat-edge: color-mix(in srgb, var(--cat) 70%, #000000);
    min-width: 0;
    padding: 7px 16px 7px 7px;
    gap: 9px;
    border-radius: 16px;
    box-shadow: 0 3px 0 var(--cat-edge);
}

html .navigation .cat-tile:hover,
html[data-theme="dark"] .navigation .cat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--cat-edge);
}

html .navigation .cat-tile.active,
html[data-theme="dark"] .navigation .cat-tile.active {
    outline: 3px solid #0a5a95;
    outline-offset: 2px;
}

.cat-tile .cat-icon {
    width: 32px;
    height: 32px;
}

html .navigation .cat-tile .cat-icon i,
html .navigation .cat-tile:hover .cat-icon i,
html .navigation .cat-tile.active .cat-icon i {
    font-size: 14px;
    color: color-mix(in srgb, var(--cat) 60%, #000000);
}

.cat-tile .cat-text strong {
    font-size: 14px;
    color: #1d1006;
}

.cat-tile .cat-text small {
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(29, 16, 6, 0.75);
}

@media (max-width: 600px) {

    html .navigation .cat-tile,
    html[data-theme="dark"] .navigation .cat-tile {
        padding: 6px 13px 6px 6px;
        border-radius: 14px;
    }

    .cat-tile .cat-icon {
        width: 28px;
        height: 28px;
    }

    html .navigation .cat-tile .cat-icon i {
        font-size: 12px;
    }

    .cat-tile .cat-text strong {
        font-size: 13px;
    }

    .cat-tile .cat-text small {
        font-size: 10px;
    }

}

/* Category tiles - softer colours */

html .navigation .cat-tile,
html[data-theme="dark"] .navigation .cat-tile {
    --cat-bg: color-mix(in srgb, var(--cat) 50%, #ffffff);
    --cat-edge: color-mix(in srgb, var(--cat) 65%, #6b6b6b);
}

html .navigation .cat-tile .cat-icon i,
html .navigation .cat-tile:hover .cat-icon i,
html .navigation .cat-tile.active .cat-icon i {
    color: color-mix(in srgb, var(--cat) 70%, #000000);
}

/* =========================================
   SITE-WIDE DISPLAY FONT: Luckiest Guy
   (titles, headings, buttons; body text stays Poppins
   so longer text and Malayalam stay easy to read)
========================================= */

h1, h2, h3, h4,
.play-button,
.play-unavailable,
.nav-item,
.thumbnail-game-title h2,
.hero-title,
.hero-play-btn,
.section-heading h2,
.game-text h3 {
    font-family: 'Luckiest Guy', 'Noto Sans Malayalam', 'Poppins', cursive;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Category tiles - black text */

html .navigation .cat-tile .cat-text strong,
html .navigation .cat-tile .cat-text small,
html[data-theme="dark"] .navigation .cat-tile .cat-text strong,
html[data-theme="dark"] .navigation .cat-tile .cat-text small {
    color: #000000;
    text-shadow: none;
}

html .navigation .cat-tile .cat-text small {
    opacity: 0.8;
}

/* =========================================
   CATEGORY TILES - match the game cards
   (white card, soft grey edge, coloured icon
   in the category's badge colour, navy when selected)
========================================= */

html .navigation .cat-tile,
html .navigation .cat-tile:hover {
    background: #ffffff;
    border: 1px solid #d4dce6;
    box-shadow: 0 3px 0 #d5dae1;
    outline: none;
}

html .navigation .cat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #d5dae1, 0 8px 16px rgba(15, 23, 42, 0.06);
}

/* Coloured icon circle */
html .navigation .cat-tile .cat-icon {
    background: var(--cat);
    box-shadow: none;
}

html .navigation .cat-tile .cat-icon i,
html .navigation .cat-tile:hover .cat-icon i {
    color: #ffffff;
}

/* Text */
html .navigation .cat-tile .cat-text strong {
    color: #000000;
    text-shadow: none;
}

html .navigation .cat-tile .cat-text small {
    font-family: 'Poppins', sans-serif;
    color: #64748b;
    opacity: 1;
    text-shadow: none;
}

/* Selected tile - navy like the Play buttons */
html .navigation .cat-tile.active,
html .navigation .cat-tile.active:hover {
    background: #005d91;
    border-color: #005d91;
    box-shadow: 0 3px 0 #003f63;
    outline: none;
}

html .navigation .cat-tile.active .cat-icon {
    background: #ffffff;
}

html .navigation .cat-tile.active .cat-icon i {
    color: #005d91;
}

html .navigation .cat-tile.active .cat-text strong,
html .navigation .cat-tile.active .cat-text small {
    color: #ffffff;
}

/* Night mode */
html[data-theme="dark"] .navigation .cat-tile,
html[data-theme="dark"] .navigation .cat-tile:hover {
    background: #17212b;
    border-color: #2a3744;
    box-shadow: 0 3px 0 #0b1118;
}

html[data-theme="dark"] .navigation .cat-tile .cat-text strong {
    color: #f1f5f9;
}

html[data-theme="dark"] .navigation .cat-tile .cat-text small {
    color: #94a3b8;
}

html[data-theme="dark"] .navigation .cat-tile.active {
    background: #1683c4;
    border-color: #1683c4;
}

html[data-theme="dark"] .navigation .cat-tile.active .cat-text strong,
html[data-theme="dark"] .navigation .cat-tile.active .cat-text small {
    color: #ffffff;
}

/* Smooth category switching - soft fade-in of the new games */

main.container > *:not(.nav-scroller) {
    transition: opacity 0.25s ease;
}

/* gentle, quick cross-fade between categories */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
    animation-timing-function: ease;
}



/* Smooth cross-fade when a full page load is needed (supported browsers) */

@view-transition {
    navigation: auto;
}

/* =========================================
   HOMEPAGE BACKGROUND - floating 3D bubbles
========================================= */

.bubble-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, #f4f9ff 0%, #fdfbff 50%, #fffaf2 100%);
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.55;
    /* glossy 3D bubble: bright highlight, soft coloured body, darker rim */
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 7%, rgba(255, 255, 255, 0.45) 14%, rgba(255, 255, 255, 0) 30%),
        radial-gradient(circle at 65% 72%, color-mix(in srgb, var(--c) 35%, transparent) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--c) 18%, transparent) 0 55%, color-mix(in srgb, var(--c) 55%, transparent) 100%);
    box-shadow:
        inset -8px -12px 22px color-mix(in srgb, var(--c) 45%, transparent),
        inset 6px 8px 16px rgba(255, 255, 255, 0.7),
        0 12px 30px color-mix(in srgb, var(--c) 18%, transparent);
    animation: bubble-drift 30s ease-in-out infinite;
    will-change: transform;
}

@keyframes bubble-drift {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(var(--x1), var(--y1)) scale(1.06); }
    50%  { transform: translate(var(--x2), var(--y2)) scale(0.95); }
    75%  { transform: translate(var(--x3), var(--y3)) scale(1.04); }
    100% { transform: translate(0, 0) scale(1); }
}

/* let the bubbles show behind the page */
body {
    background: transparent;
}

html {
    background: #f8fbff;
}

/* category bar: frosted so bubbles softly show through */
.nav-scroller {
    background: rgba(253, 253, 253, 0.8);
    box-shadow: 0 0 0 100vmax rgba(253, 253, 253, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav-scroller.is-stuck {
    box-shadow: 0 0 0 100vmax rgba(253, 253, 253, 0.8), 0 6px 14px -6px rgba(15, 23, 42, 0.18);
}

/* Night mode */

html[data-theme="dark"] {
    background: #0f1720;
}

html[data-theme="dark"] body {
    background: transparent;
}

html[data-theme="dark"] .bubble-bg {
    background: linear-gradient(180deg, #0f1720 0%, #121c28 100%);
}

html[data-theme="dark"] .bubble {
    opacity: 0.25;
}

html[data-theme="dark"] .nav-scroller {
    background: rgba(15, 23, 32, 0.8);
    box-shadow: 0 0 0 100vmax rgba(15, 23, 32, 0.8);
}

html[data-theme="dark"] .nav-scroller.is-stuck {
    box-shadow: 0 0 0 100vmax rgba(15, 23, 32, 0.8), 0 6px 14px -6px rgba(0, 0, 0, 0.6);
}

/* Bubbles - a little brighter */

.bubble {
    opacity: 0.7;
}

html[data-theme="dark"] .bubble {
    opacity: 0.35;
}

/* =========================================
   INTRO BANNER - frosted glass (bubbles blur behind it)
========================================= */

main .kids-intro,
html body main .kids-intro {
    background:
        linear-gradient(120deg, rgba(232, 246, 255, 0.55) 0%, rgba(255, 247, 221, 0.55) 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="dark"] body main .kids-intro {
    background: linear-gradient(120deg, rgba(19, 38, 58, 0.6) 0%, rgba(31, 33, 48, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {

    html body main .kids-intro {
        background: linear-gradient(120deg, rgba(232, 246, 255, 0.6) 0%, rgba(255, 247, 221, 0.6) 100%);
    }

    html[data-theme="dark"] body main .kids-intro {
        background: linear-gradient(120deg, rgba(19, 38, 58, 0.6) 0%, rgba(31, 33, 48, 0.6) 100%);
    }

}

/* bubbles are moved by script.js (works on all phones) */
.bubble {
    animation: none;
}

/* =========================================
   NIGHT MODE BACKGROUND - moving stars and comets
========================================= */

.space-bg {
    display: none;
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(88, 60, 160, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(30, 90, 170, 0.35) 0%, transparent 50%),
        linear-gradient(180deg, #050a1a 0%, #0b1430 55%, #120c2a 100%);
}

/* Day: bubbles.  Night: stars. */
html[data-theme="dark"] .bubble-bg {
    display: none;
}

html[data-theme="dark"] .space-bg {
    display: block;
}

.star-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 200%;
    will-change: transform;
}

.star-layer i {
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
    animation: star-twinkle 3s ease-in-out infinite;
}

.star-layer i:nth-child(7n) {
    background: #ffe9a8;
    box-shadow: 0 0 8px rgba(255, 220, 120, 0.9);
}

.star-layer i:nth-child(11n) {
    background: #bfe3ff;
    box-shadow: 0 0 8px rgba(140, 200, 255, 0.9);
}

@keyframes star-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%      { opacity: 1;   transform: scale(1.25); }
}

/* Comet: bright head with a fading glowing tail */

.comet {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.9), 0 0 24px 8px rgba(140, 200, 255, 0.5);
    transform-origin: center;
}

.comet::before {
    content: "";
    position: absolute;
    right: 3px;
    top: 50%;
    width: var(--len, 140px);
    height: 3px;
    border-radius: 3px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(140, 200, 255, 0), rgba(190, 225, 255, 0.55) 60%, rgba(255, 255, 255, 0.95));
}

/* =========================================
   DAY MODE BACKGROUND - sky and clouds
   (replaces the bubbles; night mode shows the stars)
========================================= */

.bubble-bg {
    display: none !important;
}

.cloud-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, #a9dcff 0%, #cdeaff 40%, #eef8ff 75%, #fbfdff 100%);
}

html[data-theme="dark"] .cloud-bg {
    display: none;
}

.sky-sun {
    position: absolute;
    top: 6vh;
    right: 8vw;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff6c4 0%, #ffe066 45%, rgba(255, 210, 60, 0) 72%);
    box-shadow: 0 0 80px 30px rgba(255, 220, 90, 0.35);
}

/* Fluffy cloud built from three round puffs */
.cloud {
    position: absolute;
    left: 0;
    width: var(--w);
    height: calc(var(--w) * 0.32);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(90, 140, 190, 0.18);
    will-change: transform;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
}

.cloud::before {
    width: calc(var(--w) * 0.46);
    height: calc(var(--w) * 0.46);
    left: calc(var(--w) * 0.14);
    top: calc(var(--w) * -0.24);
}

.cloud::after {
    width: calc(var(--w) * 0.34);
    height: calc(var(--w) * 0.34);
    left: calc(var(--w) * 0.5);
    top: calc(var(--w) * -0.15);
}

@media (max-width: 600px) {

    .sky-sun {
        width: 80px;
        height: 80px;
        top: 4vh;
        right: 5vw;
    }

}

/* Birds (day sky) */

.bird {
    position: absolute;
    left: 0;
    width: calc(26px * var(--s, 1));
    height: calc(12px * var(--s, 1));
    will-change: transform;
}

.bird::before,
.bird::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    border-top: calc(2.5px * var(--s, 1)) solid #34495e;
    border-radius: 60% 60% 0 0;
}

.bird::before {
    left: 0;
    transform-origin: 100% 70%;
    animation: wing-left var(--flap, 0.4s) ease-in-out infinite alternate;
}

.bird::after {
    right: 0;
    transform-origin: 0 70%;
    animation: wing-right var(--flap, 0.4s) ease-in-out infinite alternate;
}

@keyframes wing-left {
    from { transform: rotate(18deg); }
    to   { transform: rotate(-14deg); }
}

@keyframes wing-right {
    from { transform: rotate(-18deg); }
    to   { transform: rotate(14deg); }
}

/* =========================================
   FROSTED GLASS - category tiles, game cards, footer
   (the moving sky / stars show softly blurred behind them)
========================================= */

/* Category tiles (not the selected one) */
html body .navigation .cat-tile:not(.active),
html body .navigation .cat-tile:not(.active):hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
}

html body .navigation .cat-tile.active {
    background: rgba(0, 93, 145, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* Game cards */
html body .game-card,
html body #gamesContainer .game-card {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
}

/* Footer */
html body .home-footer {
    background: rgba(11, 57, 84, 0.82);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
}

/* Night mode versions */
html[data-theme="dark"] body .navigation .cat-tile:not(.active),
html[data-theme="dark"] body .navigation .cat-tile:not(.active):hover {
    background: rgba(23, 33, 43, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body .navigation .cat-tile.active {
    background: rgba(22, 131, 196, 0.85);
}

html[data-theme="dark"] body .game-card,
html[data-theme="dark"] body #gamesContainer .game-card {
    background: rgba(23, 33, 43, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body .home-footer {
    background: rgba(10, 17, 24, 0.6);
}

/* Realistic clouds (painted by script.js) */

.cloud.cloud-real {
    height: calc(var(--w) * 0.5);
    border-radius: 0;
    background-color: transparent;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    box-shadow: none;
}

.cloud.cloud-real::before,
.cloud.cloud-real::after {
    display: none;
}

/* softer, more natural sky behind realistic clouds */
.cloud-bg {
    background: linear-gradient(180deg, #6fb8ef 0%, #9fd0f6 35%, #cde7fb 70%, #eef7fe 100%);
}

/* Category bar: no white strip behind the buttons - only the buttons show */

html body .nav-scroller,
html body .nav-scroller.is-stuck,
html[data-theme="dark"] body .nav-scroller,
html[data-theme="dark"] body .nav-scroller.is-stuck {
    background: transparent;
    box-shadow: none;
    clip-path: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html body .nav-scroller::before,
html body .nav-scroller::after {
    display: none;
}

/* give the floating buttons a soft shadow so they stand out on the sky */
html body .navigation .cat-tile {
    box-shadow: 0 3px 0 rgba(150, 165, 185, 0.6), 0 6px 16px rgba(15, 23, 42, 0.08);
}

html body .navigation .cat-tile.active {
    box-shadow: 0 3px 0 #003f63, 0 6px 16px rgba(0, 63, 99, 0.25);
}

/* =========================================
   GAME CARDS - clearer glass look
========================================= */

html body .game-card,
html body #gamesContainer .game-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.18) 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.25),
        0 8px 24px rgba(30, 80, 130, 0.12);
}

html body .game-card:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 14px 30px rgba(30, 80, 130, 0.18);
}

/* soft shine across the glass */
html body .game-card .game-info {
    position: relative;
}

html body .game-card .game-info::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

html body .game-card .game-info > * {
    position: relative;
}

/* glossy Play button */
html body .game-card .play-button {
    background: linear-gradient(180deg, #1a78b4 0%, #005d91 55%, #004f7c 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 0 #003f63;
}

/* Night mode */
html[data-theme="dark"] body .game-card,
html[data-theme="dark"] body #gamesContainer .game-card {
    background: linear-gradient(135deg, rgba(40, 55, 72, 0.55) 0%, rgba(20, 28, 38, 0.35) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] body .game-card .game-info::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%);
}

/* =========================================
   CATEGORY BAR - one row that slides sideways
   (swipe on phones, drag / scroll-wheel on desktop);
   no arrow buttons and no white fade at the edges
========================================= */

html body .nav-arrow,
html body .nav-scroller.can-left .nav-arrow-left,
html body .nav-scroller.can-right .nav-arrow-right {
    display: none !important;
}

html body .nav-scroller::before,
html body .nav-scroller::after {
    display: none !important;
}

html body .navigation {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* room so the button shadows are not clipped */
    padding: 8px 4px 12px;
}

html body .navigation .cat-tile {
    scroll-snap-align: start;
}

/* Category row reaches the screen edges when sliding (no empty gap at the sides);
   the first button still lines up with the page content */

html body .navigation {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
    scroll-padding-left: calc(50vw - 50%);
}

/* stop the full-width row from causing sideways page scrolling */
html,
body {
    overflow-x: clip;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-img {
    width: 280px;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .logo-img {
        width: 220px;
        height: 28px;
    }
}
/* Hide main navigation on mobile category pages */
@media screen and (max-width: 768px) {
    .hide-nav-mobile {
        display: none !important;
    }
}
/* =========================================
   SMOOTH DAY / NIGHT BACKGROUND TRANSITION
========================================= */

html .cloud-bg,
html .space-bg,
html[data-theme="dark"] .cloud-bg,
html[data-theme="dark"] .space-bg {
    display: block !important;

    transition:
        opacity 1.2s ease-in-out,
        filter 1.2s ease-in-out !important;

    pointer-events: none;
}

/* Day mode */

html .cloud-bg {
    opacity: 1;
    filter: blur(0px);
    z-index: -2;
}

html .space-bg {
    opacity: 0;
    filter: blur(20px);
    z-index: -1;
}

/* Night mode */

html[data-theme="dark"] .cloud-bg {
    opacity: 0;
    filter: blur(20px);
}

html[data-theme="dark"] .space-bg {
    opacity: 1;
    filter: blur(0px);
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    html .cloud-bg,
    html .space-bg {
        transition: none !important;
        filter: none !important;
    }
}

.logo,
.logo-img {
    background: transparent !important;
}

/* =========================================
   DAY / NIGHT SKY WHEEL
   Sun and moon on a big wheel that turns half a circle
   when the day / night switch is used (built in script.js).
========================================= */

.sky-wheel {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;

    --sw-radius: 92vh;      /* size of the wheel */
    --sw-pos: 24deg;        /* where the sun / moon sits (from the top, to the right) */
    --sw-size: 110px;       /* sun / moon size */
}

/* the wheel itself: its centre is below the bottom of the screen */
.sky-wheel-spin {
    position: absolute;
    left: 50%;
    top: calc(var(--sw-radius) + 8vh);
    width: 0;
    height: 0;
    transform: rotate(var(--sw-angle, 0deg));
    transition: transform 1.8s cubic-bezier(0.68, -0.3, 0.27, 1.3);
    will-change: transform;
}

.sw-body {
    position: absolute;
    left: calc(var(--sw-size) / -2);
    top: calc(var(--sw-size) / -2);
    width: var(--sw-size);
    height: var(--sw-size);
    border-radius: 50%;
}

.sw-sun {
    transform: rotate(var(--sw-pos)) translateY(calc(var(--sw-radius) * -1));
    background: radial-gradient(circle at 38% 38%, #fffbe0 0%, #ffe066 45%, #ffc21a 100%);
    box-shadow:
        0 0 40px 12px rgba(255, 215, 80, 0.55),
        0 0 120px 50px rgba(255, 220, 90, 0.28);
}

.sw-rays {
    position: absolute;
    inset: -22%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,
        rgba(255, 205, 60, 0.55) 0deg 10deg,
        transparent 10deg 30deg);
    -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%, transparent 72%);
            mask: radial-gradient(circle, transparent 52%, #000 54%, transparent 72%);
    animation: sw-rays 30s linear infinite;
    z-index: -1;
}

.sw-moon {
    transform: rotate(calc(var(--sw-pos) + 180deg)) translateY(calc(var(--sw-radius) * -1));
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1edd8 60%, #d8d0b0 100%);
    box-shadow:
        0 0 30px 8px rgba(255, 250, 220, 0.35),
        0 0 110px 40px rgba(180, 200, 255, 0.18);
}

.sw-crater {
    position: absolute;
    border-radius: 50%;
    background: rgba(170, 160, 125, 0.45);
    box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.12);
}

.sw-crater.c1 { width: 24%; height: 24%; left: 22%; top: 26%; }
.sw-crater.c2 { width: 15%; height: 15%; left: 60%; top: 52%; }
.sw-crater.c3 { width: 11%; height: 11%; left: 34%; top: 66%; }

@keyframes sw-rays {
    to { transform: rotate(360deg); }
}

/* the old fixed sun is replaced by the wheel */
.sky-sun {
    display: none !important;
}

/* phones / tall screens: keep the sun and moon on screen */
@media (max-aspect-ratio: 1/1) {
    .sky-wheel {
        --sw-pos: 10deg;
        --sw-size: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sky-wheel-spin {
        transition-duration: 0.6s;
        transition-timing-function: ease-in-out;
    }
    .sw-rays {
        animation: none;
    }
}

/* Clickable game thumbnail */

.game-image-link {
    display: block;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.game-image-link img {
    cursor: pointer;
}

.game-image-link .image-badges {
    pointer-events: none;
}
.cat-tile {
    align-items: center;
}

.cat-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cat-text small {
    display: none !important;
}

/* =========================================
   IMAGE PLACEHOLDER
   Grey "M" picture shown while a game picture is still loading
   (lazy loading) and for games without a thumbnail.
========================================= */

.game-image img,
.thumbnail-slide img {
    background: #e0e0e0 url("images/placeholder.webp") center / contain no-repeat;
}

/* the placeholder itself is shown whole, never cropped */
.game-image img.img-placeholder,
.thumbnail-slide img.img-placeholder {
    object-fit: contain;
    background: #e0e0e0;
}

/* =========================================
   LOADING STATES (game list)
========================================= */

/* 1. Shine moving over a game picture until it has loaded */

.game-image.is-img-loading,
.thumbnail-slide.is-img-loading {
    overflow: hidden;
}

.game-image.is-img-loading::after,
.thumbnail-slide.is-img-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 70%);
    background-size: 250% 100%;
    animation: kids-shimmer 1.3s linear infinite;
}

@keyframes kids-shimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}

/* 2. While a category is loading: cards fade and a
      "Loading games..." bubble appears */

#gamesContainer {
    position: relative;
}

#gamesContainer.is-loading .game-card,
#gamesContainer.is-loading .no-games-message {
    opacity: 0.45;
    filter: saturate(0.6);
    pointer-events: none;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

#gamesContainer.is-loading::before {
    content: "Loading games...";
    position: absolute;
    top: 40px;
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 999px;
    background: #005d91;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 60, 100, 0.3);
    animation: kids-loading-bounce 0.9s ease-in-out infinite;
}

@keyframes kids-loading-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .game-image.is-img-loading::after,
    .thumbnail-slide.is-img-loading::after,
    #gamesContainer.is-loading::before {
        animation: none;
    }
}

/* =========================================
   GAME CARDS - all the same size
   Title and Malayalam name stay on one line each; long names
   are shrunk to fit (script.js "fitCardTitles"), so every
   card's text area has the same height.
========================================= */

#gamesContainer .game-card .game-info {
    height: 92px;
    box-sizing: border-box;
    overflow: hidden;
}

#gamesContainer .game-text h3,
#gamesContainer .game-text p {
    display: block;
    -webkit-line-clamp: unset;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

#gamesContainer .game-text h3 {
    margin: 0 0 4px;
}

@media (max-width: 600px) {
    #gamesContainer .game-card .game-info {
        height: 84px;
    }
}

/* =========================================
   GAME PICTURES - appear left to right
   (order handled in script.js "shown left to right")
========================================= */

/* grey "M" placeholder behind each card picture */
#gamesContainer .game-image {
    background: #e0e0e0 url("images/placeholder.webp") center / contain no-repeat;
}

#gamesContainer .game-image img {
    transition: opacity 0.45s ease;
}

/* hidden until it is its turn (only when scripts are running);
   safety: shows anyway after 8 seconds */
html[data-theme] #gamesContainer .game-image img:not(.is-shown) {
    opacity: 0;
    animation: kids-img-failsafe 0s linear 8s forwards;
}

@keyframes kids-img-failsafe {
    to { opacity: 1; }
}

