:root {
    --bg-color: #0d0d0d;
    --text-main: #f0f0f0;
    --accent: #b8860b;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.sanctuary-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 800px; /* Made wider for the stream */
    text-align: center;
}

/* Made Gorilla Larger */
.gorilla-wrapper {
    position: relative;
    width: 500px; 
    max-width: 90vw;
    height: auto;
    overflow: hidden; /* Contains the ticker and hearts */
    border-radius: 10px;
}

.gorilla-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,1);
    transition: all 3s ease-in-out;
}

/* Crumble Effect - Fades to a ghost image */
.crumble {
    opacity: 0.15;
    filter: grayscale(100%) blur(4px);
}

.pin {
    position: absolute;
    width: 10px; height: 10px;
    background-color: silver;
    border-radius: 50%;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.8);
    animation: stab 0.3s ease-out forwards;
}

@keyframes stab {
    0% { transform: scale(3) translateY(-20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

#hugOverlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(184, 134, 11, 0.4);
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; opacity: 0; transition: opacity 1s; pointer-events: none;
}
#hugOverlay.active { opacity: 1; }
#hugOverlay p { font-size: 1.5rem; font-weight: bold; padding: 20px; text-shadow: 2px 2px 4px #000; }
.hidden { display: none !important; }

/* Rising Hearts */
#heartsContainer {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; overflow: hidden;
}
.floating-heart {
    position: absolute;
    bottom: -10%;
    font-size: 2rem;
    animation: floatUp 4s linear forwards;
    opacity: 0;
}
@keyframes floatUp {
    0% { transform: translateY(0) scale(0.8); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(-500px) scale(1.5); opacity: 0; }
}

/* Stream Ticker overlaying Gorilla */
#streamTicker {
    position: absolute; top: 50%; left: 0; width: 100%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 20px 0;
    overflow: hidden;
    display: flex; align-items: center;
}
.ticker-content {
    display: flex; white-space: nowrap; animation: ticker linear infinite;
}
.ticker-item {
    font-size: 2rem; /* Big text */
    font-weight: bold;
    padding: 0 50px;
    text-shadow: 2px 2px 8px #000;
}
@keyframes ticker {
    0% { transform: translateX(500px); } /* Starts from right side of gorilla */
    100% { transform: translateX(-100%); }
}

/* UI Sections */
.input-section { width: 100%; max-width: 500px; transition: opacity 1s; }
.input-section textarea { width: 100%; height: 80px; background: #1a1a1a; color: white; border: 1px solid #333; border-radius: 5px; padding: 10px; resize: none; margin-bottom: 10px; }
.input-section button { background: var(--accent); color: white; border: none; padding: 12px 24px; font-weight: bold; cursor: pointer; border-radius: 5px; transition: 0.2s; }
.input-section button:hover { background: #daa520; }
.timer-text { font-size: 0.9rem; color: #888; }

.streamer-controls { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }
.streamer-controls button { background: #333; color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-size: 0.8rem; }
.streamer-controls button:hover { background: #555; }
.streamer-controls .reset-btn { background: #8b0000; }
.streamer-controls .reset-btn:hover { background: #ff0000; }