html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Comic Sans MS', sans-serif;
    background: #f0f8ff;
}
body {
    min-height: 100vh;
}
.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}
.level-select {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.level-select button {
    font-size: 1.3rem;
    padding: 1.2rem 2.4rem;
    border-radius: 1rem;
    border: none;
    background: #fff;
    box-shadow: 0 2px 10px #b4d7ed77;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}
.level-select button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.lock {
    font-size: 1.1em;
    margin-left: 0.5em;
}
#games-list {
    display: flex;
    gap: 1.3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: center;
}
.game-card {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 2px 12px #8ecae666;
    padding: 2rem;
    font-size: 1.3rem;
    cursor: pointer;
    min-width: 180px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s;
    position: relative;
    text-align: center;
    margin: 1rem;
}
.game-card.completed {
    background: #b7e8c9;
    box-shadow: 0 4px 18px #4fbe7988;
}
.small-btn {
    padding: 0.7rem 2.2rem;
    font-size: 1.1rem;
    border-radius: 1rem;
    background: #e0eaff;
    border: none;
    cursor: pointer;
    margin-top: 1.5rem;
}
.hidden { display: none; }
.gift-anim {
    width: 120px;
    height: 120px;
    background: url('Animation - 1752044468269.gif') center/contain no-repeat;
    animation: pop 0.7s infinite alternate;
    margin-bottom: 2rem;
}
@keyframes pop {
    from { transform: scale(1); }
    to   { transform: scale(1.08) rotate(5deg);}
}
/* Splash Animation */
.splash-screen {
    position: fixed;
    inset: 0;
    background: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: 0.7s;
}
.splash-screen.hide {
    opacity: 0;
    pointer-events: none;
}

        /* ========= Butterflies Game ========== */
        #bf-container {
          width: 90%;
          max-width: 600px;
          margin: 35px auto 0;
          background-color: #ffffff;
          padding: 28px 22px;
          border-radius: 20px;
          box-shadow: 0 10px 30px rgba(0,0,0,0.09);
          background: linear-gradient(to bottom, #f0e0ff, #d0a7ff);
        }
        #bf-header h1 {
          font-size: 36px;
          color: #ff66b2;
          margin-bottom: 20px;
          font-family: 'Comic Sans MS', sans-serif;
        }
        #bf-score-board {
          display: flex;
          justify-content: space-between;
          font-size: 20px;
          font-weight: bold;
          margin-bottom: 20px;
          color: #5a2d82;
          margin-top: 8px;
        }
        #bf-area {
          width: 100%;
          height: 300px;
          position: relative;
          border-radius: 10px;
          overflow: hidden;
          background-size: cover;
          background-position: center;
        }
        #bf-message {
          font-size: 22px;
          color: #ff66b2;
          font-weight: bold;
          margin-top: 20px;
        }
        #bf-cert {
          margin-top: 22px;
          padding: 9px 20px;
          font-size: 23px;
          background-color: #14082e;
          color: #ff66b2;
          border-radius: 10px;
          font-weight: bold;
        }
        #bf-play-again {
          margin-top: 22px;
          padding: 15px 30px;
          font-size: 18px;
          color: white;
          background-color: #ff66b2;
          border: none;
          border-radius: 15px;
          cursor: pointer;
          transition: background-color 0.3s;
          display: none;
        }
        #bf-play-again:hover {
          background-color: #ff3385;
        }
        .butterfly {
          width: 50px;
          height: 50px;
          position: absolute;
          cursor: pointer;
          border-radius: 50%;
          transition: all 0.5s ease;
        }
        .butterfly img {
          width: 100%;
          height: 100%;
          border-radius: 50%;
        }
        /* ========== Color Word Match & Different Color ========== */
        .card {
            border-radius: 10px;
            padding: 15px;
            margin: 15px 0;
            background-color: #ffebcd;
            color: #8b4513;
            font-size: 1.1em;
            text-align:center;
        }
        /* زرار رئيسي عند الـ hover */
        .level-select button:hover,
        .small-btn:hover {
            background: #d6eaff;
            box-shadow: 0 4px 16px #9fc4e333;
            transform: translateY(-2px) scale(1.04);
            transition: 0.18s;
        }

        .game-card {
            transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
        }
        .game-card:hover {
            background: #f9fbff;
            box-shadow: 0 6px 22px #8ecae633;
            transform: translateY(-4px) scale(1.04);
            cursor: pointer;
        }
        .hidden { display: none !important; }
        /* ...باقي الـ CSS كما هو... */
