/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
    --cream: #FDF6E3;
    --cream-dark: #F5ECD7;
    --light-green: #A8D5BA;
    --green: #7BC49E;
    --dark-green: #5BA882;
    --soft-yellow: #FFEAA7;
    --yellow: #F9E784;
    --pink: #FFB7B2;
    --soft-pink: #FFD1D1;
    --lavender: #DDA0DD;
    --sky-blue: #B8E6F0;
    --text: #4A4A4A;
    --text-light: #8A8A8A;
    --white: #FFFFFF;
    --shadow: rgba(74, 74, 74, 0.1);
    --shadow-md: rgba(74, 74, 74, 0.15);
    --font-body: 'Quicksand', sans-serif;
    --font-hand: 'Caveat', cursive;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 999px;
}

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

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

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loader-flower {
    font-size: 48px;
    animation: loader-bloom 1.5s ease-in-out infinite;
}

@keyframes loader-bloom {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(15deg); }
}

.loader-text {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ============================================================
   SCREEN & ROOM BASE
   ============================================================ */
.screen {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

.room {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--cream);
    z-index: 100;
}

.room.active {
    opacity: 1;
    pointer-events: auto;
}

.room::-webkit-scrollbar {
    width: 6px;
}

.room::-webkit-scrollbar-track {
    background: transparent;
}

.room::-webkit-scrollbar-thumb {
    background: var(--light-green);
    border-radius: 3px;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--light-green);
    transform: translateX(-3px);
}

/* ============================================================
   ROOM TITLE AREA
   ============================================================ */
.room-title-area {
    text-align: center;
    padding: 80px 20px 30px;
}

.room-title-area h2 {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.room-title-area p {
    font-family: var(--font-hand);
    font-size: clamp(16px, 3vw, 20px);
    color: var(--text-light);
}

/* ============================================================
   GARDEN MAP
   ============================================================ */
.garden-sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        #E8F5E9 0%,
        #F1F8E9 30%,
        #FFFDE7 60%,
        var(--cream) 100%
    );
}

/* Sun */
.sun {
    position: absolute;
    top: 8%;
    right: 15%;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #FFE082, #FFD54F);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 213, 79, 0.5), 0 0 80px rgba(255, 213, 79, 0.2);
    animation: sun-pulse 4s ease-in-out infinite;
}

@keyframes sun-pulse {
    0%, 100% { box-shadow: 0 0 40px rgba(255,213,79,0.5), 0 0 80px rgba(255,213,79,0.2); }
    50% { box-shadow: 0 0 60px rgba(255,213,79,0.6), 0 0 100px rgba(255,213,79,0.3); }
}

/* Clouds */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    height: 30px;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.cloud-1 {
    width: 100px;
    top: 10%;
    left: -10%;
    animation: cloud-float 25s linear infinite;
}
.cloud-1::before { width: 50px; height: 40px; top: -15px; left: 15px; }
.cloud-1::after { width: 35px; height: 30px; top: -10px; left: 50px; }

.cloud-2 {
    width: 80px;
    top: 18%;
    left: 30%;
    animation: cloud-float 30s linear infinite 5s;
}
.cloud-2::before { width: 40px; height: 35px; top: -12px; left: 10px; }
.cloud-2::after { width: 30px; height: 25px; top: -8px; left: 40px; }

.cloud-3 {
    width: 120px;
    top: 7%;
    left: 55%;
    animation: cloud-float 35s linear infinite 10s;
}
.cloud-3::before { width: 55px; height: 45px; top: -18px; left: 20px; }
.cloud-3::after { width: 40px; height: 35px; top: -12px; left: 65px; }

@keyframes cloud-float {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 200px)); }
}

/* Hills */
.garden-hills {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    pointer-events: none;
}

.hill {
    position: absolute;
    border-radius: 50% 50% 0 0;
    bottom: 0;
}

