* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Poppins", "Comic Sans MS", Arial, sans-serif;
}

body {
    overflow-x: hidden;
    background:
        linear-gradient(rgba(255,255,255,.06), rgba(255,255,255,.03)),
        url("../imag/kids-bg-2027.png") center center / cover no-repeat fixed;
}

/* ================= Page ================= */

.kids-page {
    min-height: 100vh;
    padding: 26px 28px 70px;
}

/* ================= Header ================= */

.kids-header {
    width: min(1500px, 96%);
    min-height: 86px;
    margin: 0 auto 42px;
    padding: 10px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    background: url("../imag/nav-bg-2027.png") center center / 100% 100% no-repeat;

    border-radius: 40px;
    overflow: hidden;

    box-shadow:
        0 0 24px rgba(0, 150, 255, .25),
        0 10px 28px rgba(0, 0, 0, .12);
}

.kids-logo {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
    color: #e9e6ff;
    font-weight: 900;
}

.kids-logo img {
    width: 82px;
    height: auto;
    display: block;
}

.kids-logo span {
    font-size: 20px;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.kids-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
}

.kids-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    text-decoration: none;
    color: #ffffff;

    font-size: 14px;
    font-weight: 800;

    text-shadow: 0 2px 8px rgba(0,0,0,.35);
    transition: .25s ease;
}

.kids-nav a i {
    font-size: 24px;
    color: #ffffff;
    transition: .25s ease;
}

.kids-nav a:hover,
.kids-nav a:hover i {
    color: #ffd85a;
    transform: translateY(-2px);
}

.kids-nav a.active,
.kids-nav a.active i {
    color: #b784ff;
}

.settings-btn {
    min-width: 145px;
    border: 0;
    border-radius: 24px;
    padding: 14px 24px;

    background: rgba(255,255,255,.95);
    color: #7c4dff;

    font-size: 17px;
    font-weight: 900;

    box-shadow:
        0 0 20px rgba(160, 100, 255, .25),
        inset 0 -3px rgba(0,0,0,.04);

    cursor: pointer;
    transition: .25s ease;
}

.settings-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 26px rgba(180, 120, 255, .35),
        inset 0 -3px rgba(0,0,0,.04);
}

.settings-btn i {
    margin-inline-end: 6px;
}

/* ================= Hero ================= */

.kids-hero {
    width: min(1500px, 96%);
    margin: auto;
    text-align: center;
}

.hero-title {
    margin-bottom: 54px;
}

.small-title {
    display: block;
    color: #8b4cff;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 900;
    text-shadow: 0 4px 0 #fff;
}

.hero-title h1 {
    margin: 0;
    font-size: clamp(68px, 8vw, 118px);
    line-height: .95;
    color: #ff4b72;
    text-shadow:
        0 8px 0 #fff,
        0 14px 28px rgba(0,0,0,.16);
}

.hero-title p {
    margin: 26px 0 14px;
    color: #9a5a35;
    font-size: clamp(28px, 3vw, 48px);
    font-weight: 900;
}

.hero-title h3 {
    margin: 0;
    color: #25306f;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 900;
    text-shadow: 0 2px 0 rgba(255,255,255,.75);
}

/* ================= Cards ================= */

.quiz-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    gap: 22px;
    margin-top: 18px;
}

.quiz-card {
    min-height: 340px;
    padding: 24px 16px 20px;
    border-radius: 26px;

    background: rgba(255,255,255,.72);
    backdrop-filter: blur(5px);

    box-shadow:
        0 12px 24px rgba(44, 81, 130, .16),
        inset 0 1px rgba(255,255,255,.55);

    border: 3px solid rgba(255,255,255,.75);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    transition: .25s ease;
}

.quiz-card:hover {
    transform: translateY(-10px) scale(1.025);
    background: rgba(255,255,255,.86);
}

.quiz-card h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 900;
}

.quiz-card img {
    width: 100%;
    max-width: 145px;
    height: 145px;
    object-fit: contain;
    border-radius: 50%;
    transition: .25s ease;
}

.quiz-card:hover img {
    transform: scale(1.06);
}

.quiz-card a {
    width: 125px;
    padding: 14px 10px;
    border-radius: 24px;

    color: #fff;
    text-decoration: none;
    font-size: 19px;
    font-weight: 900;

    box-shadow:
        inset 0 -5px rgba(0,0,0,.15),
        0 8px 14px rgba(0,0,0,.12);

    transition: .25s ease;
}

.quiz-card a:hover {
    transform: translateY(-2px);
}

