* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', sans-serif;
}

body {
    background: #07111a;
    color: white;
    overflow-x: hidden;
}

/* ================= HEADER ================= */
.kids-header-wrap {
    padding: 20px 20px 0;
}

.kids-header {
    background: #00ffff;
    color: #07111a;
    padding: 10px 35px;
    border-radius: 40px 40px 90px 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.kids-header::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -50px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.logo {
    font-size: 30px;
    font-weight: 600;
    z-index: 2;
}

.kids-nav {
    display: flex;
    gap: 14px;
    z-index: 2;
}

.kids-nav a {
    text-decoration: none;
    color: #07111a;
    font-weight: 600;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 25px;
    transition: 0.3s;
}

.kids-nav a:hover {
    transform: translateY(-3px) scale(1.05);
    background: white;
}

.kids-nav a.active {
    background: white;
    color: #07111a;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* ================= TITLE ================= */
.page-title {
    text-align: center;
    padding: 45px 20px 30px;
    position: relative;
}

.page-title h1 {
    font-size: 42px;
    color: #00ffff;
    margin-bottom: 12px;
}

.page-title p {
    font-size: 18px;
    color: #d6fefe;
}

/* ================= FLOATING ICONS ================= */
.floating-icons {
    position: relative;
    height: 70px;
    margin-bottom: 10px;
}

.floating-icons span {
    position: absolute;
    font-size: 34px;
    animation: floatZoom 3s ease-in-out infinite;
}

.floating-icons span:nth-child(1) {
    left: 15%;
    animation-delay: 0s;
}

.floating-icons span:nth-child(2) {
    left: 28%;
    animation-delay: .5s;
}

.floating-icons span:nth-child(3) {
    left: 42%;
    animation-delay: 1.5s;
}

.floating-icons span:nth-child(4) {
    right: 42%;
    animation-delay: 1.5s;
}

.floating-icons span:nth-child(5) {
    right: 28%;
    animation-delay: 1s;
}

.floating-icons span:nth-child(6) {
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes floatZoom {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-12px) scale(1.2);
    }
}

/* ========== KIDS CATEGORY & AGE FILTERS ========== */
.kids-filters-container {
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.kids-age-filter, .kids-cat-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kids-age-filter a, .kids-cat-filter a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #b0b8c8;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: 0.3px;
}

.kids-cat-filter a {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 20px;
    background: rgba(0, 255, 255, 0.04);
    border-color: rgba(0, 255, 255, 0.12);
}

.cat-pill-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    vertical-align: middle;
}