.hill-1 {
    width: 80%;
    height: 100%;
    left: -15%;
    background: linear-gradient(180deg, var(--light-green), #8EC5A2);
    opacity: 0.5;
}

.hill-2 {
    width: 70%;
    height: 85%;
    right: -10%;
    background: linear-gradient(180deg, #B8E6C8, var(--green));
    opacity: 0.6;
}

.hill-3 {
    width: 90%;
    height: 70%;
    left: 5%;
    background: linear-gradient(180deg, var(--green), var(--dark-green));
    opacity: 0.4;
}

/* Pond Shape */
.pond-shape {
    position: absolute;
    bottom: 18%;
    left: 5%;
    width: 220px;
    height: 110px;
    background: radial-gradient(ellipse, #B8E6F0 0%, #89CFF0 60%, #7BC4E8 100%);
    border-radius: 50%;
    box-shadow: inset 0 -4px 15px rgba(0, 0, 0, 0.08), 0 2px 20px rgba(137, 207, 240, 0.3);
    animation: pond-ripple 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes pond-ripple {
    0%, 100% { transform: scaleX(1) scaleY(1); }
    50% { transform: scaleX(1.02) scaleY(0.98); }
}

/* Decorative Flowers */
.deco-flower {
    position: absolute;
    font-size: 24px;
    z-index: 2;
    pointer-events: none;
    animation: flower-sway 3s ease-in-out infinite;
}

.deco-flower:nth-child(odd) {
    animation-delay: -1s;
}

@keyframes flower-sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Garden Title */
.garden-title {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.garden-title h1 {
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    color: var(--text);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

.garden-title p {
    font-family: var(--font-hand);
    font-size: clamp(14px, 2.5vw, 18px);
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================================
   MAP ITEMS (Clickable Circles)
   ============================================================ */
.map-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.map-item:hover {
    transform: scale(1.08);
}

.map-item.locked {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(0.5);
}

.map-item.locked.unlocked {
    cursor: pointer;
    opacity: 1;
    filter: none;
}

.map-item.locked.unlocked .lock-overlay {
    opacity: 0;
    pointer-events: none;
}

.map-item.locked.unlocked .gift-circle {
    animation: gift-glow 2s ease-in-out infinite;
}

@keyframes gift-glow {
    0%, 100% { box-shadow: 0 4px 25px rgba(255, 213, 79, 0.4); }
    50% { box-shadow: 0 4px 40px rgba(255, 213, 79, 0.7), 0 0 60px rgba(255, 213, 79, 0.3); }
}

/* Positions */
#map-memory { left: 12%; top: 22%; }
#map-music  { right: 10%; top: 18%; }
#map-birthday { left: 50%; top: 42%; transform: translateX(-50%); }
#map-birthday:hover { transform: translateX(-50%) scale(1.08); }
#map-seal   { left: 10%; bottom: 28%; }
#map-closet { right: 8%; bottom: 30%; }

.item-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 25px var(--shadow-md);
    position: relative;
    transition: box-shadow 0.3s;
}

.map-item:hover .item-circle {
    box-shadow: 0 6px 35px var(--shadow-md);
}

.gift-circle {
    background: linear-gradient(135deg, var(--soft-yellow), var(--yellow)) !important;
}

.item-icon {
    font-size: 34px;
    line-height: 1;
}

.item-icon svg {
    display: block;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: opacity 0.5s;
}

.item-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.progress-text {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: block;
}

.progress-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pdot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--light-green);
    transition: all 0.4s;
}

.pdot.visited {
    background: var(--green);
    border-color: var(--dark-green);
    transform: scale(1.15);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--white);
    color: var(--text);
    padding: 14px 22px;
    border-radius: var(--radius);
    box-shadow: 0 4px 25px var(--shadow-md);
    font-size: 14px;
    font-weight: 500;
    max-width: 320px;
    pointer-events: auto;
    border-left: 4px solid var(--green);
}

.toast.special {
    border-left-color: var(--yellow);
    background: linear-gradient(135deg, var(--white), #FFFDE7);
}

/* ============================================================
   SEAL POND ROOM
   ============================================================ */
#seal-pond {
    background: linear-gradient(180deg, #E3F2FD 0%, #BBDEFB 40%, #90CAF9 100%);
}

.pond-scene {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 400px;
    margin: 0 auto;
    background: radial-gradient(ellipse at center, #B8E6F0 0%, #89CFF0 50%, #64B5F6 100%);
    border-radius: var(--radius);
    box-shadow: inset 0 -8px 30px rgba(0, 0, 0, 0.1), 0 8px 30px var(--shadow);
    overflow: hidden;
}

.lily-pad {
    position: absolute;
    width: 50px;
    height: 30px;
    background: #66BB6A;
    border-radius: 50%;
    opacity: 0.7;
}

.lily-pad::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: #90CAF9;
    border-radius: 0 50% 50% 0;
}

.seal {
    position: absolute;
    left: 15%;
    top: 25%;
    cursor: pointer;
    transition: transform 0.2s;
    animation: seal-idle 3s ease-in-out infinite;
    z-index: 5;
}

.seal:nth-child(4) { animation-delay: -1s; }
.seal:nth-child(5) { animation-delay: -2s; }

@keyframes seal-idle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(1deg); }
    75% { transform: translateY(3px) rotate(-1deg); }
}

.seal.bouncing {
    animation: seal-bounce 0.6s ease !important;
}

@keyframes seal-bounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-40px) rotate(5deg); }
    50% { transform: translateY(-45px) rotate(-3deg); }
    70% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.seal-bubble {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 18px 28px;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 4px 25px var(--shadow-md);
    max-width: 90%;
    width: 420px;
    z-index: 300;
    font-family: var(--font-hand);
    font-size: 20px;
    color: var(--text);
    line-height: 1.5;
}

