/* Modern Playful Theme - Premium Edition */

/* REMOVED Google Fonts import to fix offline square characters */
/* @import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&family=Nunito:wght@400;600;800&display=swap'); */

:root {
    /* Refined Premium Palette */
    --bg-gradient: linear-gradient(135deg, #FFDEE9 0%, #B5FFFC 100%);
    /* Vibrant yet soft */
    
    --primary: #FF7E67; /* Warmer coral */
    --secondary: #48E0D5; /* Brighter teal */
    --accent: #FFD43B; /* Punchier yellow */
    
    --text-main: #2D3436;
    --text-light: #636E72;
    --text-white: #FFFFFF;

    /* Premium Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.75); /* Slightly more opaque for readability */
    --glass-border: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4));
    --glass-shine: linear-gradient(125deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 100%);
    --glass-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);

    /* Font Stack */
    --font-heading: "Microsoft YaHei", "Heiti SC", "SimHei", "Arial Rounded MT Bold", sans-serif;
    --font-body: "Microsoft YaHei", "PingFang SC", "Heiti SC", "Segoe UI", sans-serif;

    --card-radius: 28px;
}

.reveal {
    font-family: var(--font-body);
    color: var(--text-main);
    font-size: 34px;
    font-weight: 600;
}

.reveal-viewport {
    background: var(--bg-gradient);
    background-attachment: fixed;
}

/* ===========================================
   TYPOGRAPHY
   =========================================== */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.5em;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.reveal h1 {
    font-size: 3.2em;
    margin-top: 0;
    /* Standard Gradient Text for Headers */
    background: linear-gradient(45deg, var(--primary), #FF6B6B);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--primary); /* Fallback */
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 4px 6px rgba(0,0,0,0.1);
}

/* Special Rainbow Pulse Text */
.rainbow-pulse-text {
    background: linear-gradient(45deg, #FF6B6B, #FFA07A, #FFD93D, #48E0D5, #6C5CE7) !important;
    background-size: 300% 300% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    animation: 
        rainbow-flow 6s ease infinite,
        heartbeat-zoom 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heartbeat-zoom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Fallback for text-fill-color if needed, but modern browsers are ok */
@supports not (-webkit-text-fill-color: transparent) {
    .reveal h1 {
        background: none;
        color: var(--primary);
    }
}

.reveal h2 {
    font-size: 2.2em;
    color: var(--text-main);
}

.reveal h3 {
    font-size: 1.6em;
    color: var(--primary);
}

.reveal p,
.reveal li {
    font-size: 1.1em;
    line-height: 1.8;
}

/* ===========================================
   LAYOUT & CONTAINERS
   =========================================== */

.reveal .slides section {
    height: 100%;
    padding: 30px !important;
    box-sizing: border-box;
    text-align: left;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.full-height {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.center-all {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

/* ===========================================
   PREMIUM GLASS CARDS
   =========================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--card-radius);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    margin: 15px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 95%;
    overflow: visible;
    position: relative;
    
    /* Internal shine effect */
    background-image: var(--glass-shine);
    
    /* Transition for hover effect */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.005);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Grids */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    height: 100%;
    align-items: stretch;
}

.three-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    width: 100%;
    height: 100%;
    align-items: stretch;
}

.split-grid .glass-card,
.three-col-grid .glass-card {
    margin: 0;
    height: auto;
}

/* ===========================================
   DECORATIVE ELEMENTS
   =========================================== */

/* Emoji Bubbles (New Premium Icon) */
.emoji-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 32px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px; /* Squircle */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-right: 20px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover effect on parent li triggers bubble pop */
.reveal ul.fun-list li:hover .emoji-bubble {
    transform: scale(1.15) rotate(5deg);
    background: #FFF;
}

/* Stickers */
.sticker {
    transform: rotate(-3deg);
    display: inline-block;
    padding: 10px 24px;
    background: #FFF;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    font-family: var(--font-heading);
    font-size: 1em;
    border-radius: 50px;
    margin-bottom: 20px;
    align-self: flex-start;
    flex-shrink: 0;
    z-index: 10;
    font-weight: bold;
}

.sticker.yellow {
    background: linear-gradient(135deg, #FFF 0%, #FFF9C4 100%);
    color: #F57F17;
    border-left: 4px solid #FBC02D;
    transform: rotate(2deg);
}

.sticker.blue {
    background: linear-gradient(135deg, #FFF 0%, #E0F7FA 100%);
    color: #0097A7;
    border-left: 4px solid #00BCD4;
    transform: rotate(-2deg);
}

.sticker.red {
    background: linear-gradient(135deg, #FFF 0%, #FFEBEE 100%);
    color: #D32F2F;
    border-left: 4px solid #FF5252;
    transform: rotate(1deg);
}

/* ===========================================
   LISTS & TASKS
   =========================================== */

.reveal ul.fun-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px; 
}

/* Quest Card Styling */
.reveal ul.fun-list li {
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    font-size: 1em;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default; /* It feels interactive */
}

.reveal ul.fun-list li:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(8px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: rgba(255,255,255,0.9);
}

/* Task Grid Override */
.reveal ul.fun-list.task-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 25px; 
}

.reveal ul.fun-list.task-grid li {
    height: 100%; /* Equal height items */
}

/* ===========================================
   ANIMATIONS & UTILS
   =========================================== */

/* Highlighter */
.highlight {
    background: linear-gradient(120deg, rgba(255, 212, 59, 0.5) 0%, rgba(255, 212, 59, 0.5) 100%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: 0 0;
    padding: 0 8px;
    border-radius: 4px;
    transition: background-size 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal .present .highlight.animate-draw {
    background-size: 100% 100%;
}

/* Float & Bounce */
.float-anim { animation: float 6s ease-in-out infinite; }
.bounce-anim { animation: bounce 2s infinite; }
.pulse-anim { animation: pulse 3s infinite; }
.spin-anim { animation: spin 10s linear infinite; }

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

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

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Utility Sizes */
.emoji-lg { font-size: 2em; }
.emoji-xl { font-size: 3em; }
.emoji-xxl { 
    font-size: 7em;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
}
.text-center { text-align: center; }

/* No JS Fallback */
.reveal.no-js .glass-card,
.reveal.no-js .sticker,
.reveal.no-js ul.fun-list li {
    opacity: 1;
    transform: none;
}

/* ===========================================
   MOBILE RESPONSIVE OVERRIDES
   =========================================== */
@media screen and (max-width: 900px) {
    .reveal { font-size: 18px !important; }
    
    .reveal .slides section {
        padding: 20px 15px !important;
        height: 100vh !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    .split-grid, .three-col-grid {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
        height: auto !important;
    }
    
    .split-grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .glass-card {
        margin: 10px 0 !important;
        padding: 20px !important;
        width: 100% !important;
        max-height: none !important;
    }

    .reveal h1 { font-size: 2.2rem !important; }
    .reveal h2 { font-size: 1.8rem !important; }
    
    .emoji-bubble {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-right: 15px;
    }

    .emoji-xxl { 
        font-size: 4rem !important; 
        margin-top: 15px !important; 
    }
    
    .reveal ul.fun-list.task-grid {
        grid-template-columns: 1fr !important;
    }
}
