/**
 * Oracle Junior - PIXAR-QUALITY Kids Platform
 * Think: Inside Out 2 meets Disney+ Kids meets Apple
 * Bright, bubbly, alive with color and motion
 */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Baloo+2:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════
   VARIABLES
   ═══════════════════════════════════════ */
:root {
    --oj-purple: #7C3AED;
    --oj-purple-light: #A78BFA;
    --oj-blue: #3B82F6;
    --oj-cyan: #06B6D4;
    --oj-pink: #EC4899;
    --oj-orange: #F97316;
    --oj-yellow: #FBBF24;
    --oj-green: #22C55E;
    --oj-red: #EF4444;
    --oj-teal: #14B8A6;
}

/* ═══════════════════════════════════════
   ANIMATED BACKGROUND - Pixar Sky
   ═══════════════════════════════════════ */
.oracle-junior-mode {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Fredoka', 'Baloo 2', sans-serif;
    background: linear-gradient(170deg, #1a0533 0%, #0f1b4d 25%, #0c2461 45%, #1e3799 65%, #6c5ce7 85%, #a29bfe 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    color: #fff;
}

/* Floating animated blobs */
.oracle-junior-mode::before,
.oracle-junior-mode::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    animation: blobFloat 12s ease-in-out infinite;
}

.oracle-junior-mode::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #EC4899 0%, #8B5CF6 50%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.oracle-junior-mode::after {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #06B6D4 0%, #3B82F6 50%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -6s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Twinkling stars */
.oracle-junior-mode .junior-dashboard::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 15%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 40% 35%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 80% 25%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 50% 70%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 75% 60%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 90% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 65% 90%, rgba(255,255,255,0.4), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ═══════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════ */
.junior-dashboard {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 40px;
}

/* ═══════════════════════════════════════
   HEADER - Frosted glass navbar
   ═══════════════════════════════════════ */
.junior-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 44px;
    z-index: 100;
}

.junior-rainbow-text {
    font-family: 'Baloo 2', 'Fredoka', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FF6B6B, #FBBF24, #22C55E, #3B82F6, #A855F7, #EC4899);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 4s ease infinite;
    text-shadow: none;
}

@keyframes rainbowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.junior-header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-avatar-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(236,72,153,0.3));
    border: 1px solid rgba(168,85,247,0.4);
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
}

.header-avatar-emoji {
    font-size: 22px;
}

.header-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
}

.header-stat.stars {
    background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(249,115,22,0.25));
    border: 1px solid rgba(251,191,36,0.4);
    color: #FBBF24;
}

.header-stat.streak {
    background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(249,115,22,0.25));
    border: 1px solid rgba(239,68,68,0.4);
    color: #FB923C;
}

.header-stat-icon {
    font-size: 20px;
}

.junior-header-actions {
    display: flex;
    gap: 8px;
}

.junior-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.junior-btn-icon:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════ */
.junior-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 40px;
    width: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════
   GREETING BUBBLE - Glassmorphism
   ═══════════════════════════════════════ */
.junior-greeting-bubble {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(59,130,246,0.2));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.character-emoji {
    font-size: 42px;
    animation: bounceEmoji 2s ease-in-out infinite;
}

@keyframes bounceEmoji {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-4px) rotate(5deg); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   VOICE BUTTON - Giant Glowing Orb
   ═══════════════════════════════════════ */
.junior-voice-section {
    display: flex;
    justify-content: center;
    margin: 10px 0 40px;
}

.junior-voice-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #A855F7, #EC4899, #F97316);
    background-size: 200% 200%;
    animation: gradientSpin 3s ease infinite, floatOrb 3s ease-in-out infinite;
    color: #fff;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 0 40px rgba(168,85,247,0.5),
        0 0 80px rgba(236,72,153,0.3),
        0 0 120px rgba(168,85,247,0.15),
        inset 0 -4px 12px rgba(0,0,0,0.2),
        inset 0 4px 12px rgba(255,255,255,0.2);
}

.junior-voice-btn::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(168,85,247,0.3);
    animation: sonarRing 2s ease-out infinite;
}

.junior-voice-btn::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 1px solid rgba(236,72,153,0.2);
    animation: sonarRing 2s ease-out infinite 0.6s;
}

