/* ========================================
   Peek-a-Boo Rudy - Fixed Version
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    background: #e8e8e8;
    font-family: 'Quicksand', 'Georgia', serif;
    min-height: 100vh;
}

/* === SCREENS === */
#verify-screen,
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 30%, #E0F4F8 60%, #FFFFFF 85%, #F5F5F5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

#verify-screen.hidden,
#start-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.verify-content, .start-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
    max-width: 600px;
}

.verify-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

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

.verify-content h2 {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 2rem;
    color: #5B9BD5;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 #fff;
}

.verify-content > p {
    font-size: 1rem;
    color: #7BA3C9;
    margin-bottom: 1.5rem;
}

.birthday-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

#birthday-input {
    width: 200px;
    padding: 0.9rem 1.2rem;
    font-size: 1.2rem;
    font-family: 'Quicksand', sans-serif;
    text-align: center;
    border: 2px solid #B0D4F1;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #4A6FA5;
    outline: none;
}

#birthday-input:focus {
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.2);
}

#verify-btn {
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-family: 'Bubblegum Sans', cursive;
    background: linear-gradient(135deg, #5B9BD5 0%, #7BC8F6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(91, 155, 213, 0.3);
}

.verify-error {
    color: #E57373;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.2rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.shake { animation: shake 0.5s ease; }

/* Clouds */
.clouds-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 60%;
    pointer-events: none;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.9;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 { width: 200px; height: 60px; top: 10%; left: -10%; animation: floatCloud 25s linear infinite; }
.cloud-1::before { width: 80px; height: 80px; top: -40px; left: 30px; }
.cloud-1::after { width: 100px; height: 100px; top: -50px; left: 80px; }

.cloud-2 { width: 150px; height: 45px; top: 25%; left: -15%; animation: floatCloud 30s linear infinite; animation-delay: -10s; }
.cloud-2::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud-2::after { width: 75px; height: 75px; top: -40px; left: 60px; }

.cloud-3 { width: 180px; height: 50px; top: 5%; left: -20%; animation: floatCloud 35s linear infinite; animation-delay: -20s; }
.cloud-3::before { width: 70px; height: 70px; top: -35px; left: 25px; }
.cloud-3::after { width: 90px; height: 90px; top: -45px; left: 75px; }

@keyframes floatCloud {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 300px)); }
}

/* Bubbles */
.bubbles-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.9) 0%, rgba(173,216,230,0.4) 50%, rgba(135,206,235,0.2) 100%);
    border: 1px solid rgba(255,255,255,0.5);
    animation: riseBubble linear infinite;
}

.bubble:nth-child(1) { left: 5%; width: 40px; height: 40px; animation-duration: 12s; }
.bubble:nth-child(2) { left: 15%; width: 25px; height: 25px; animation-duration: 10s; animation-delay: -2s; }
.bubble:nth-child(3) { left: 35%; width: 50px; height: 50px; animation-duration: 14s; animation-delay: -4s; }
.bubble:nth-child(4) { left: 50%; width: 30px; height: 30px; animation-duration: 11s; animation-delay: -1s; }
.bubble:nth-child(5) { left: 65%; width: 45px; height: 45px; animation-duration: 13s; animation-delay: -3s; }
.bubble:nth-child(6) { left: 80%; width: 35px; height: 35px; animation-duration: 15s; animation-delay: -5s; }
.bubble:nth-child(7) { left: 25%; width: 20px; height: 20px; animation-duration: 9s; animation-delay: -6s; }
.bubble:nth-child(8) { left: 90%; width: 28px; height: 28px; animation-duration: 12s; animation-delay: -7s; }

@keyframes riseBubble {
    0% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { opacity: 0.9; }
    100% { transform: translateY(-120vh) scale(1.1); opacity: 0; }
}

/* Start Content */
.start-content h1 {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 3.5rem;
    margin-bottom: 0.3rem;
    color: #5B9BD5;
    text-shadow: 2px 2px 0 #fff;
}

.start-content .subtitle {
    font-size: 1.3rem;
    color: #7BA3C9;
    margin-bottom: 1.5rem;
}

.love-note {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(91,155,213,0.15);
}

.love-note p {
    font-size: 1rem;
    line-height: 1.7;
    color: #5A7A9A;
    margin-bottom: 1rem;
}

.love-note .greeting { font-weight: 600; color: #4A6FA5; }
.love-note .signature { font-weight: 600; color: #E88D95; font-style: italic; }

#start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    font-family: 'Bubblegum Sans', cursive;
    background: linear-gradient(135deg, #5B9BD5 0%, #7BC8F6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(91,155,213,0.4);
}

.start-content .hint {
    font-size: 0.85rem;
    color: #8BA8C4;
    margin-top: 1rem;
}

/* === MAIN EXPERIENCE === */
#shower-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    background: #d0d0d5;
}

#shower-container.revealed {
    overflow: visible;
}