.seal-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid var(--white);
    border-right: 10px solid transparent;
    border-top: 12px solid var(--white);
    border-bottom: 10px solid transparent;
}

/* ============================================================
   MUSIC ROOM
   ============================================================ */
#music-room {
    background: linear-gradient(180deg, #FFF8E1 0%, #FFECB3 50%, var(--cream) 100%);
}

.music-player-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Vinyl Record */
.vinyl-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}

.vinyl {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #1a1a1a, #2a2a2a, #1a1a1a, #333, #1a1a1a, #2a2a2a, #1a1a1a
    );
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s;
}

.vinyl.spinning {
    animation: vinyl-spin 3s linear infinite;
}

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

.vinyl::after {
    content: '';
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--soft-yellow), var(--yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.tonearm {
    position: absolute;
    top: -5px;
    right: 10px;
    width: 4px;
    height: 80px;
    background: #555;
    border-radius: 2px;
    transform-origin: top center;
    transform: rotate(-30deg);
    transition: transform 0.5s ease;
}

.tonearm::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #777;
}

.tonearm.playing {
    transform: rotate(-10deg);
}

/* Now Playing */
.now-playing {
    width: 100%;
    text-align: center;
}

.now-playing-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.now-playing h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.artist-name {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

/* Progress */
.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--dark-green);
    border-radius: 2px;
    transition: width 0.3s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}

.ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    color: var(--text);
    font-size: 16px;
    box-shadow: 0 2px 10px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ctrl-btn:hover {
    background: var(--light-green);
    transform: scale(1.05);
}

.play-btn {
    width: 56px;
    height: 56px;
    font-size: 20px;
    background: var(--green);
    color: var(--white);
}

.play-btn:hover {
    background: var(--dark-green);
}

/* Playlist */
.playlist {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-item:hover {
    background: #F1F8E9;
    transform: translateX(4px);
}

.playlist-item.active {
    background: var(--light-green);
    box-shadow: 0 2px 15px rgba(123, 196, 158, 0.3);
}

.playlist-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
}

.playlist-item.active .playlist-num {
    background: var(--green);
    color: var(--white);
}

.playlist-info {
    flex: 1;
    min-width: 0;
}

.playlist-info .pl-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-info .pl-artist {
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================================
   THRIFT CLOSET ROOM
   ============================================================ */
#thrift-closet {
    background: linear-gradient(180deg, #FCE4EC 0%, #FFF0F5 50%, var(--cream) 100%);
}

.closet-rack {
    position: relative;
    max-width: 600px;
    margin: 20px auto 40px;
    padding: 60px 20px 40px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.rack-bar {
    position: absolute;
    top: 50px;
    left: 20px;
    right: 20px;
    height: 6px;
    background: linear-gradient(90deg, #8D6E63, #A1887F, #8D6E63);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.clothing-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.clothing-item:hover {
    transform: translateY(-8px);
}

.hanger {
    width: 40px;
    height: 20px;
    border: 3px solid #8D6E63;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    margin-bottom: -2px;
    position: relative;
    z-index: 2;
}

.hanger::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 12px;
    border: 3px solid #8D6E63;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.clothes {
    width: 70px;
    transition: all 0.3s;
    position: relative;
}

.clothes-dress {
    height: 90px;
    background: linear-gradient(180deg, #F48FB1, #EC407A);
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    border-radius: 0 0 8px 8px;
}

.clothes-shirt {
    height: 70px;
    background: linear-gradient(180deg, #81D4FA, #29B6F6);
    clip-path: polygon(0% 0%, 30% 0%, 15% 15%, 0% 15%);
    border-radius: 0 0 4px 4px;
}

.clothes-shirt::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(180deg, #81D4FA, #29B6F6);
    clip-path: polygon(100% 0%, 70% 0%, 85% 15%, 100% 15%);
}

.clothes-jacket {
    height: 80px;
    background: linear-gradient(180deg, #CE93D8, #AB47BC);
    clip-path: polygon(0% 0%, 35% 0%, 20% 20%, 0% 20%);
    border-radius: 0 0 6px 6px;
}

.clothes-jacket::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 70px;
    height: 80px;
    background: linear-gradient(180deg, #CE93D8, #AB47BC);
    clip-path: polygon(100% 0%, 65% 0%, 80% 20%, 100% 20%);
}

.clothes-skirt {
    height: 65px;
    background: linear-gradient(180deg, #FFCC80, #FFA726);
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    border-radius: 0 0 8px 8px;
}

/* Closet Modal */
.closet-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.closet-modal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: modal-pop 0.4s ease;
}

@keyframes modal-pop {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: var(--text-light);
    background: none;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.closet-modal-photo {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    background: var(--cream);
}

.closet-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--light-green), var(--soft-yellow));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 14px;
}

.photo-placeholder small {
    font-size: 11px;
    opacity: 0.7;
}

.closet-modal-text {
    font-family: var(--font-hand);
    font-size: 20px;
    color: var(--text);
    line-height: 1.5;
    text-align: center;
}

/* ============================================================
   MEMORY BOOK ROOM
   ============================================================ */
#memory-book {
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.book-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-spine {
    width: 12px;
    height: 350px;
    background: linear-gradient(180deg, #8D6E63, #6D4C41);
    border-radius: 3px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    z-index: 2;
}

.book-pages {
    flex: 1;
    height: 350px;
    background: var(--white);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: 3px 3px 15px var(--shadow-md);
    overflow: hidden;
    position: relative;
}

.page-content {
    position: absolute;
    inset: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-content.active {
    opacity: 1;
    pointer-events: auto;
}

.page-text {
    font-family: var(--font-hand);
    font-size: clamp(16px, 3vw, 20px);
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 20px;
}

.page-photo {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--cream);
    box-shadow: 0 2px 10px var(--shadow);
}

.page-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--text);
    font-size: 20px;
    box-shadow: 0 2px 10px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    z-index: 3;
}

.page-nav:hover {
    background: var(--light-green);
    transform: scale(1.1);
}

.page-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.page-indicator {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================================
   BIRTHDAY ENDING
   ============================================================ */
#birthday-ending {
    background: #1a1a2e;
    overflow: hidden;
}

.birthday-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 213, 79, 0.1) 0%, transparent 70%);
}

