/* style.css — Cinematic Game Theme */

:root {
    /* Core Colors */
    --bg-app: #050505;
    --bg-panel: #121212;
    --bg-element: #1e1e1e;

    /* Text Colors */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-highlight: #ffffff;

    /* Accents */
    --accent-gold: #c9a84c;
    --accent-gold-dim: #8a7332;
    --accent-red: #8a2be2;
    /* Mystical twist, or stay war-like? Let's stick to War Red */
    --accent-war-red: #800000;
    --accent-steel: #717d7e;

    /* Stat Colors */
    --stat-karma: #ffd700;
    --stat-morale: #4facfe;
    --stat-health: #ff5858;

    /* UI Config */
    --max-width: 700px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --border-width: 1px;
    --font-serif: "Georgia", "Times New Roman", serif;
    --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
    --transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    background-image: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    padding: 20px;
}

/* ===== GAME LAYOUT WRAPPER ===== */
.game-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--max-width);
    background-color: var(--bg-panel);
    border: 1px solid var(--accent-gold-dim);
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7), inset 0 0 50px rgba(0, 0, 0, 0.5);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

/* Decorative corner accents */
.game-layout::before,
.game-layout::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    left: 0;
    opacity: 0.5;
}

.game-layout::before {
    top: 0;
}

.game-layout::after {
    bottom: 0;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--bg-element);
    padding-bottom: 16px;
}

.header__title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.header__subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== STATS BAR ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    background-color: var(--bg-element);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #333;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat__label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat__value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-sans);
}

.stat__value--karma {
    color: var(--stat-karma);
}

.stat__value--morale {
    color: var(--stat-morale);
}

.stat__value--health {
    color: var(--stat-health);
}

.stat__value--day {
    color: var(--text-highlight);
}

.stat__value--allegiance {
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin-top: 2px;
}

/* ===== MEDIA (IMAGE/VIDEO) ===== */
.media-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: var(--radius-sm);
    border: 1px solid #333;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.media-container--hidden {
    display: none;
}

.media-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== NARRATIVE ===== */
.narrative {
    margin-bottom: 24px;
    padding: 0 10px;
}

.narrative__text {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.narrative__event,
.narrative__ending {
    font-family: var(--font-sans);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    animation: slideUp 0.4s ease;
}

.narrative__event {
    background-color: rgba(201, 168, 76, 0.1);
    border-left: 3px solid var(--accent-gold);
    color: var(--accent-gold);
    font-style: italic;
    margin-top: 20px;
}

.narrative__ending {
    background-color: rgba(128, 0, 0, 0.2);
    border: 1px solid var(--accent-war-red);
    color: #ff9999;
    font-weight: 600;
    margin-top: 24px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CHOICES ===== */
.choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.choices__btn {
    position: relative;
    background: linear-gradient(to right, var(--bg-element), var(--bg-panel));
    color: var(--text-primary);
    border: 1px solid #333;
    border-left: 4px solid #444;
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.choices__btn:hover {
    border-left-color: var(--accent-gold);
    background: linear-gradient(to right, #252525, #1a1a1a);
    transform: translateX(4px);
    box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.3);
    color: var(--text-highlight);
}

.choices__btn:active {
    transform: translateX(2px);
}

.choices__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* ===== FOOTER ===== */
.footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-element);
}

.footer__btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #444;
    padding: 8px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: var(--transition);
}

.footer__btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background-color: rgba(201, 168, 76, 0.05);
}

/* ===== VALIDATION ===== */
.validation-error {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: #1a0000;
    border: 1px solid red;
    padding: 16px;
    z-index: 1000;
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .game-layout {
        height: 100vh;
        border: none;
        border-radius: 0;
        padding: 20px 16px;
    }

    .header__title {
        font-size: 1.5rem;
    }

    .stat__label {
        display: none;
        /* Compact stats on mobile */
    }

    .stat {
        flex-direction: row;
        gap: 4px;
    }

    .stat::before {
        /* Use icons for mobile? Or simplified text */
        content: attr(data-label);
        font-size: 0.7rem;
        color: #666;
    }
}