@keyframes sonarRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes gradientSpin {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.junior-voice-btn:hover {
    transform: scale(1.12) !important;
    box-shadow:
        0 0 60px rgba(168,85,247,0.7),
        0 0 120px rgba(236,72,153,0.5),
        0 0 180px rgba(168,85,247,0.25);
}

.voice-btn-icon {
    font-size: 48px;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.voice-btn-text {
    font-family: 'Baloo 2', 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.voice-btn-subtext {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
}

/* ═══════════════════════════════════════
   FEATURE CARDS - Vibrant 3D Cards
   ═══════════════════════════════════════ */
.junior-features-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.junior-feature-card {
    padding: 32px 24px;
    border-radius: 24px;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    color: #fff;
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Each card gets its own vibrant gradient */
.junior-feature-card.hero-card.youtube {
    background: linear-gradient(135deg, #FF0050, #FF4D6A, #FF8A00);
    box-shadow: 0 8px 32px rgba(255,0,80,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    padding: 40px 24px;
}

.junior-feature-card[data-card="chat"] {
    background: linear-gradient(135deg, #7C3AED, #A855F7, #C084FC);
    box-shadow: 0 8px 32px rgba(124,58,237,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.junior-feature-card[data-card="roblox"] {
    background: linear-gradient(135deg, #059669, #10B981, #34D399);
    box-shadow: 0 8px 32px rgba(16,185,129,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.junior-feature-card[data-card="homework"] {
    background: linear-gradient(135deg, #2563EB, #3B82F6, #60A5FA);
    box-shadow: 0 8px 32px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.junior-feature-card[data-card="art"] {
    background: linear-gradient(135deg, #DB2777, #EC4899, #F472B6);
    box-shadow: 0 8px 32px rgba(219,39,119,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.junior-feature-card[data-card="stories"] {
    background: linear-gradient(135deg, #D97706, #F59E0B, #FBBF24);
    box-shadow: 0 8px 32px rgba(217,119,6,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.junior-feature-card[data-card="fun"] {
    background: linear-gradient(135deg, #0891B2, #06B6D4, #22D3EE);
    box-shadow: 0 8px 32px rgba(6,182,212,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Shimmer effect on cards */
.junior-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    width: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

/* Hover: lift + glow */
.junior-feature-card:hover {
    transform: translateY(-8px) scale(1.03);
}

.junior-feature-card.hero-card.youtube:hover {
    box-shadow: 0 16px 48px rgba(255,0,80,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.junior-feature-card[data-card="chat"]:hover {
    box-shadow: 0 16px 48px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.junior-feature-card[data-card="roblox"]:hover {
    box-shadow: 0 16px 48px rgba(16,185,129,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.junior-feature-card[data-card="homework"]:hover {
    box-shadow: 0 16px 48px rgba(37,99,235,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.junior-feature-card[data-card="art"]:hover {
    box-shadow: 0 16px 48px rgba(219,39,119,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.junior-feature-card[data-card="stories"]:hover {
    box-shadow: 0 16px 48px rgba(217,119,6,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.junior-feature-card[data-card="fun"]:hover {
    box-shadow: 0 16px 48px rgba(6,182,212,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Staggered card entrance */
.junior-feature-card:nth-child(1) { animation-delay: 0.1s; }
.junior-features-subgrid .junior-feature-card:nth-child(1) { animation-delay: 0.15s; }
.junior-features-subgrid .junior-feature-card:nth-child(2) { animation-delay: 0.2s; }
.junior-features-subgrid .junior-feature-card:nth-child(3) { animation-delay: 0.25s; }
.junior-features-subgrid .junior-feature-card:nth-child(4) { animation-delay: 0.3s; }
.junior-features-subgrid .junior-feature-card:nth-child(5) { animation-delay: 0.35s; }
.junior-features-subgrid .junior-feature-card:nth-child(6) { animation-delay: 0.4s; }

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(40px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.feature-icon {
    font-size: 52px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
    animation: iconBounce 2.5s ease-in-out infinite;
}

.hero-card .feature-icon {
    font-size: 64px;
}

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

.feature-title {
    font-family: 'Baloo 2', 'Fredoka', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-card .feature-title {
    font-size: 24px;
    letter-spacing: 2px;
}

.feature-desc {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.hero-card .feature-desc {
    font-size: 16px;
}

/* Sub-grid: 3 columns */
.junior-features-subgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ═══════════════════════════════════════
   CHARACTER SWITCHER
   ═══════════════════════════════════════ */
.junior-character-switcher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
}

.switcher-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
}

.character-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.character-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.character-option .char-name {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.character-option:hover {
    background: rgba(255,255,255,0.12);
    transform: scale(1.1) translateY(-4px);
}

.character-option.active {
    background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(236,72,153,0.3));
    border-color: rgba(168,85,247,0.6);
    box-shadow: 0 4px 20px rgba(168,85,247,0.3);
    transform: scale(1.05);
}

/* ═══════════════════════════════════════
   OVERLAYS (Chat, YouTube, etc.)
   ═══════════════════════════════════════ */
.junior-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,5,30,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.junior-panel {
    background: linear-gradient(160deg, #1a1040, #0f1b4d);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    animation: panelSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes panelSlide {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.junior-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: 'Baloo 2', 'Fredoka', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.junior-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.junior-close-btn:hover {
    background: rgba(239,68,68,0.3);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════
   CHAT OVERLAY
   ═══════════════════════════════════════ */
.junior-chat-messages {
    padding: 20px 28px;
    min-height: 300px;
    max-height: 50vh;
    overflow-y: auto;
}

.junior-chat-msg {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    max-width: 85%;
    animation: msgPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msgPop {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.junior-chat-msg.user {
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.junior-chat-msg.assistant {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom-left-radius: 6px;
}

.junior-chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 28px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.junior-chat-input input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 15px;
    font-family: 'Fredoka', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.junior-chat-input input:focus {
    border-color: rgba(168,85,247,0.5);
}

.junior-chat-input input::placeholder {
    color: rgba(255,255,255,0.3);
}

.junior-chat-input button {
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    color: #fff;
    font-family: 'Fredoka', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.junior-chat-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

/* ═══════════════════════════════════════
   VOICE OVERLAY
   ═══════════════════════════════════════ */
.junior-voice-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 48px 40px;
    text-align: center;
}

.voice-big-orb {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #A855F7, #EC4899, #F97316);
    background-size: 200% 200%;
    animation: gradientSpin 3s ease infinite, pulseOrb 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    box-shadow: 0 0 60px rgba(168,85,247,0.5), 0 0 120px rgba(236,72,153,0.3);
    position: relative;
}

.voice-big-orb.listening {
    animation: gradientSpin 2s ease infinite, pulseOrb 0.8s ease-in-out infinite;
    box-shadow: 0 0 80px rgba(168,85,247,0.7), 0 0 160px rgba(236,72,153,0.5);
}

@keyframes pulseOrb {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-status-text {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.8;
}

.voice-transcript {
    font-size: 16px;
    max-width: 500px;
    line-height: 1.5;
    padding: 16px 24px;
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    min-height: 48px;
}

.voice-controls {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.voice-control-btn {
    padding: 12px 28px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-control-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.voice-control-btn.stop {
    background: linear-gradient(135deg, rgba(239,68,68,0.3), rgba(239,68,68,0.5));
    border-color: rgba(239,68,68,0.4);
}

/* ═══════════════════════════════════════
   YOUTUBE OVERLAY
   ═══════════════════════════════════════ */
.youtube-fullscreen {
    background: #0a0a1a;
}

.youtube-fullscreen .junior-panel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.yt-search-bar {
    display: flex;
    gap: 12px;
    padding: 16px 28px;
}

.yt-search-bar input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 15px;
    font-family: 'Fredoka', sans-serif;
    outline: none;
}

.yt-search-bar input:focus {
    border-color: rgba(255,0,80,0.5);
}

.yt-search-bar button {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #FF0050, #FF4D6A);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.yt-shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1;
}

.yt-show-card {
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.yt-show-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.2);
}

.yt-show-card .show-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1040, #2d1b69);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.yt-show-card .show-info {
    padding: 12px 14px;
}

.yt-show-card .show-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.yt-show-card .show-desc {
    font-size: 12px;
    opacity: 0.6;
}

/* YouTube player */
.yt-player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yt-player-container iframe {
    width: 100%;
    flex: 1;
    border: none;
}

/* Category pills */
.yt-categories {
    display: flex;
    gap: 10px;
    padding: 12px 28px;
    overflow-x: auto;
    flex-shrink: 0;
}

.yt-category-pill {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.yt-category-pill:hover,
.yt-category-pill.active {
    background: linear-gradient(135deg, #FF0050, #FF4D6A);
    border-color: transparent;
}

/* ═══════════════════════════════════════
   HOMEWORK / ART / STORY PANELS
   ═══════════════════════════════════════ */
.junior-panel-body {
    padding: 24px 28px;
}

.subject-grid, .art-style-grid, .genre-grid, .template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.subject-card, .art-style-card, .genre-card, .template-card {
    padding: 20px 16px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
}

.subject-card:hover, .art-style-card:hover, .genre-card:hover, .template-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-4px) scale(1.03);
    border-color: rgba(168,85,247,0.4);
}

.subject-card.active, .art-style-card.active, .genre-card.active {
    background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(236,72,153,0.3));
    border-color: rgba(168,85,247,0.6);
}

.subject-card .card-icon, .art-style-card .card-icon, .genre-card .card-icon, .template-card .card-icon {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}

/* ═══════════════════════════════════════
   FUN ZONE
   ═══════════════════════════════════════ */
.fun-zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.fun-card {
    padding: 24px 16px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #fff;
    font-weight: 700;
}

.fun-card:hover {
    transform: translateY(-6px) scale(1.05);
}

.fun-card .fun-icon {
    font-size: 42px;
    margin-bottom: 10px;
    display: block;
}

.fun-card.jokes { background: linear-gradient(135deg, #FBBF24, #F97316); }
.fun-card.riddles { background: linear-gradient(135deg, #7C3AED, #A855F7); }
.fun-card.trivia { background: linear-gradient(135deg, #3B82F6, #06B6D4); }
.fun-card.would-you-rather { background: linear-gradient(135deg, #EC4899, #F43F5E); }
.fun-card.magic-8-ball { background: linear-gradient(135deg, #1a1040, #4c1d95); }

.fun-result {
    margin-top: 20px;
    padding: 24px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    animation: msgPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════ */
.junior-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 14px 28px;
    border-radius: 50px;
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 8px 32px rgba(124,58,237,0.4);
    z-index: 10000;
    animation: notifSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    font-family: 'Fredoka', sans-serif;
}

@keyframes notifSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ═══════════════════════════════════════
   SETTINGS & HELP PANELS
   ═══════════════════════════════════════ */
.settings-section {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    margin-bottom: 12px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.settings-toggle {
    width: 52px;
    height: 28px;
    border-radius: 14px;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}

.settings-toggle.active {
    background: linear-gradient(135deg, #7C3AED, #A855F7);
}

.settings-toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-toggle.active::after {
    transform: translateX(24px);
}

/* ═══════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════ */
.oracle-junior-mode ::-webkit-scrollbar {
    width: 6px;
}

.oracle-junior-mode ::-webkit-scrollbar-track {
    background: transparent;
}

.oracle-junior-mode ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.oracle-junior-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════
   LOADING / THINKING INDICATOR
   ═══════════════════════════════════════ */
.junior-thinking {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
}

.junior-thinking .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: thinkingDot 1.2s ease-in-out infinite;
}

.junior-thinking .dot:nth-child(2) { animation-delay: 0.2s; }
.junior-thinking .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════
   ROBLOX BUILDER
   ═══════════════════════════════════════ */
.roblox-templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.roblox-template {
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.roblox-template:hover {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.4);
    transform: translateY(-4px);
}

.roblox-template .template-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.roblox-template .template-name {
    font-weight: 700;
    font-size: 13px;
}

/* Code output */
.roblox-code-output {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    color: #e6edf3;
}

/* ═══════════════════════════════════════
   CONFETTI (achievements, rewards)
   ═══════════════════════════════════════ */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    z-index: 100000;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════
   ACHIEVEMENTS BADGE
   ═══════════════════════════════════════ */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    padding: 40px;
    border-radius: 28px;
    background: linear-gradient(160deg, #1a0533, #2d1b69);
    border: 2px solid rgba(251,191,36,0.4);
    box-shadow: 0 24px 80px rgba(251,191,36,0.3);
    text-align: center;
    z-index: 100001;
    animation: achievePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes achievePop {
    from { transform: translate(-50%, -50%) scale(0) rotate(-10deg); }
    to { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.achievement-popup .badge-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.achievement-popup .badge-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #FBBF24;
    margin-bottom: 8px;
}

.achievement-popup .badge-desc {
    font-size: 15px;
    opacity: 0.7;
}

/* ═══════════════════════════════════════
   ENTITY PROGRESS (from entities.js)
   ═══════════════════════════════════════ */
.entity-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}

.entity-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #7C3AED, #EC4899);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════
   CHORES PANEL
   ═══════════════════════════════════════ */
.chore-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.chore-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.chore-card .chore-icon {
    font-size: 32px;
}

.chore-card .chore-info {
    flex: 1;
}

.chore-card .chore-name {
    font-weight: 700;
    font-size: 15px;
}

.chore-card .chore-reward {
    font-size: 13px;
    color: #FBBF24;
}

.chore-complete-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.chore-complete-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(34,197,94,0.4);
}

/* ═══════════════════════════════════════
   REWARDS STORE
   ═══════════════════════════════════════ */
.reward-card {
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reward-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251,191,36,0.3);
    box-shadow: 0 8px 24px rgba(251,191,36,0.15);
}

.reward-card .reward-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.reward-card .reward-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.reward-card .reward-cost {
    color: #FBBF24;
    font-weight: 700;
    font-size: 14px;
}

.reward-buy-btn {
    margin-top: 10px;
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #FBBF24, #F97316);
    color: #1a0533;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
}

.reward-buy-btn:hover {
    transform: scale(1.08);
}

/* ═══════════════════════════════════════
   HOMEWORK HELPER - Image upload
   ═══════════════════════════════════════ */
.homework-upload {
    border: 3px dashed rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.homework-upload:hover {
    border-color: rgba(59,130,246,0.5);
    background: rgba(59,130,246,0.05);
}

.homework-upload .upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.homework-result {
    padding: 24px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    line-height: 1.7;
    font-size: 15px;
    margin-top: 16px;
}

/* ═══════════════════════════════════════
   ART STUDIO
   ═══════════════════════════════════════ */
.art-canvas-container {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.art-tools {
    display: flex;
    gap: 10px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.art-tool-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.art-tool-btn:hover {
    background: rgba(255,255,255,0.15);
}

.art-tool-btn.active {
    background: linear-gradient(135deg, #EC4899, #DB2777);
    border-color: transparent;
}

/* ═══════════════════════════════════════
   STORY TIME
   ═══════════════════════════════════════ */
.story-content {
    padding: 28px;
    font-size: 17px;
    line-height: 2;
    max-height: 50vh;
    overflow-y: auto;
}

.story-content p {
    margin-bottom: 16px;
}

.story-prompt {
    display: flex;
    gap: 12px;
    padding: 16px 0;
}

.story-prompt input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 15px;
    font-family: 'Fredoka', sans-serif;
    outline: none;
}

.story-prompt button {
    padding: 14px 24px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* ═══════════════════════════════════════
   SCREEN TIME BAR (from screentime.js)
   Moved here so it styles consistently
   ═══════════════════════════════════════ */
.screen-time-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(34,197,94,0.85), rgba(16,185,129,0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.screen-time-bar.warning {
    background: linear-gradient(135deg, rgba(251,191,36,0.9), rgba(245,158,11,0.9));
}

.screen-time-bar.critical {
    background: linear-gradient(135deg, rgba(239,68,68,0.9), rgba(220,38,38,0.9));
}

/* Push dashboard below screen time bar */
.junior-dashboard {
    padding-top: 44px;
}

/* ═══════════════════════════════════════
   MOBILE HIDE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .junior-dashboard {
        display: none !important;
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE - Smaller desktops
   ═══════════════════════════════════════ */
@media (max-width: 1200px) and (min-width: 1025px) {
    .junior-features-subgrid {
        grid-template-columns: repeat(2, 1fr);
    }
    .junior-content {
        max-width: 900px;
        padding: 24px 30px;
    }
}
