/* ==========================================================================
   SEEDS STARS MONTESSORI — WELCOME EXPERIENCE STYLESHEET
   Warm Cream Aesthetic, Hero Logo Branding, Montessori Stars & Shimmer Bar
   ========================================================================== */

:root {
    --ssm-welcome-bg: #FAF6F0;
    --ssm-welcome-primary: #16a34a;
    --ssm-welcome-gold: #d97706;
    --ssm-welcome-text: #1e293b;
    --ssm-welcome-subtext: #475569;
}

/* Fullscreen Overlay Container */
.ssm-welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: var(--ssm-welcome-bg);
    background: radial-gradient(circle at 50% 45%, #FFFDF9 0%, var(--ssm-welcome-bg) 80%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.8s linear;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* Smooth Exit State */
.ssm-welcome-overlay.ssm-fade-out {
    opacity: 0 !important;
    transform: scale(1.02) !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Floating Decorative Stars & Particles */
.ssm-welcome-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ssm-star {
    position: absolute;
    color: #f59e0b;
    opacity: 0.35;
    animation: ssmTwinkle 3s ease-in-out infinite alternate;
}

.ssm-star-1 { top: 12%; left: 15%; font-size: 1.25rem; animation-delay: 0.2s; }
.ssm-star-2 { top: 22%; right: 18%; font-size: 1.75rem; animation-delay: 0.7s; }
.ssm-star-3 { bottom: 25%; left: 18%; font-size: 1.5rem; animation-delay: 1.2s; }
.ssm-star-4 { bottom: 18%; right: 22%; font-size: 1.1rem; animation-delay: 0.4s; }
.ssm-star-5 { top: 45%; left: 8%; font-size: 0.9rem; animation-delay: 1.5s; opacity: 0.25; }
.ssm-star-6 { top: 40%; right: 10%; font-size: 1.3rem; animation-delay: 0.9s; opacity: 0.25; }

@keyframes ssmTwinkle {
    0% { transform: scale(0.85) rotate(0deg); opacity: 0.2; }
    50% { transform: scale(1.15) rotate(15deg); opacity: 0.55; }
    100% { transform: scale(0.85) rotate(0deg); opacity: 0.2; }
}

/* Top Toolbar: Language Switcher */
.ssm-welcome-topbar {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    padding: 0 28px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 10;
}

/* Minimalist Glassmorphism Language Switcher */
.ssm-lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ssm-lang-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ssm-welcome-subtext);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 34px;
}

.ssm-lang-btn.active {
    background: var(--ssm-welcome-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}

.ssm-lang-btn:hover:not(.active) {
    color: var(--ssm-welcome-text);
    background: rgba(0, 0, 0, 0.04);
}

/* Main Content Card Container */
.ssm-welcome-card {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 600px;
    width: 90%;
}

/* Logo Animation Container - Hero Branding */
.ssm-logo-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    animation: ssmLogoEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ssm-logo-img {
    display: block;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 10px 24px rgba(217, 119, 6, 0.16));
    transition: transform 0.3s ease;
}

/* Ukuran Logo yang Jauh Lebih Besar & Menonjol */
.ssm-logo-size-small { width: clamp(180px, 24vw, 220px); }
.ssm-logo-size-medium { width: clamp(260px, 34vw, 340px); }
.ssm-logo-size-large { width: clamp(320px, 42vw, 440px); }

@keyframes ssmLogoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(14px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Loading Progress Bar Container */
.ssm-progress-container {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: ssmFadeUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.ssm-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ssm-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #d97706 100%);
    border-radius: 999px;
    transition: width 0.1s linear;
    position: relative;
}

.ssm-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: ssmShimmer 1.8s infinite;
}

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

@keyframes ssmFadeUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.ssm-progress-meta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--ssm-welcome-subtext);
}

.ssm-progress-label {
    font-weight: 500;
}

.ssm-progress-percent {
    font-weight: 700;
    color: var(--ssm-welcome-gold);
    font-variant-numeric: tabular-nums;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ssm-welcome-overlay {
        transition: opacity 0.4s ease, visibility 0.4s ease !important;
        transform: none !important;
    }
    .ssm-star,
    .ssm-logo-wrapper,
    .ssm-progress-container,
    .ssm-progress-bar::after {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Responsive Touch Adjustments */
@media (max-width: 576px) {
    .ssm-welcome-topbar {
        top: 16px;
        padding: 0 16px;
    }
    .ssm-logo-size-large { width: clamp(240px, 70vw, 300px); }
    .ssm-logo-size-medium { width: clamp(200px, 62vw, 260px); }
    .ssm-logo-size-small { width: clamp(160px, 50vw, 200px); }
    .ssm-progress-container {
        max-width: 280px;
    }
}

/* Smart Audio Unlock Pill (Tampil Otomatis Jika Autoplay Diblokir Peramban) */
.ssm-audio-unlock-pill {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    animation: ssmFadeUp 0.4s ease forwards;
}

.ssm-unmute-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(217, 119, 6, 0.35);
    color: #b45309;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.15);
    transition: all 0.25s ease;
    min-height: 38px;
    animation: ssmPulsePill 2s infinite ease-in-out;
}

.ssm-unmute-btn:hover,
.ssm-unmute-btn:active {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
}

@keyframes ssmPulsePill {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(217, 119, 6, 0.15);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 6px 20px rgba(217, 119, 6, 0.25);
    }
}
