/* Background & Fonts */
body {
    margin: 0;
    font-family: 'Georgia', serif;
    text-align: center;
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #f8e7c3;
    /* cream/gold */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

/* Headers */
h1,
h2 {
    font-family: 'Georgia', serif;
    color: #ffd700;
    text-shadow: 2px 2px #000;
    border-bottom: 2px solid #ffd700;
    display: inline-block;
    padding: 5px 10px;
}

/* --- Buttons & Inputs --- */
button {
    padding: 10px 20px;
    margin: 8px;
    border: 2px solid #ffd700;
    border-radius: 4px;
    background: #800020;
    /* burgundy */
    color: #f8e7c3;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

button:hover {
    background: #ffd700;
    color: #000;
}

/* Special style for selected mode button */
.mode-btn.selected {
    background: #ffd700;
    /* gold */
    color: #000;
    border: 2px solid #800020;
    /* burgundy */
}

input,
select {
    padding: 10px;
    border: 2px solid #ffd700;
    background: #111;
    color: #f8e7c3;
    border-radius: 4px;
    font-size: 1em;
    margin: 5px;
}

/* --- Start Screen Layout --- */
.setting-group {
    border: 1px solid #ffd700;
    padding: 15px;
    margin: 15px auto;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
}

.setting-group legend {
    color: #f8e7c3;
    padding: 0 10px;
    font-weight: bold;
}

.mode-options {
    display: flex;
    justify-content: space-around;
}

/* --- Game Screen Layout --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 800px;
    margin: 0 auto;
}

#mansion-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
    border: 4px solid #008080; /* Teal */
    background: #000;
}

#mansion-display {
    width: 100%;
    height: 200px; /* Adjust as needed */
    background-image: url('mansion/tier1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.5s ease-in-out;
    background-color: #222;
    border: 1px dashed #ffd700;
}

#controls {
    margin: 20px 0;
}

#hint-count {
    color: #1e90ff;
    /* sapphire blue */
    font-size: 1.1em;
    font-weight: bolder;
}

#answer-area {
    min-height: 100px;
    /* Prevents layout shift */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#hard-input {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#answer-bank {
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    /* Space between word bank buttons */
}

#answer-bank button {
    background: #444;
    border: 1px solid #ffd700;
    font-size: 0.9em;
}

/* Progress bar */
#progress-container {
    width: 80%;
    height: 12px;
    background: #333;
    margin: 15px auto;
    border: 1px solid #ffd700;
}

#progress {
    height: 100%;
    width: 0%;
    background: #1e90ff;
    /* sapphire blue */
    transition: width 0.2s linear;
    /* Smooth progress update */
}

/* Overlay Feedback */
#overlay-feedback {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10;
    cursor: pointer;
}

#feedback {
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
}

/* Status */
#status {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 14px;
    color: #ccc;
}

/* End Screen */
#review-answers {
    margin-top: 20px;
    text-align: left;
    display: inline-block;
    max-width: 80%;
}

#review-answers a {
    color: #ffd700;
    text-decoration: underline;
}

#fortune {
    padding: 10px 20px;
    margin: 8px;
    border: 2px solid #008080; /* Teal */
    border-radius: 4px;
    background: #111;
    color: #f8e7c3;
    font-weight: bold;
    text-shadow: 2px 2px #ffd700; /* Gold */
    font-size: 1.2em;
}

#fortune.gold {
    color: #ffd700; /* Gold */
}

#fortune.green {
    color: #00ff00; /* Green */
}

#fortune.red {
    color: #ff4500; /* OrangeRed */
}