.video-box {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 2px 18px #bbd2ea7a;
    padding: 2rem 1rem 1.5rem 1rem;
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}
.iframe-wrap {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 0 auto 18px auto;
}
.iframe-wrap iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0; top: 0;
    border-radius: 1rem;
    border: none;
}
.video-back-btn {
    display: block;
    margin: 0 auto 2.5rem auto;
}
/* Extras (for videos) */
.extras-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 2rem 0 0 0;
}
.extras-grid {
    display: flex;
    gap: 1.3rem;
    flex-wrap: wrap;
    justify-content: center;
}
.extra-card {
    background: #f7f7fd;
    border-radius: 1.2rem;
    box-shadow: 0 2px 14px #b2a2eb44;
    padding: 2rem 3rem;
    font-size: 1.5rem;
    cursor: pointer;
    min-width: 180px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    text-align: center;
    color: #392d6b;
    font-weight: bold;
    transition: 0.17s;
}
.memory-game-container {
    max-width: 520px;
    margin: 30px auto 12px auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px #c9d7e866;
    padding: 30px 20px 26px 20px;
    border: 4px solid #f8b6d6;
    text-align: center;
    position: relative;
}

.memory-back-btn {
    display: block;
    margin: 1.5rem auto 0 auto;
}

@media (max-width: 600px) {
    .memory-game-container {
        margin-bottom: 2.5rem;
    }
    .memory-back-btn {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100vw;
        border-radius: 0;
        margin: 0;
        z-index: 101;
    }
}
.extra-card:hover { background: #f3e7ff; box-shadow: 0 5px 22px #8ecae633;}
/* Responsive styles */
@media (max-width: 1000px) {
    .game-card, .extra-card { min-width: 140px; font-size: 1rem; padding: 1rem; }
    .video-box { padding: 1.2rem 0.3rem 1rem 0.3rem; }
}
@media (max-width: 800px) {
    .game-card, .extra-card { min-width: 120px; font-size: 1rem; padding: 1rem 0.3rem; }
    .level-select { gap: 1rem; }
    .extras-container { margin: 1.2rem 0 0 0; }
}
@media (max-width: 600px) {
    .center {
        min-height: unset;
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    }
    .game-card, .extra-card {
        min-width: 90vw;
        font-size: 1rem;
        margin: 0.6rem auto;
        padding: 1.1rem 0.3rem;
    }
    .video-box {
        padding: 0.6rem 0.2rem 0.8rem 0.2rem;
        max-width: 98vw;
    }
    .level-select { flex-direction: column; gap: 0.7rem; }
    .small-btn, .video-back-btn { font-size: 1rem; padding: 0.7rem 1.5rem; }
    #games-list { gap: 0.7rem; }
}
@media (max-width: 440px) {
    .center { padding: 0.2rem 0.1rem; }
    .game-card, .extra-card {
        min-width: 96vw;
        font-size: 0.95rem;
        padding: 0.8rem 0.2rem;
    }
    .video-box { padding: 0.2rem 0.1rem 0.5rem 0.1rem;}
}
@keyframes welcomeMove {
  0% { opacity:0; transform: translateY(50px);}
  60% { opacity:1; transform: translateY(-10px);}
  100% { opacity:1; transform: translateY(0);}
}