body {
    margin: 0;
    overflow: hidden; /* Prevent scrollbars */
    background-color: #000; /* Black background as fallback */
    color: white;
}

#container {
    width: 100vw;
    height: 100vh;
    display: block; /* Ensure it takes up space */
}

canvas {
    display: block; /* Prevent tiny space below canvas */
}

#ui-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10; /* Ensure UI is above canvas */
    pointer-events: none; /* Make container click-through */
}

/* Allow clicks on direct children within the UI container */
#ui-container > * {
    pointer-events: auto; 
}

/* Styles for individual UI elements (Add background/padding here if needed) */
#score-display, 
#timer-display, 
#collection-status {
    color: white;
    font-family: 'Arial', sans-serif; 
    font-size: 20px;
    text-shadow: 1px 1px 2px black;
    /* Example: Add individual backgrounds if desired */
    /* background-color: rgba(0, 0, 0, 0.5); */
    /* padding: 5px; */
    /* border-radius: 3px; */
    /* Adjust margins/positioning as needed */
    margin-bottom: 5px; /* Example spacing */
}

#collection-status {
    display: flex;
    align-items: center;
}

#collection-status img {
    height: 25px; 
    width: auto;
    margin-right: 5px;
    vertical-align: middle; 
}

.pillow-logo {
    margin-left: 8px; 
    display: none; /* Start hidden, JS will show them */
}



/* Make top-right counters visible */
#counters-top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}



#green-dots-ui {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 25px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

#green-dots-icon {
    font-size: 18px;
    margin-right: 8px;
}

#green-dots-count {
    color: #4CAF50; /* Bright green text */
    font-size: 16px;
    font-family: sans-serif;
    white-space: nowrap;
    text-shadow: 1px 1px 2px black;
}

#couch-collection-ui {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 25px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

#couch-collection-logo {
    height: 24px;
    width: auto;
    margin-right: 8px;
}

#couch-count-text {
    color: #4CAF50; /* Bright green text */
    font-size: 16px;
    font-family: sans-serif;
    white-space: nowrap;
    text-shadow: 1px 1px 2px black;
}

#pillow-badges {
    display: none; /* Hide container when no pillows collected */
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 25px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.pillow-badge {
    height: 24px;
    width: auto;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
    /* Hide badges by default - JS will show them when collected */
    display: none;
}

/* Position collection status below score */
#collection-status {
    position: absolute;
    top: 50px;
    left: 10px;
}

/* Loading Overlay Styles */
#loading-overlay {
    position: fixed; /* Cover the whole screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100; /* Highest priority */
    font-family: sans-serif;
    font-size: 36px;
    color: white;
}

/* Loading Spinner */
.lds-ring {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #fff;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #4CAF50 transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}
@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Controls display in lower-left */
#controls-display {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    font-family: sans-serif;
    font-size: 14px;
    color: #4CAF50; /* Bright green text */
    text-shadow: 1px 1px 2px black;
    border: 2px solid rgba(0, 0, 0, 0.3);
    z-index: 100;
}

/* Game objective message */
#game-objective {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-family: sans-serif;
    color: #4CAF50; /* Bright green text */
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 150;
}

/* Play again button */
#play-again-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 200;
    display: none;
    font-family: sans-serif;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

#play-again-btn:hover {
    background-color: #45a049;
}

/* Loading Screen Button Styles */
.loading-btn {
    padding: 15px 30px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    font-family: sans-serif;
    position: static; /* Ensure buttons stay in flex container */
}

.start-btn {
    background: #4CAF50; /* Green */
}
.start-btn:hover {
    background: #45a049;
}

.story-btn {
    background: #3f51b5; /* Blue */
}
.story-btn:hover {
    background: #3949ab;
}

/* Hide Game UI Initially - will be overridden by JavaScript */
#counters-top-right,
#controls-display {
    display: none; /* Hide initially, but allow JavaScript to override */
}

/* Story Modal Content */
.modal-content {
    background-color: rgba(30, 30, 30, 0.9);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #555;
    max-width: 600px;
    width: 80%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-content h2 {
    margin-top: 0;
    color: #eee;
}

.modal-content p {
    text-align: left;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #ccc;
}

#close-story-btn {
    margin-top: 20px;
    padding: 10px 25px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#close-story-btn:hover {
    background: #45a049;
}

/* Tap to continue overlay for mobile devices */
#tap-to-continue {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: #4CAF50;
    font-size: 24px;
    font-family: sans-serif;
    text-shadow: 1px 1px 2px black;
    z-index: 250;
    cursor: pointer;
} 