.kids-cat-filter a:hover, .kids-cat-filter a.active {
    color: #07111a;
    background: #00ffff;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Hover State */
.kids-age-filter a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ACTIVE - All Games (Cyan/Teal) */
.kids-age-filter a.active:first-child {
    color: #0a0e1a;
    background: linear-gradient(135deg, #00e5ff, #00bcd4);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.35), 0 0 40px rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

/* ACTIVE - Ages 3+ (Green/Lime) */
.kids-age-filter a.active:nth-child(2) {
    color: #0a0e1a;
    background: linear-gradient(135deg, #69f0ae, #00e676);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(105, 240, 174, 0.35), 0 0 40px rgba(105, 240, 174, 0.1);
    transform: translateY(-2px);
}

/* ACTIVE - Ages 7+ (Yellow/Amber) */
.kids-age-filter a.active:nth-child(3) {
    color: #0a0e1a;
    background: linear-gradient(135deg, #ffeb3b, #ffc107);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(255, 235, 59, 0.35), 0 0 40px rgba(255, 235, 59, 0.1);
    transform: translateY(-2px);
}

/* ACTIVE - Ages 12+ (Pink/Magenta) */
.kids-age-filter a.active:nth-child(4) {
    color: #ffffff;
    background: linear-gradient(135deg, #ff4081, #f50057);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(255, 64, 129, 0.35), 0 0 40px rgba(255, 64, 129, 0.1);
    transform: translateY(-2px);
}

/* Active hover - subtle lift */
.kids-age-filter a.active:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

/* Small emoji icons per filter */
.kids-age-filter a:first-child::after { content: '🎮'; margin-left: 4px; font-size: 13px; }
.kids-age-filter a:nth-child(2)::after { content: '🧒'; margin-left: 4px; font-size: 13px; }
.kids-age-filter a:nth-child(3)::after { content: '👦'; margin-left: 4px; font-size: 13px; }
.kids-age-filter a:nth-child(4)::after { content: '🧑'; margin-left: 4px; font-size: 13px; }

/* ================= GAMES GRID ================= */
.games-section {
    padding: 20px 30px 60px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 28px;
}

/* ===== SINGLE GAME — FEATURED STYLE ===== */
.games-grid > a:only-child {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.games-grid > a:only-child .game-info {
    padding: 20px 24px;
}

.games-grid > a:only-child img {
    object-fit: cover;
    border-radius: 18px 18px 0 0;
}

.games-grid > a:only-child h3 {
    font-size: 20px;
}

/* ===== TWO GAMES — SIDE BY SIDE CENTERED ===== */
.games-grid > a:nth-last-child(n+2):first-child:nth-last-child(2) ~ a,
.games-grid > a:nth-last-child(2):first-child {
    max-width: 400px;
    justify-self: center;
}


/* ================= UNIQUE BUBBLE CARDS ================= */
.game-card {
    background: #10202e;
    border: 2px solid #00ffff30;
    border-radius: 35px 15px 35px 15px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.35s ease;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.game-card:hover {
    transform: translateY(-10px) rotate(-1deg) scale(1.03);
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.25);
}

.game-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: fill;
    display: block;
    border-bottom: 2px solid #00ffff20;
}

.game-info {
    padding: 18px;
    text-align: center;
}

.game-info h3 {
    font-size: 19px;
    color: white;
    margin-bottom: 14px;
    line-height: 1.4;
}

.play-btn {
    display: inline-block;
    padding: 10px 22px;
    background: #00ffff;
    color: #07111a;
    font-weight: bold;
    border-radius: 30px;
    font-size: 15px;
    transition: 0.3s;
}

.game-card:hover .play-btn {
    transform: scale(1.08);
}

.type-gp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 115px 20px;
    background: #10202e;
    border: 2px solid #00ffff30;
    box-shadow: 0 10px 25px #00ffff30;
    border-radius: 35px 15px 35px 15px;
}

.type-gp-empty-icon {
    color: #6b6f85;
    opacity: 0.4;
    margin-bottom: 20px;
}

.type-gp-empty h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #e8eaf0;
}

/* Pagination */
.kids-pagination-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.kids-pagination-wrap .pagination {
    display: flex;
    gap: 8px;
    list-style: none;
}
.kids-pagination-wrap .pagination li a,
.kids-pagination-wrap .pagination li span {
    padding: 10px 18px;
    background: #10202e;
    color: #00ffff;
    border: 1px solid #00ffff40;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
}
.kids-pagination-wrap .pagination li.active span {
    background: #00ffff;
    color: #07111a;
}

/* ================= PAGE TITLE ================= */
.page-title {
    text-align: center;
    padding: 50px 20px 30px;
}

.page-title h1 {
    font-size: 40px;
    color: #00ffff;
    margin-bottom: 12px;
}

.page-title p {
    font-size: 18px;
    color: #d6fefe;
    max-width: 700px;
    margin: auto;
    line-height: 1.6;
}

/* ================= ICONS ================= */
.floating-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.floating-icons span {
    font-size: 34px;
    display: inline-block;
    animation: floatZoom 3s ease-in-out infinite;
}

.floating-icons span:nth-child(odd) {
    animation-delay: 0.3s;
}

.floating-icons span:nth-child(even) {
    animation-delay: 0.8s;
}

@keyframes floatZoom {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.15);
    }
}

/* ================= GAME PAGE (POKI-LEVEL) ================= */
.kids-game-page{
    min-height:100vh;
    background:#07111a;
    padding:20px 20px 60px;
    position:relative;
    overflow:hidden;
}

/* Player Top Toolbar */
.game-player-toolbar {
    max-width: 1080px;
    margin: 0 auto 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    z-index: 5;
    position: relative;
}

.kids-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #00ffff, #00bcd4);
    color: #07111a;
    font-weight: 700;
    font-size: 15px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kids-back-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px rgba(0, 255, 255, 0.45);
}

.game-meta-pills {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kids-age-badge {
    padding: 8px 16px;
    background: rgba(105, 240, 174, 0.2);
    border: 1.5px solid #69f0ae;
    color: #69f0ae;
    font-weight: 700;
    font-size: 13px;
    border-radius: 20px;
}

.kids-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kids-fullscreen-btn:hover {
    background: #00ffff;
    color: #07111a;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Floating decorative icons */
.kids-game-page::before,
.kids-game-page::after{
    content:'';
    position:absolute;
    border-radius:50%;
    background:rgba(0,255,255,0.08);
    z-index:0;
    animation:blobFloat 6s ease-in-out infinite;
}

.kids-game-page::before{
    width:220px;
    height:220px;
    top:60px;
    left:-60px;
    border-radius:60% 40% 70% 30%;
    animation-delay:0s;
}

.kids-game-page::after{
    width:180px;
    height:180px;
    bottom:100px;
    right:-50px;
    border-radius:40% 60% 30% 70%;
    animation-delay:2s;
}

/* Title */
.game-title-wrap{
    text-align:center;
    margin-bottom:18px;
    position:relative;
    z-index:2;
}

.game-title{
    font-size:36px;
    color:#00ffff;
    text-shadow:0 0 12px rgba(0,255,255,0.35);
    margin-bottom:6px;
}

/* RESPONSIVE 16:9 GAME FRAME BOX */
.game-viewport-container {
    max-width: 1080px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 3;
}

.game-frame-box{
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 widescreen ratio */
    height: 0;
    background:#10202e;
    border:3px solid #00ffff40;
    border-radius:25px;
    box-shadow:0 0 35px rgba(0,255,255,0.12);
    overflow:hidden;
}

/* When in fullscreen mode */
.game-frame-box:fullscreen,
.game-frame-box:-webkit-full-screen {
    padding-bottom: 0 !important;
    height: 100vh !important;
    border: none !important;
    border-radius: 0 !important;
}

.game-frame{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border:none;
    background:black;
}

/* Controls & Details Card */
.game-details-box {
    max-width: 1080px;
    margin: 0 auto 40px;
    background: #10202e;
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 25px;
    padding: 25px 30px;
    position: relative;
    z-index: 3;
}

.game-details-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    color: #00ffff;
    margin-bottom: 12px;
    font-weight: 700;
}

.game-controls-guide {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.control-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #d6fefe;
}

/* Related Games Section */
.related-kids-section {
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.related-title {
    font-size: 26px;
    color: #00ffff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ================= PARENT CONTENT ================= */
.parents-section {
    padding: 30px;
    max-width: 1200px;
    margin: auto;
}

.parents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.parent-card {
    position: relative;
    background: #10202e;
    border: 2px solid #00ffff30;
    border-radius: 35px 15px 35px 15px;
    padding: 30px 25px;
    transition: 0.35s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1;
}

/* Shine Layer */
.parent-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            #00ffff55,
            transparent);
    transform: rotate(25deg) translateX(-100%);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

/* Trigger Animation on Hover */
.parent-card:hover::before {
    opacity: 1;
    animation: shine 1.8s linear;
}

/* Hover Card Effect */
.parent-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.25);
}

/* Keep Content Above Shine */
.parent-card * {
    position: relative;
    z-index: 2;
}

/* Shine Animation */
@keyframes shine {
    0% {
        transform: rotate(25deg) translateX(-100%);
    }

    100% {
        transform: rotate(25deg) translateX(100%);
    }
}

.parent-card .icon {
    font-size: 40px;
    margin-bottom: 18px;
    display: block;
}

.parent-card h3 {
    font-size: 22px;
    color: #00ffff;
    margin-bottom: 15px;
}

.parent-card p {
    font-size: 16px;
    line-height: 1.7;
    color: #d9f9f9;
}

/* ================= SAFETY BOX ================= */
.safety-box {
    margin-top: 50px;
    background: #0d1b2a;
    border: 2px solid #00ffff40;
    border-radius: 30px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.08);
}

