/* -------------------------------------------------------------
 * Playful Kids' Coming Soon Landing Page Stylesheet (Ages 0-6)
 * Custom CSS Properties, Bubbles background, rounded cards & animations
 * ------------------------------------------------------------- */

/* Custom Fonts & Variable Definitions */
:root {
    --font-heading: 'Fredoka', 'Quicksand', -apple-system, sans-serif;
    --font-body: 'Quicksand', -apple-system, sans-serif;

    /* Bright, Playful Kid Colors */
    --color-bg-base: #f0f9ff;          /* Light Sky Blue */
    --color-pink: #ff6b9d;             /* Bubblegum Pink */
    --color-blue: #00d2ff;             /* Vivid Sky Blue */
    --color-yellow: #ffd54f;           /* Sunshine Yellow */
    --color-green: #4caf50;            /* Playful Green */
    --color-purple: #ab47bc;           /* Magic Purple */

    /* Text Colors */
    --color-text-title: #2c3e50;
    --color-text-body: #5a6e7f;
    
    /* Playful Glass Card Variables */
    --kids-card-bg: rgba(255, 255, 255, 0.85);
    --kids-card-border: rgba(255, 255, 255, 0.95);
    --kids-card-blur: blur(12px);

    /* Transitions */
    --bounce-transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --smooth-transition: 0.3s ease;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: var(--color-bg-base);
    color: var(--color-text-body);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    font-weight: 500;
}

/* Video Section (Left half on desktop, top banner on mobile) */
.video-container {
    position: relative;
    width: 100%;
    height: 38vh;
    z-index: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe 0%, #ffeedd 50%, #fce7f3 100%);
    border-bottom: 4px solid white; /* Playful border divider on mobile */
}

.video-container video {
    width: 100%;
    height: 108%; /* Slightly taller to push the bottom stats bar out of bounds */
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    object-position: top; /* Keeps the top content centered and clips the bottom */
    opacity: 0.85; /* Increased opacity to show video clearly */
    transition: opacity var(--smooth-transition);
    z-index: 1;
}

/* Overlay gradient to keep page bright and child-friendly */
.overlay-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, rgba(240, 249, 255, 0.55) 70%, rgba(240, 249, 255, 0.85) 100%);
    z-index: 2;
}



/* Main Layout Container */
.app-container {
    width: 100%;
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 2;
}

/* Bubbly Kids Card */
.kids-card {
    background: var(--kids-card-bg);
    backdrop-filter: var(--kids-card-blur);
    -webkit-backdrop-filter: var(--kids-card-blur);
    border: 4px solid var(--kids-card-border);
    border-radius: 36px;
    padding: 3.5rem 3rem;
    max-width: 650px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 160, 255, 0.08),
                0 30px 60px rgba(0, 0, 0, 0.06),
                inset 0 4px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    transition: transform var(--bounce-transition), box-shadow var(--smooth-transition);
}

.kids-card:hover {
    transform: scale(1.01) translateY(-2px);
    box-shadow: 0 20px 45px rgba(0, 160, 255, 0.12),
                0 35px 70px rgba(0, 0, 0, 0.08);
}

/* Floating Card Decorators */
.card-decorator {
    position: absolute;
    width: 54px;
    height: 54px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.decorator-left {
    top: -20px;
    left: -20px;
    border: 3px solid var(--color-blue);
    color: var(--color-blue);
    animation: floatSlowly 3.5s infinite ease-in-out;
}

.decorator-right {
    bottom: -20px;
    right: -20px;
    border: 3px solid var(--color-pink);
    color: var(--color-pink);
    animation: floatSlowly 3.5s infinite ease-in-out 1.5s;
}

.floating-icon {
    width: 24px;
    height: 24px;
}

/* Kids Badge */
.badge-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eef2ff;
    border: 2px solid #dbeafe;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    margin-bottom: 2rem;
    position: relative;
}

.bounce-dot {
    width: 10px;
    height: 10px;
    background-color: var(--color-pink);
    border-radius: 50%;
    display: inline-block;
    animation: hop 1.2s infinite ease-in-out;
}

.badge-text {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-text i {
    color: var(--color-blue);
}

/* Typography & Titles */
.main-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-title);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.magical-text {
    background: linear-gradient(135deg, var(--color-pink) 0%, #ff8a65 40%, var(--color-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-weight: 800;
    animation: magicalShift 8s infinite ease-in-out;
}

.subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-body);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    font-weight: 500;
}

/* Countdown Clock - Playful & Colorful blocks */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 3px solid #e2e8f0;
    min-width: 95px;
    padding: 0.9rem 0.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 0 #cbd5e1;
    transition: transform var(--bounce-transition);
}

.time-block:nth-child(1) { border-color: #ffe082; box-shadow: 0 8px 0 #ffe082; } /* Yellow */
.time-block:nth-child(3) { border-color: #80deea; box-shadow: 0 8px 0 #80deea; } /* Cyan */
.time-block:nth-child(5) { border-color: #f8bbd0; box-shadow: 0 8px 0 #f8bbd0; } /* Pink */
.time-block:nth-child(7) { border-color: #a5d6a7; box-shadow: 0 8px 0 #a5d6a7; } /* Green */

.time-block:hover {
    transform: translateY(-4px) scale(1.05);
}

.time-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text-title);
    line-height: 1.1;
}

.time-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-body);
    margin-top: 0.4rem;
}

