/* General Styling */
html, body {
    font-family: 'Georgia', serif;
    background-color: #111 !important; /* Ensure full dark background */
    color: #f4e9d7;
    text-align: center;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Main game container - Centered & Scaled */
#game-box {
    max-width: 700px;
    height: 80vh; /* Keeps it within screen limits */
    margin: 10vh auto; /* Adds top & bottom spacing */
    padding: 20px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    box-shadow: 0px 0px 20px rgba(255, 215, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* ✅ Enables scrolling for long text */
    scrollbar-width: thin; /* Makes scrollbar less intrusive */
    scrollbar-color: #d4af37 #222; /* Gold Scrollbar */
}

/* Story text formatting */
#story-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 10px;
    text-align: left;
    flex-grow: 1; /* Ensures it fills space properly */
    overflow-y: auto; /* ✅ Ensures scrolling inside the box */
    max-height: 60vh; /* Limits height on mobile */
}

/* Enable smooth scrolling for long content */
#story-text::-webkit-scrollbar {
    width: 8px;
}
#story-text::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 10px;
}

/* Fade-in effect for paragraphs and headers */
p, h2, h3 {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Options container - Centered Buttons */
#options-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    overflow-y: auto;
}

/* Buttons - Standard Gold Buttons */
button {
    background-color: #d4af37;
    color: black;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    width: 65%;
    max-width: 320px;
    font-weight: bold;
    text-align: center;
}

button:hover {
    background-color: #f5d76e;
}

/* Restart Button - Extra Spacing & Centering */
#restart-button {
    background-color: #b22222; /* Dark Red */
    color: white;
    margin-top: 50px;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    width: 65%;
    max-width: 320px;
}

#restart-button:hover {
    background-color: #ff4c4c;
}

/* Input Box - Centered & Styled */
#input-box {
    display: block;
    margin: 20px auto;
    padding: 12px;
    font-size: 1rem;
    width: 60%;
    max-width: 350px;
    border-radius: 5px;
    border: 1px solid #f4e9d7;
    background: #222;
    color: #f4e9d7;
    text-align: center;
    outline: none;
}

/* Submit Button - Matching Gold Theme */
#submit-button {
    display: block;
    margin: 15px auto;
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    background-color: #d4af37;
    color: black;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 60%;
    max-width: 300px;
    font-weight: bold;
    text-align: center;
}

#submit-button:hover {
    background-color: #f5d76e;
}

/* Fix for Squarespace iframe */
iframe {
    width: 100%;
    height: 100vh;
    display: block;
    background-color: #111 !important;
    border: none;
}

/* Hide elements initially */
.hidden {
    display: none;
}

/* Responsive Design Tweaks */
@media (max-width: 768px) {
    #game-box {
        height: 85vh; /* More space on smaller screens */
        margin: 5vh auto;
        padding: 15px;
    }
    #story-text {
        font-size: 1.1rem;
        max-height: 65vh;
    }
    button {
        width: 75%;
        max-width: 280px;
    }
}