.safety-box h2 {
    color: #00ffff;
    font-size: 28px;
    margin-bottom: 20px;
}

.safety-box p {
    font-size: 17px;
    line-height: 1.8;
    color: #d8ffff;
    max-width: 850px;
    margin: auto;
}

/* ================= PRIVACY SECTION ================= */
.privacy-section {
    padding: 30px;
    max-width: 1100px;
    margin: auto;
}

.privacy-card {
    background: #10202e;
    border: 2px solid #00ffff30;
    border-radius: 35px 15px 35px 15px;
    padding: 35px;
    margin-bottom: 30px;
    transition: 0.35s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.privacy-card:hover {
    transform: translateY(-6px);
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.25);
}

.privacy-card h3 {
    font-size: 24px;
    color: #00ffff;
    margin-bottom: 18px;
}

.privacy-card p {
    font-size: 16px;
    line-height: 1.8;
    color: #d9f9f9;
}

.privacy-card ul {
    padding-left: 20px;
    margin-top: 15px;
}

.privacy-card li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #d9f9f9;
}

/* ================= TERMS SECTION ================= */
.terms-section {
    padding: 30px;
    max-width: 1100px;
    margin: auto;
}

.terms-card {
    background: #10202e;
    border: 2px solid #00ffff30;
    border-radius: 35px 15px 35px 15px;
    padding: 35px;
    margin-bottom: 30px;
    transition: 0.35s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.terms-card:hover {
    transform: translateY(-6px);
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.25);
}

