/* ===== Audrey's Learning Hub — Global Styles ===== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Nunito', sans-serif;
    background-color: #FFF3E0;
    background-image:
        radial-gradient(circle, #FFD23F55 2px, transparent 2px),
        radial-gradient(circle, #FF6B3533 2px, transparent 2px),
        radial-gradient(circle, #4CAF5033 2px, transparent 2px);
    background-size: 48px 48px, 72px 72px, 60px 60px;
    background-position: 0 0, 24px 24px, 12px 36px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* ===== Big Touch Cards ===== */
.subject-card {
    border-radius: 28px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 0 rgba(0,0,0,0.18), 0 12px 24px rgba(0,0,0,0.15);
    min-height: 140px;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid rgba(0,0,0,0.15);
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 0 rgba(0,0,0,0.18), 0 16px 30px rgba(0,0,0,0.15);
}

.subject-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.18), 0 4px 8px rgba(0,0,0,0.1);
    border-bottom-width: 2px;
}

.subject-card .emoji {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 8px;
    display: block;
}

.subject-card .label {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-align: center;
}

/* ===== Letter / Number Cards ===== */
.learn-card {
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.12);
    padding: 16px 8px;
    min-height: 110px;
    border-bottom: 4px solid rgba(0,0,0,0.15);
}

.learn-card:hover { transform: translateY(-3px); }
.learn-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 3px 6px rgba(0,0,0,0.1);
    border-bottom-width: 1px;
}

.learn-card .big-letter {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    line-height: 1;
    color: #fff;
    text-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.learn-card .sub-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-top: 4px;
    text-align: center;
}

/* ===== Game Buttons ===== */
.game-btn {
    border: none;
    border-radius: 18px;
    padding: 14px 20px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 6px 0 rgba(0,0,0,0.22), 0 8px 16px rgba(0,0,0,0.15);
    color: #fff;
    border-bottom: 4px solid rgba(0,0,0,0.18);
    letter-spacing: 0.02em;
}

.game-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0,0,0,0.22), 0 12px 20px rgba(0,0,0,0.15); }
.game-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.1);
    border-bottom-width: 1px;
}

/* ===== Correct / Wrong flash ===== */
@keyframes flash-green {
    0%,100% { background: inherit; }
    50%      { background: #4CAF50; }
}
@keyframes flash-red {
    0%,100% { background: inherit; }
    50%      { background: #F44336; }
}
.flash-correct { animation: flash-green 0.5s ease; }
.flash-wrong   { animation: flash-red   0.5s ease; }

/* ===== Kente border decoration ===== */
.kente-border {
    border: 6px solid transparent;
    border-image: repeating-linear-gradient(
        90deg,
        #FFD23F 0px, #FFD23F 12px,
        #FF6B35 12px, #FF6B35 24px,
        #4CAF50 24px, #4CAF50 36px,
        #2196F3 36px, #2196F3 48px
    ) 6;
}

/* ===== Story page ===== */
.story-panel {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.story-panel .story-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #f0e6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.story-panel .story-text {
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
}

/* ===== Memory card ===== */
.mem-card {
    aspect-ratio: 1;
    border-radius: 18px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.12);
}

.mem-card:hover { transform: translateY(-3px); }
.mem-card.flipped { transform: rotateY(180deg); }

.mem-card .card-front,
.mem-card .card-back {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.mem-card .card-front {
    background: linear-gradient(135deg, #FF6B35, #FFD23F);
    border-bottom: 4px solid rgba(0,0,0,0.15);
}

.mem-card .card-back {
    background: linear-gradient(135deg, #f0f9ff, #fff);
    transform: rotateY(180deg);
    border: 3px solid #FFD23F;
}

/* ===== Bubble game ===== */
.bubble {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow:
        inset 0 -5px 10px rgba(0,0,0,0.2),
        inset 0 5px 10px rgba(255,255,255,0.35),
        0 6px 16px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
    border: 3px solid rgba(255,255,255,0.4);
}

.bubble:active { transform: scale(0.75); }

@keyframes float {
    0%,100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-14px) rotate(2deg); }
}

/* ===== Color paint ===== */
.paint-area {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.color-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.color-swatch.active { border-color: #333; transform: scale(1.2); }
.color-swatch:active  { transform: scale(0.9); }

/* ===== Progress bar ===== */
.progress-bar {
    height: 14px;
    border-radius: 999px;
    background: #e0e0e0;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #FF6B35, #FFD23F);
    transition: width 0.4s ease;
}

/* ===== Section title ===== */
.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    background: linear-gradient(90deg, #FF6B35, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    filter: drop-shadow(0 2px 3px rgba(255,107,53,0.25));
}

/* ===== Sing-along bouncing dot ===== */
@keyframes bounce-dot {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.bounce-dot {
    display: inline-block;
    animation: bounce-dot 0.5s ease infinite;
}

/* ===== Responsive tweaks ===== */
@media (min-width: 640px) {
    .subject-card .emoji { font-size: 4.5rem; }
    .subject-card .label { font-size: 1.4rem; }
    .learn-card .big-letter { font-size: 4rem; }
}