.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    border-radius: 2px;
    opacity: 0;
}

.birthday-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 24px;
    text-align: center;
}

.birthday-stars {
    font-size: 28px;
    margin-bottom: 20px;
    animation: stars-twinkle 2s ease-in-out infinite;
}

@keyframes stars-twinkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.birthday-title {
    font-size: clamp(36px, 8vw, 64px);
    font-weight: 700;
    color: var(--soft-yellow);
    text-shadow: 0 0 40px rgba(255, 213, 79, 0.3);
    opacity: 0;
}

.birthday-divider {
    font-size: 24px;
    margin: 20px 0;
    opacity: 0;
}

.birthday-message {
    max-width: 560px;
    font-family: var(--font-hand);
    font-size: clamp(17px, 3.5vw, 22px);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    opacity: 0;
}

.birthday-footer {
    margin-top: 40px;
    opacity: 0;
}

.birthday-footer p {
    font-family: var(--font-hand);
    font-size: 20px;
    color: var(--soft-yellow);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .garden-title h1 { font-size: 20px; }
    .garden-title p { font-size: 13px; }

    .sun { width: 50px; height: 50px; top: 5%; right: 10%; }

    #map-memory { left: 5%; top: 20%; }
    #map-music  { right: 5%; top: 16%; }
    #map-seal   { left: 5%; bottom: 25%; }
    #map-closet { right: 3%; bottom: 28%; }

    .item-circle { width: 64px; height: 64px; }
    .item-icon { font-size: 28px; }
    .item-icon svg { width: 36px; height: 30px; }
    .item-label { font-size: 11px; }

    .pond-shape { width: 150px; height: 75px; bottom: 15%; left: 2%; }

    .pond-scene { height: 300px; }

    .closet-rack { gap: 10px; padding: 50px 10px 30px; }
    .clothes { width: 55px; }
    .clothes-dress { height: 70px; }
    .clothes-shirt { height: 55px; }
    .clothes-jacket { height: 62px; }
    .clothes-skirt { height: 50px; }

    .book-pages { height: 300px; }
    .book-spine { height: 300px; }
    .page-content { padding: 20px; }

    .vinyl-wrapper { width: 160px; height: 160px; }
    .vinyl { width: 160px; height: 160px; }
    .vinyl-label { width: 48px; height: 48px; font-size: 18px; }
    .tonearm { height: 65px; }

    .seal-bubble { bottom: 30px; font-size: 17px; padding: 14px 20px; }
}

@media (max-height: 600px) {
    .room-title-area { padding: 60px 20px 15px; }
    .pond-scene { height: 250px; }
    .book-pages { height: 250px; }
    .book-spine { height: 250px; }
}
