/* ============================================
   BABY NOTHING - Complete CSS Rewrite
   ============================================ */

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
}

/* Utility Class */
.hidden {
    display: none !important;
}

/* Global Mobile Fixes */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
}

/* ============================================
   START SCREEN
   ============================================ */
#start-screen {
    width: 100%;
    height: 100%;
    background: #ffb6c1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

#floating-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-welcome-img {
    position: absolute;
    opacity: 0.4;
    pointer-events: none;
}

.start-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

#start-btn {
    font-family: 'Comic Sans MS', 'Chalkboard', cursive, sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 20px 60px;
    border: 4px solid white;
    border-radius: 15px;
    background: #ff69b4;
    color: white;
    cursor: pointer;
    text-shadow: 2px 2px 0px #cc5599;
    box-shadow: 0 6px 0 #cc5599, 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.1s ease;
    letter-spacing: 3px;
}

#start-btn:hover {
    background: #ff85c1;
}

#start-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #cc5599, 0 4px 10px rgba(0,0,0,0.2);
}

/* ============================================
   INTRO SCENE (JS-Animated)
   ============================================ */
#intro-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ffdde1 0%, #ee9ca7 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow: hidden;
}

.adult-sprite {
    position: absolute;
    background-image: url('../assets/adult.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    /* Will be sized and positioned by JS */
}

#hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 110;
}

.floating-heart {
    position: absolute;
    font-size: 2rem;
    opacity: 1;
    transition: all 1.5s ease-out;
    pointer-events: none;
}

/* ============================================
   GAME SCENE
   ============================================ */
#game-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.room-background {
    width: 100%;
    height: 100%;
    background-image: url('../assets/room_background.jpg');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.baby-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    height: auto;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: babyFloat 3s ease-in-out infinite;
}

#baby-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.tickle-shake {
    animation: tickle 0.5s ease-in-out;
}

@keyframes tickle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes babyFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-15px); }
}

/* ============================================
   ACCESSORIES
   ============================================ */
.accessory {
    position: absolute;
    z-index: 20;
}

.equipped-item {
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.equipped-item:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

#bowtie-equipped {
    width: 30%;
    top: 65%;
    left: 35%;
}

#bowtie-head-equipped {
    width: 25%;
    top: 10%;
    left: 60%;
    transform: rotate(20deg);
}

#pacifier-equipped {
    width: 15%;
    top: 55%;
    left: 42%;
}

/* ============================================
   DROP ZONES
   ============================================ */
.drop-zone {
    position: absolute;
    z-index: 15;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.drop-zone.active-target {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 105, 180, 0.4);
    animation: zonePulse 0.8s infinite alternate;
}

@keyframes zonePulse {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(1.15); opacity: 1; }
}

#zone-mouth {
    width: 20%;
    height: 15%;
    top: 50%;
    left: 40%;
}

#zone-neck {
    width: 40%;
    height: 20%;
    top: 65%;
    left: 30%;
}

#zone-head {
    width: 35%;
    height: 25%;
    top: 5%;
    left: 45%;
}

/* ============================================
   HUD & INVENTORY
   ============================================ */
.hud {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

#happiness-display {
    color: #e91e63;
    display: flex;
    align-items: center;
    gap: 5px;
}

#happiness-display::before {
    content: '😊';
    font-size: 1.3rem;
}

/* Poop Layer - in front of baby but behind UI */
#poop-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    pointer-events: none;
}

.poop-item {
    position: absolute;
    pointer-events: none;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
    transition: opacity 0.5s ease, transform 0.3s ease;
}

/* Falling items container */
#falling-items {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
}

.falling-item {
    position: fixed;
    pointer-events: none;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

.inventory-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    padding: 0 10px;
}

.inventory-slot {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* Cooldown bar - REMOVED, using background color fade instead */
.cooldown-bar {
    display: none;
}

.inventory-slot .draggable-item {
    z-index: 2;
    position: relative;
    transition: opacity 0.3s ease;
}

.draggable-item.on-cooldown {
    opacity: 0 !important;
    pointer-events: none;
}

.item-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e91e63;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    z-index: 10;
}

/* Wipes on floor to collect */
.wipe-pickup {
    position: absolute;
    z-index: 25; /* Behind poop (30) but in front of baby (10) approx */
    cursor: pointer;
    animation: wipeFloat 2s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

@keyframes wipeFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

.negative-score {
    color: #ff3333 !important;
    text-shadow: 1px 1px 0 #000;
}

.draggable-item {
    width: 70px;
    height: 70px;
    cursor: grab;
    transition: transform 0.1s, opacity 0.3s;
    touch-action: none;
    object-fit: contain;
}

.draggable-item:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.dragging {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    width: 100px;
    height: auto;
    opacity: 0.9;
}

.inventory-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================================
   HINT TEXT
   ============================================ */
#hint-text {
    position: absolute;
    bottom: 130px;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px black;
    pointer-events: none;
    opacity: 0.8;
}

/* ============================================
   FLOATING TEXT (JS-created)
   ============================================ */
.floating-text {
    position: fixed;
    left: 50%;
    transform: translate(-50%, 0);
    font-size: 2rem;
    color: #ff4081;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.8s ease-out;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 600px) {
    #start-btn {
        font-size: 1.8rem;
        padding: 15px 45px;
    }
    
    .baby-wrapper {
        width: 95%;
        max-width: none;
    }

    .inventory-bar {
        height: 80px;
        bottom: 10px;
        width: 95%;
    }

    .inventory-slot {
        width: 60px;
        height: 60px;
    }

    .draggable-item {
        width: 50px;
        height: 50px;
    }
    
    #hint-text {
        bottom: 100px;
        font-size: 1rem;
    }
    
    .hud {
        font-size: 1rem;
        padding: 8px 15px;
        top: 10px;
        right: 10px;
    }
}