.time-separator {
    font-size: 1.8rem;
    animation: bounceSeparator 1.5s infinite ease-in-out;
}

/* Form Styles */
.waitlist-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto 2.25rem;
    width: 100%;
}

.input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.text-pink { color: var(--color-pink); }
.text-blue { color: var(--color-blue); }

.waitlist-form input[type="email"] {
    width: 100%;
    padding: 1.15rem 1.25rem 1.15rem 3.25rem;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    color: var(--color-text-title);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all var(--smooth-transition);
}

.waitlist-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.15);
}

/* Let's Play Button */
.submit-button {
    background: linear-gradient(135deg, var(--color-pink) 0%, #ff8a65 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 6px 0 #d81b60;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    white-space: nowrap;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #d81b60;
}

.submit-button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #d81b60;
}

.btn-icon {
    width: 20px;
    height: 20px;
    animation: rocketWiggle 2s infinite ease-in-out;
}

/* Feedback message */
.form-feedback {
    font-size: 0.9rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    padding-left: 0.5rem;
    min-height: 1.25rem;
    font-weight: 700;
}

.form-feedback.error { color: var(--color-pink); }
.form-feedback.success { color: var(--color-green); }

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px dashed #e2e8f0;
    padding-top: 1.75rem;
    gap: 1rem;
}

.subscriber-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-body);
    font-weight: 700;
}

.subscriber-count i {
    width: 22px;
    height: 22px;
}

.glow-text {
    color: var(--color-pink);
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-body);
    text-decoration: none;
    transition: all var(--bounce-transition);
}

.social-icon-btn i {
    width: 18px;
    height: 18px;
}

.social-icon-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
    transform: translateY(-2px) rotate(5deg);
}

/* Controller panel */
.control-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.5rem;
    border-radius: 100px;
}

.glass-panel {
    background: white;
    border: 3px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.control-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--color-text-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--smooth-transition);
    position: relative;
}

.control-btn i {
    width: 20px;
    height: 20px;
}

.control-btn:hover {
    color: var(--color-pink);
    background: rgba(255, 107, 157, 0.15);
}

.control-btn.active {
    background: var(--color-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.3);
}

.control-divider {
    width: 2px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 0.25rem;
}

/* Toolbar Tooltips */
.control-btn .tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: var(--color-text-title);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--smooth-transition), transform var(--smooth-transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.control-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--color-text-title) transparent transparent transparent;
}

.control-btn:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Autoplay Instruction Banner (Fixed Overlay at bottom or top) */
.autoplay-overlay {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 1000;
    background: var(--color-yellow);
    border: 3px solid white;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform var(--bounce-transition);
    pointer-events: none;
}

.autoplay-overlay.show {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    cursor: pointer;
}

.autoplay-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.autoplay-content p {
    font-weight: 700;
    color: #5c3e00;
    font-size: 0.95rem;
}

.big-play-icon {
    width: 24px;
    height: 24px;
    color: #5c3e00;
    animation: pulseIcon 1.2s infinite alternate;
}

/* Success Toast Popup */
.toast-popup {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 999;
    max-width: 400px;
    background: white;
    border: 4px solid var(--color-green);
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity var(--smooth-transition), transform var(--smooth-transition);
}

.toast-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.toast-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.toast-icon-wrapper {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid var(--color-green);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-green);
}

.toast-icon {
    width: 24px;
    height: 24px;
}

.toast-text {
    flex-grow: 1;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--color-text-title);
}

.toast-desc {
    font-size: 0.9rem;
    color: var(--color-text-body);
    line-height: 1.45;
}



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

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

@keyframes bounceSeparator {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15) translateY(-2px); }
}

@keyframes rocketWiggle {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg) translate(1px, -1px); }
}

@keyframes magicalShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(15deg); }
}

@keyframes pulseIcon {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.1); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .kids-card {
        padding: 2.5rem 1.75rem;
    }

    .main-title {
        font-size: 2.25rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }

    .countdown-container {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .time-block {
        min-width: 70px;
        padding: 0.7rem 0.25rem;
        box-shadow: 0 6px 0 #cbd5e1;
    }

    .time-number {
        font-size: 1.6rem;
    }

    .time-label {
        font-size: 0.7rem;
    }

    .time-separator {
        font-size: 1.3rem;
    }

    .waitlist-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .submit-button {
        padding: 1rem 2rem;
        box-shadow: 0 5px 0 #d81b60;
    }

    .card-footer {
        flex-direction: column;
        gap: 1rem;
        padding-top: 1.25rem;
    }

    .toast-popup {
        left: 1.5rem;
        right: 1.5rem;
        bottom: 1.5rem;
        max-width: none;
    }
}

/* Split Screen Desktop Layout: Video on Left, Card on Right */
@media (min-width: 1024px) {
    .video-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 50%;
        height: 100%;
        border-bottom: none;
        border-right: 4px solid white; /* Bubbly divider line on desktop */
    }

    .app-container {
        width: 50%;
        margin-left: 50%;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 3.5rem 3rem;
    }
    
    .control-panel {
        align-self: center;
        margin-left: 0;
    }

    .video-container video {
        min-width: 100%;
        min-height: 100%;
        width: 100%;
        height: 108%; /* Maintain bottom-crop on desktop */
        left: 0;
        top: 0;
        object-position: top; /* Keep top content visible, push stats bar out of viewport */
        transform: none;
    }
}