.blue { border-color: #7ec5ff; color: #2d6adf; }
.purple { border-color: #d0a4ff; color: #934fe8; }
.green { border-color: #a8e8a9; color: #289b38; }
.yellow { border-color: #ffe072; color: #e49b00; }
.pink { border-color: #ff9ccc; color: #eb4f92; }
.orange { border-color: #ffbd82; color: #f06422; }
.cyan { border-color: #8de9ef; color: #168c9c; }

.blue a { background: linear-gradient(135deg, #53a8ff, #2e72db); }
.purple a { background: linear-gradient(135deg, #c25cff, #823ee0); }
.green a { background: linear-gradient(135deg, #69d96c, #27a93d); }
.yellow a { background: linear-gradient(135deg, #ffd543, #f3ab00); }
.pink a { background: linear-gradient(135deg, #ff6ea7, #ef3c86); }
.orange a { background: linear-gradient(135deg, #ff9a3d, #ff6a25); }
.cyan a { background: linear-gradient(135deg, #43d9df, #18aab8); }

/* ================= Bottom ================= */

.coming-soon {
    width: fit-content;
    margin: 34px auto 24px;
    padding: 16px 48px;

    border-radius: 999px;
    background: rgba(255,255,255,.85);
    color: #7c49db;

    font-size: 23px;
    font-weight: 900;

    box-shadow: 0 8px 18px rgba(60, 70, 110, .14);
}

.kids-controls {
    width: min(1220px, 94%);
    margin: 0 auto;
    padding: 20px 28px;

    border-radius: 30px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(8px);

    box-shadow: 0 12px 26px rgba(60, 80, 120, .18);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
}

.kids-controls button {
    border: 0;
    border-radius: 22px;
    padding: 15px 30px;

    background: #fff;
    color: #5a3ca7;

    font-size: 18px;
    font-weight: 900;

    box-shadow: 0 8px 18px rgba(80, 65, 160, .13);
    cursor: pointer;
    transition: .25s ease;
}

.kids-controls button:hover {
    transform: translateY(-3px);
}

.kids-controls b,
.modal-option b {
    margin-inline-start: 10px;
    color: #fff;
    background: #54c95c;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 13px;
}

/* ================= Modal ================= */

.kids-modal {
    position: fixed;
    inset: 0;
    z-index: 50;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(3, 9, 35, .55);
    backdrop-filter: blur(8px);
}

.kids-modal.show {
    display: flex;
}

.modal-box {
    width: min(520px, 90%);
    padding: 34px 28px;

    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,250,235,.94));

    box-shadow:
        0 18px 45px rgba(0,0,0,.25),
        inset 0 1px rgba(255,255,255,.8);

    text-align: center;
    position: relative;
    border: 3px solid rgba(255,255,255,.75);
}

.modal-box h2 {
    margin: 0 0 14px;
    color: #7c4dff;
    font-size: 34px;
}

.modal-box p {
    margin: 0;
    color: #26306f;
    font-size: 20px;
    line-height: 1.7;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 50%;
    background: #ff5c8a;
    color: #fff;

    font-size: 28px;
    line-height: 38px;
    cursor: pointer;
}

.modal-option {
    width: 100%;
    margin-top: 15px;
    padding: 16px 22px;

    border: 0;
    border-radius: 22px;
    background: #fff;

    color: #5a3ca7;
    font-size: 18px;
    font-weight: 900;

    box-shadow: 0 8px 18px rgba(80, 65, 160, .13);
    cursor: pointer;
}

/* ================= RTL ================= */

html[dir="rtl"] .modal-close {
    right: auto;
    left: 18px;
}

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

@media (max-width: 1250px) {
    .quiz-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .kids-nav {
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .kids-page {
        padding: 16px 10px 45px;
    }

    .kids-header {
        width: 94%;
        min-height: auto;
        padding: 10px 14px;
        gap: 12px;
        flex-wrap: wrap;
        border-radius: 28px;
        background-size: cover;
        margin-bottom: 30px;
    }

    .kids-logo {
        min-width: auto;
        flex: 1;
    }

    .kids-logo img {
        width: 62px;
    }

    .kids-logo span {
        font-size: 16px;
    }

    .settings-btn {
        min-width: auto;
        padding: 11px 16px;
        font-size: 14px;
    }

    .kids-nav {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        justify-content: space-between;
        gap: 8px;
        padding-top: 8px;
        overflow-x: auto;
    }

    .kids-nav a {
        min-width: 70px;
        font-size: 12px;
        flex: 0 0 auto;
    }

    .kids-nav a i {
        font-size: 21px;
    }

    .hero-title {
        margin-bottom: 34px;
    }

    .quiz-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .quiz-card {
        min-height: 280px;
    }

    .quiz-card h2 {
        font-size: 21px;
    }

    .quiz-card img {
        max-width: 120px;
        height: 120px;
    }

    .kids-controls {
        flex-direction: column;
        gap: 12px;
        padding: 18px;
    }

    .kids-controls button {
        width: 100%;
    }

    .coming-soon {
        width: 94%;
        font-size: 17px;
        padding: 14px 18px;
    }
}

/* ================= Mobile Fix ================= */

@media (max-width: 600px) {

    body {
        background-position: center top;
        background-attachment: scroll;
    }

    .kids-page {
        padding: 10px 8px 35px;
    }

    .kids-header {
        width: 96%;
        margin-bottom: 22px;
        padding: 8px 10px;
        border-radius: 22px;
        gap: 6px;
    }

    .kids-logo {
        flex: 1 1 100%;
        justify-content: center;
        gap: 8px;
        min-width: 0;
    }

    .kids-logo img {
        width: 50px;
    }

    .kids-logo span {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .settings-btn {
        position: absolute;
        top: 14px;
        left: 18px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 18px;
        min-width: auto;
    }

    .kids-nav {
        order: 2;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        overflow: visible;
        padding-top: 6px;
    }

    .kids-nav a {
        min-width: 0;
        font-size: 10px;
        gap: 3px;
        white-space: nowrap;
    }

    .kids-nav a i {
        font-size: 18px;
    }

    .hero-title {
        margin-bottom: 26px;
    }

    .small-title {
        font-size: 30px;
    }

    .hero-title h1 {
        font-size: 50px;
        line-height: 1;
    }

    .hero-title p {
        margin: 14px 0 8px;
        font-size: 23px;
    }

    .hero-title h3 {
        font-size: 16px;
        line-height: 1.5;
        padding: 0 8px;
    }

    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 12px;
    }

    .quiz-card {
        width: 92%;
        max-width: 330px;
        min-height: 250px;
        margin: auto;
        padding: 20px 14px 18px;
        border-radius: 26px;
    }

    .quiz-card h2 {
        font-size: 20px;
        line-height: 1.35;
    }

    .quiz-card img {
        max-width: 112px;
        height: 112px;
    }

    .quiz-card a {
        width: 116px;
        padding: 12px 10px;
        font-size: 16px;
    }

    .coming-soon {
        width: 92%;
        margin: 24px auto 18px;
        padding: 13px 14px;
        font-size: 15px;
    }

    .kids-controls {
        width: 92%;
        padding: 15px;
        gap: 10px;
        flex-direction: column;
    }

    .kids-controls button {
        width: 100%;
        padding: 13px 18px;
        font-size: 15px;
    }
}

/* ================= Kids Fun Effects ================= */

/* حركة خفيفة للكروت */
.quiz-card {
    position: relative;
    animation: cardFloat 3.8s ease-in-out infinite;
}

.quiz-card:nth-child(2) { animation-delay: .3s; }
.quiz-card:nth-child(3) { animation-delay: .6s; }
.quiz-card:nth-child(4) { animation-delay: .9s; }
.quiz-card:nth-child(5) { animation-delay: 1.2s; }
.quiz-card:nth-child(6) { animation-delay: 1.5s; }
.quiz-card:nth-child(7) { animation-delay: 1.8s; }

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

/* عند اللمس أو المرور */
.quiz-card:hover,
.quiz-card:active {
    transform: translateY(-10px) scale(1.03);
}






/* لمعة على الكروت */
.quiz-card::after {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: inherit;
    pointer-events: none;

    background:
        linear-gradient(
            120deg,
            transparent 0%,
            rgba(255,255,255,.45) 45%,
            transparent 65%
        );

    opacity: 0;
    transform: translateX(-80%);
}

.quiz-card:hover::after {
    opacity: 1;
    animation: cardShine .8s ease;
}

@keyframes cardShine {
    from {
        transform: translateX(-80%);
    }
    to {
        transform: translateX(80%);
    }
}

/* نجوم خفيفة فوق الشاشة */
.kids-hero::before,
.kids-hero::after {
    content: "✦ ✨ ✦ ✨ ✦";
    position: absolute;
    pointer-events: none;
    z-index: 0;

    color: rgba(255,255,255,.9);
    font-size: 22px;
    letter-spacing: 18px;

    animation: sparkleMove 4s ease-in-out infinite;
}

.kids-hero {
    position: relative;
}

.kids-hero::before {
    top: 8px;
    left: 8%;
}

.kids-hero::after {
    top: 210px;
    right: 6%;
    animation-delay: 1.5s;
}

@keyframes sparkleMove {
    0%, 100% {
        opacity: .45;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-8px) scale(1.08);
    }
}

/* فقاعة لطيفة جنب العنوان */
.hero-title {
    position: relative;
}

.hero-title::after {
    content: "Pick one!";
    position: absolute;
    right: 12%;
    top: 18px;

    padding: 10px 18px;
    border-radius: 999px;

    background: rgba(255,255,255,.88);
    color: #7c4dff;

    font-size: 18px;
    font-weight: 900;

    box-shadow: 0 8px 18px rgba(0,0,0,.12);
    animation: bubbleFloat 2.8s ease-in-out infinite;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}


html[dir="rtl"] .hero-title::after {
    content: "اختر واحدًا!";
    right: auto;
    left: 12%;
}

/* موبايل */
@media (max-width: 600px) {
  
    .hero-title::after {
        display: none;
    }

    .kids-hero::before,
    .kids-hero::after {
        font-size: 16px;
        letter-spacing: 10px;
    }
}