/* Shower Background - Always visible initially */
#shower-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg,
        #e8e8ec 0%,
        #d8d8dc 20%,
        #e0e0e4 40%,
        #d5d5da 60%,
        #e5e5ea 80%,
        #dcdce0 100%
    );
    z-index: 1;
}

#shower-background::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 100px, rgba(200,200,205,0.3) 100px, rgba(200,200,205,0.3) 102px),
        repeating-linear-gradient(-45deg, transparent, transparent 150px, rgba(180,180,190,0.2) 150px, rgba(180,180,190,0.2) 152px);
}

#shower-background::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.3) 0%, transparent 40%);
}

/* Shower Head */
#shower-head {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 20px;
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 40%, #2a2a2a 100%);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 5;
}

#shower-head::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 55px;
    background: linear-gradient(90deg, #2a2a2a 0%, #4a4a4a 50%, #2a2a2a 100%);
    border-radius: 8px;
}

#shower-head::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 10%;
    width: 80%;
    height: 8px;
    background-image: radial-gradient(circle, #111 2px, transparent 2px);
    background-size: 12px 12px;
}

/* Water Stream */
#water-stream {
    position: absolute;
    top: calc(5% + 18px);
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80%;
    background: linear-gradient(180deg,
        rgba(120,180,255,0.6) 0%,
        rgba(100,170,255,0.4) 20%,
        rgba(80,160,255,0.25) 60%,
        rgba(60,150,255,0.1) 100%
    );
    border-radius: 50% 50% 0 0;
    z-index: 4;
    display: none;
}

#water-stream.active {
    display: block;
    animation: waterFlow 0.4s ease-in-out infinite alternate;
}

@keyframes waterFlow {
    0% { transform: translateX(-50%) scaleX(0.92); }
    100% { transform: translateX(-50%) scaleX(1.08); }
}

#water-stream::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 10%),
        linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 15%);
    background-size: 4px 50px, 6px 70px;
    animation: waterFall 0.2s linear infinite;
}

@keyframes waterFall {
    0% { background-position-y: 0; }
    100% { background-position-y: 50px; }
}

/* Water Splash */
#water-splash {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 50px;
    z-index: 4;
    display: none;
}

#water-splash.active {
    display: block;
}

#water-splash::before,
#water-splash::after {
    content: '';
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    animation: splash 0.8s ease-in-out infinite;
}

#water-splash::before {
    left: 25%;
    width: 80px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(150,200,255,0.5) 0%, transparent 70%);
}

#water-splash::after {
    left: 45%;
    width: 50px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(150,200,255,0.4) 0%, transparent 70%);
    animation-delay: 0.4s;
}

@keyframes splash {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4) translateY(-8px); opacity: 0.3; }
}

/* Media Layer - Hidden by default */
#media-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    z-index: 2;
    display: none;
    background: #f0f0f5;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

#media-layer.active {
    display: block;
}

#media-layer.scrollable {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
}

#media-image {
    width: 100%;
    height: auto;
    display: block;
    min-height: auto;
}

#media-video {
    display: none;
    width: 100%;
    height: auto;
}

/* Steam Canvas */
#steam-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#steam-canvas.active {
    display: block;
}

/* Disabled elements */
#glass-layer, #droplets-overlay {
    display: none;
}

/* Hand Cursor */
#hand-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -30%) rotate(-5deg);
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: drop-shadow(3px 4px 6px rgba(0,0,0,0.4));
    width: 64px;
    height: 64px;
}

#hand-cursor.visible {
    opacity: 1;
}

#hand-cursor.wiping {
    transform: translate(-50%, -30%) rotate(5deg) scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .start-content { padding: 1.5rem; max-width: 95%; }
    .start-content h1 { font-size: 2.5rem; }
    .love-note { padding: 1.2rem 1.5rem; }
    .love-note p { font-size: 0.95rem; }
    #start-btn { padding: 0.9rem 2rem; font-size: 1.2rem; }
    #hand-cursor { width: 48px; height: 48px; }
    .cloud-1 { width: 120px; height: 40px; }
    .cloud-2 { width: 100px; height: 30px; }
    .cloud-3 { width: 110px; height: 35px; }
}

@media (max-width: 480px) {
    .start-content h1 { font-size: 2rem; }
    .love-note { padding: 1rem 1.2rem; }
    .love-note p { font-size: 0.9rem; }
    #start-btn { padding: 0.8rem 1.8rem; font-size: 1.1rem; }
    #hand-cursor { width: 40px; height: 40px; }
}
