:root {
    --bg-color: #fbf8f1;
    --text-color: #2c2c2c;
    --brand-red: #8b2222;
    --alert-bg: #fff3cd;
    --alert-text: #856404;
    --alert-border: #ffeeba;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Merriweather', Georgia, serif;
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1.6;
}

header {
    padding: 20px;
    border-bottom: 2px solid var(--brand-red);
}

.brand-link {
    text-decoration: none;
    color: var(--brand-red);
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

#status-text {
    font-size: 4rem;
    margin: 10px 0;
    font-weight: 900;
    text-transform: uppercase;
}

.yes {
    color: var(--brand-red);
}

.no {
    color: #2e7d32;
}

.main-image-wrapper img {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 5px solid white;
}

.meta-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
}

.source-note a {
    color: var(--brand-red);
}

/* SAFETY WARNING BOX */
.safety-alert {
    background-color: var(--alert-bg);
    color: var(--alert-text);
    border: 1px solid var(--alert-border);
    padding: 15px;
    border-radius: 6px;
    margin: 20px auto;
    max-width: 600px;
    font-size: 0.95rem;
}

.divider {
    border: 0;
    height: 1px;
    background: #dcdcdc;
    margin: 40px 0;
}

/* Cams Grid */
.cam-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.cam-box img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Resource Buttons */
.resource-links {
    margin-top: 20px;
}

.button-link {
    display: inline-block;
    margin: 5px;
    padding: 10px 15px;
    background-color: white;
    border: 1px solid #ccc;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s;
}

.button-link:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

/* Footer & Disclaimer */
footer {
    padding: 40px 20px;
    background-color: #f4f1ea;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

.disclaimer {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 0.75rem;
    color: #777;
    text-align: justify;
    line-height: 1.4;
}

.disclaimer p {
    margin: 0;
}

footer a {
    color: var(--brand-red);
}

@media (max-width: 600px) {
    #status-text {
        font-size: 3rem;
    }

    .cam-box img {
        max-width: 100%;
    }

    .disclaimer {
        text-align: left;
    }
}

/* --- FLOOD SIMULATOR STYLES --- */
.game-launcher {
    margin: 30px 0;
}

#start-game-btn {
    background-color: #2c2c2c;
    color: white;
    border: 2px solid #000;
    padding: 10px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

#start-game-btn:hover {
    background-color: var(--brand-red);
}

.hidden {
    display: none !important;
}

#game-container {
    position: relative;
    margin: 20px auto;
    width: 300px;
    /* Fixed canvas width */
    max-width: 95%;
    /* Mobile safe */
    background: #000;
    padding: 10px;
    border: 4px solid #555;
    border-radius: 4px;
    box-sizing: content-box;
}

canvas {
    background-color: #2b3e50;
    border: 2px solid #fff;
    display: block;
    margin: 0 auto;
}

.game-instructions {
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    margin-top: 10px;
}

#close-game-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: red;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* THE MODAL (Oregon Trail Style) */
#game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #000;
    border: 4px double white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    font-family: 'Courier New', Courier, monospace;
    color: white;
    text-align: center;
}

.pixel-link {
    display: inline-block;
    background: white;
    color: black;
    text-decoration: none;
    padding: 5px 10px;
    font-weight: bold;
    margin: 10px 0;
}

#restart-btn,
#quit-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
}