.terms-card h3 {
    font-size: 24px;
    color: #00ffff;
    margin-bottom: 18px;
}

.terms-card p {
    font-size: 16px;
    line-height: 1.8;
    color: #d9f9f9;
}

.terms-card ul {
    padding-left: 20px;
    margin-top: 15px;
}

.terms-card li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #d9f9f9;
}

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

.kids-footer {
    background: #00ffff;
    color: #07111a;
    padding: 45px 25px 35px;
    text-align: center;
    clip-path: ellipse(75% 100% at 50% 100%);
    box-shadow: 0 -10px 30px rgba(0, 255, 255, 0.15);
}

.kids-footer p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #07111a;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    transition: 0.3s;
}

.footer-links a:hover {
    background: white;
    transform: scale(1.05);
}

.footer-links a.active {
    background: white;
    color: #07111a;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* ================= MOBILE ================= */
@media(max-width:768px) {

    .kids-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px;
    }

    .kids-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-title h1 {
        font-size: 28px;
    }

    .page-title p {
        font-size: 16px;
    }

    .games-section {
        padding: 20px;
    }

    .floating-icons span {
        font-size: 26px;
    }

    .page-title h1 {
        font-size: 28px;
    }

    .page-title p {
        font-size: 16px;
    }

    .parents-section {
        padding: 20px;
    }

    .safety-box {
        padding: 25px;
    }

    .privacy-section {
        padding: 20px;
    }

    .privacy-card {
        padding: 25px;
    }

    .terms-section {
        padding: 20px;
    }

    .terms-card {
        padding: 25px;
    }

    .game-title{
        font-size:26px;
    }

    .game-frame{
        height:420px;
    }

    .kids-game-page{
        padding:20px 12px 60px;
    }
}

@media (max-width: 600px) {
    .kids-age-filter {
        gap: 8px;
        padding: 12px 14px;
        margin-bottom: 20px;
    }
    .kids-age-filter a {
        padding: 8px 16px;
        font-size: 12.5px;
    }
    .kids-age-filter a::after {
        font-size: 11px;
    }
}

@media(max-width:480px) {
    .floating-icons span:nth-child(1) {
        left: 10%;
    }

    .floating-icons span:nth-child(2) {
        left: 23%;
        animation-delay: .5s;
    }

    .floating-icons span:nth-child(3) {
        left: 37%;
        animation-delay: 1.5s;
    }

    .floating-icons span:nth-child(4) {
        right: 37%;
        animation-delay: 1.5s;
    }

    .floating-icons span:nth-child(5) {
        right: 23%;
        animation-delay: 1s;
    }

    .floating-icons span:nth-child(6) {
        right: 10%;
        animation-delay: 1.5s;
    }

    .kids-footer {
        clip-path: ellipse(100% 100% at 50% 100%);
    }
}
