/**
 * Where Eagles Dare - Schloss Adler
 * Game Styles
 * 
 * Copyright (c) 2025 b1231.xyz
 * Free to use, modify, and distribute with attribution
 */

:root {
    --primary-color: #9d1c1f;      /* Mission Red */
    --secondary-color: #6f93b8;    /* Alpine Blue */
    --accent-color: #c97d1f;       /* Supplementary Orange */
    --border-color: #0f1b26;       /* Midnight Steel */
    --text-color: #f4f5f0;         /* Operational White */
    --background-color: #1b242f;   /* Operational Night */
    --card-background: #26323f;
    --card-shadow: rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', sans-serif;
    background: radial-gradient(circle at top, #2d3c4c 0%, #1a232e 55%, #111820 100%);
    color: var(--text-color);
    margin: 0;
    padding: 2px;
    min-height: 100vh;
    font-size: clamp(13px, 1.4vw, 16px);
    line-height: 1.3;
}

h1, h2, h3, h4 {
    font-family: 'Impact', 'Anton', 'Arial Black', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 900;
    text-shadow:
        0 2px 0 rgba(15, 27, 38, 0.65),
        2px 0 0 rgba(15, 27, 38, 0.55),
        0 -2px 0 rgba(15, 27, 38, 0.45),
        -2px 0 0 rgba(15, 27, 38, 0.65);
    -webkit-text-stroke: 1px rgba(15, 27, 38, 0.75);
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 1px;
}

header .subtitle {
    font-family: 'Segoe UI', sans-serif;
    color: var(--accent-color);
    font-size: 1.1em;
    font-style: normal;
    margin: 2px 0;
    letter-spacing: 0.18em;
    text-transform: none;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    letter-spacing: 0.08em;
    margin: 0;
    color: #b62123;
    text-align: center;
    font-weight: 900;
}

h2 {
    font-size: clamp(1.3rem, 2.6vw, 1.9rem);
    margin-bottom: 3px;
    color: #f1dfc7;
    letter-spacing: 0.1em;
    font-weight: 900;
}

.header-info {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
}

.turn-counter, .high-score {
    font-size: 1em;
    font-weight: bold;
    color: var(--text-color);
    background: rgba(15, 27, 38, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(244, 245, 240, 0.18);
    text-shadow: 0 0 6px rgba(111, 147, 184, 0.55);
}

.game-board {
    grid-column: 1;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 2px;
}

.resources-dice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    align-items: start;
}

.resources-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto 1fr;
    gap: 1px;
    padding: 1px;
    background: var(--card-background);
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(111, 147, 184, 0.08) 100%),
        repeating-linear-gradient(135deg, transparent, transparent 12px, rgba(157, 28, 31, 0.08) 12px, rgba(157, 28, 31, 0.08) 16px);
    border-radius: 6px;
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 12px var(--card-shadow);
}

.resources-section h2 {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    height: auto;
    min-height: 0;
}

.resource {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 3px;
    border-radius: 3px;
    background: linear-gradient(135deg, rgba(111, 147, 184, 0.12) 0%, rgba(244, 245, 240, 0.08) 100%);
    border: 1px solid rgba(244, 245, 240, 0.18);
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.resource label {
    font-size: 0.85em;
    font-weight: 700;
    color: rgba(244, 245, 240, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.value {
    font-size: 1.3em;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(157, 28, 31, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}

.resource.alert-critical .value {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
    animation: alertPulse 1s infinite;
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.dice-section {
    padding: 1px;
    background: var(--card-background);
    border-radius: 6px;
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 12px var(--card-shadow);
}

.dice-section h2 {
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    height: auto;
    min-height: 0;
}

.dice-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 1px 0;
    min-height: 24px;
    align-items: center; /* Center align all items vertically */
    justify-content: center;
}

.end-mission-button {
    width: auto;
    min-width: 140px;
    height: 32px;
    margin: 0;
    padding: 0 8px;
    font-size: 0.75em;
    background: var(--primary-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.end-siege-button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.die-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.die-arrow {
    width: 20px;
    height: 12px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: linear-gradient(145deg, rgba(111, 147, 184, 0.3) 0%, rgba(111, 147, 184, 0.15) 100%);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.die-arrow:hover:not(.disabled) {
    background: linear-gradient(145deg, rgba(157, 28, 31, 0.5) 0%, rgba(157, 28, 31, 0.3) 100%);
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(157, 28, 31, 0.4);
}

.die-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.die {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    background: linear-gradient(145deg, #0f1721 0%, #010407 100%);
    color: #f4f5f0;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.die.selected {
    border-color: var(--secondary-color);
    background: linear-gradient(145deg, #9d1c1f 0%, #c02b31 100%);
    color: #fdfdf9;
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(157, 28, 31, 0.35);
}

.die:hover:not(.used) {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.die.used {
    opacity: 0.3;
}

.actions-section {
    padding: 2px;
    background: var(--card-background);
    border-radius: 6px;
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 12px var(--card-shadow);
}

.action-spaces {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2px;
}

.action-space {
    padding: 2px;
    border-radius: 3px;
    background: linear-gradient(160deg, rgba(111, 147, 184, 0.1) 0%, rgba(31, 40, 51, 0.9) 100%);
    border: 1px solid rgba(244, 245, 240, 0.1);
}

.action-space h3 {
    margin: 0 0 2px 0;
    font-size: 0.9em;
    color: var(--text-color);
    letter-spacing: 0.05em;
}

.action-space p {
    margin: 0 0 2px 0;
    font-size: 0.8em;
    color: rgba(244, 245, 240, 0.85);
    line-height: 1.2;
}

.action-effect {
    font-size: 0.8em;
    margin: 2px 0 0 0;
    color: rgba(244, 245, 240, 0.8);
    line-height: 1.2;
}

.action-effect em {
    color: #f1dfc7;
    font-style: italic;
}

.dice-slots {
    min-height: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    margin-top: 2px;
}


.events-section {
    padding: 2px;
    background: var(--card-background);
    border-radius: 6px;
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 12px var(--card-shadow);
}

.events-section h2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.event-card {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 4px;
    background-color: rgba(30, 41, 53, 0.92);
    box-shadow: 0 4px 10px var(--card-shadow);
}

.event-card h3 {
    color: var(--primary-color);
    margin-bottom: 2px;
    text-shadow: 0 0 6px rgba(157, 28, 31, 0.35);
    font-size: 1em;
}

.event-card p {
    color: rgba(244, 245, 240, 0.82);
    font-size: 0.9em;
    line-height: 1.3;
}

.action-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 1.05em;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.action-button:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: rgba(28, 38, 48, 0.95);
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    max-width: 90vw;
    color: var(--text-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    font-size: 1.05em;
}

.tutorial-content {
    max-width: 500px;
}

.tutorial-steps {
    text-align: left;
    margin: 18px 0;
    font-size: 1.05em;
    line-height: 1.5;
}

.tutorial-steps h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tutorial-steps ol {
    padding-left: 20px;
}

.tutorial-steps li {
    margin-bottom: 10px;
}

.tutorial-steps ul {
    padding-left: 15px;
    margin: 5px 0;
}

.tutorial-steps ul li {
    margin-bottom: 3px;
}

#start-game {
    font-size: 1.2em;
    padding: 14px 26px;
    margin-top: 18px;
}

.feedback-message {
    grid-column: 1 / -1;
    padding: 4px;
    margin-bottom: 3px;
    background-color: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #92400e;
    border-radius: 3px;
    text-align: center;
    transition: opacity 0.3s;
    font-size: 0.9em;
    font-weight: 600;
}

.feedback-message.hidden {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
        font-size: 15px;
    }

    .game-container {
        grid-template-columns: 1fr;
        padding: 5px;
        gap: 5px;
    }

    h1 {
        font-size: clamp(2.1rem, 6vw, 2.8rem);
    }

    .subtitle {
        font-size: 1.1em;
    }

    .header-info {
        flex-direction: column;
        gap: 8px;
    }

    .resources-dice-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .resources-section {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto repeat(3, 1fr);
        gap: 5px;
        padding: 8px;
    }

    .action-spaces {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .die-wrapper {
        gap: 2px;
    }

    .die-arrow {
        width: 24px;
        height: 14px;
        font-size: 0.8em;
    }

    .die {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        min-width: 40px;
    }

    .reroll-button {
        width: auto;
        min-width: 160px;
        height: 40px;
        font-size: 1.2em;
        padding: 0 10px;
        margin: 0;
        max-width: none;
    }

    .dice-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .end-mission-button {
        min-width: 160px;
        height: 40px;
        font-size: 0.85em;
        padding: 0 10px;
    }

    .action-space {
        padding: 6px;
    }

    .action-space h3 {
        font-size: 1em;
    }

    .action-space p {
        font-size: 0.85em;
    }

    .action-effect {
        font-size: 0.85em;
    }

    .objective-spaces {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .objective-space {
        padding: 12px;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
        max-width: 95vw;
    }

    .popup-content {
        padding: 14px 22px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
        padding: 4px;
    }

    .game-container {
        padding: 4px;
        gap: 4px;
    }

    .resources-dice-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    h1 {
        font-size: clamp(1.9rem, 7vw, 2.4rem);
    }

    .subtitle {
        font-size: 1em;
    }

    .turn-counter, .high-score {
        font-size: 0.95em;
        padding: 5px 8px;
    }

    .die-wrapper {
        gap: 2px;
    }

    .die-arrow {
        width: 28px;
        height: 16px;
        font-size: 0.9em;
    }

    .die {
        width: 44px;
        height: 44px;
        font-size: 1.3em;
        min-width: 44px; /* Better touch target */
    }

    .reroll-button {
        width: auto;
        min-width: 170px;
        height: 44px;
        font-size: 1.3em;
        padding: 0 10px;
        margin: 0;
        max-width: none;
    }

    .end-mission-button {
        min-width: 170px;
        height: 44px;
        font-size: 0.8em;
        padding: 0 10px;
    }

    .resource {
        padding: 8px 10px;
    }

    .resource label {
        font-size: 0.9em;
    }

    .value {
        font-size: 1.6em;
    }

    .action-spaces {
        grid-template-columns: 1fr; /* Single column on small phones */
        gap: 4px;
    }

    .action-space {
        padding: 6px;
    }

    .action-space h3 {
        font-size: 0.95em;
        margin-bottom: 4px;
    }

    .action-space p {
        font-size: 0.8em;
        margin-bottom: 4px;
    }

    .action-effect {
        font-size: 0.8em;
        margin: 4px 0;
    }

    .objective-spaces {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .objective-space {
        padding: 10px;
    }

    .objective-space h3 {
        font-size: 1.1em;
    }

    .objective-space p {
        font-size: 0.95em;
    }

    .modal-content {
        padding: 16px;
        margin: 8px;
        max-width: 95vw;
    }

    .popup-content {
        padding: 12px 20px;
        font-size: 1em;
    }
}

@media (max-width: 360px) {
    body {
        font-size: 13px;
    }

    .die {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        min-width: 40px; /* Maintain good touch target */
    }

    .reroll-button {
        width: auto;
        min-width: 150px;
        height: 40px;
        font-size: 1.2em;
        padding: 0 8px;
        margin: 0;
        max-width: none;
    }

    .end-mission-button {
        min-width: 150px;
        height: 40px;
        font-size: 0.75em;
        padding: 0 8px;
    }

    .action-space {
        padding: 5px;
    }

    .action-space h3 {
        font-size: 0.9em;
    }

    .action-space p {
        font-size: 0.75em;
    }

    .action-effect {
        font-size: 0.75em;
    }

    .resource label {
        font-size: 0.85em;
    }

    .value {
        font-size: 1.5em;
    }

    .popup-content {
        font-size: 0.95em;
        padding: 10px 18px;
    }
}


.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: popupFadeIn 0.3s ease-out;
}

.popup-content {
    background-color: rgba(220, 38, 38, 0.92);
    color: #fef2f2;
    padding: 18px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    letter-spacing: 0.05em;
}

@keyframes popupFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes popupFadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

.popup.hidden {
    display: none;
}

.popup.fadeout {
    animation: popupFadeOut 0.3s ease-in forwards;
}

.objectives-offered {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

/* Old objective card styles removed - now using objective-space */

/* Remove the old cycling text */
.events-section h2::after {
    content: " ⚠⚠";
    color: var(--accent-color);
    font-size: 1.1em;
    margin-left: 8px;
    letter-spacing: 2px;
    animation: hazardPulse 2s infinite;
    display: inline-block;
}

@keyframes hazardPulse {
    0% { 
        opacity: 0.2;
        transform: translateX(0);
    }
    50% { 
        opacity: 1;
        transform: translateX(-6px);
    }
    100% { 
        opacity: 0.2;
        transform: translateX(0);
    }
}

/* Old objective card button styles removed - now using dice placement */

/* Add some visual grouping */
.action-space[data-action="recruit"],
.action-space[data-action="conscript"] {
    border-left: 4px solid var(--primary-color);
}

.action-space[data-action="bribe"],
.action-space[data-action="negotiate"] {
    border-left: 4px solid var(--secondary-color);
}

.action-space[data-action="gather"],
.action-space[data-action="march"] {
    border-left: 4px solid var(--accent-color);
}

.resource-tracks .resource label {
    font-family: 'Impact', 'Arial Black', sans-serif;
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.05em;
}

button {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 1.05em;
}

button:hover {
    background: var(--secondary-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

button:disabled,
button.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

button:disabled:hover,
button.disabled:hover {
    background: #ccc;
    transform: none;
}

/* Reroll button styled as a die */
.reroll-button {
    width: auto;
    min-width: 120px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--secondary-color);
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.15em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevent shrinking */
    padding: 0 8px; /* Add horizontal padding */
    margin: 0; /* Remove default button margin */
    box-sizing: border-box; /* Include border in width calculation */
    max-width: none; /* Remove max-width restriction */
}

.reroll-button:hover:not(.disabled) {
    background: var(--primary-color);
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.reroll-button.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.reroll-button.disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Objectives Section */
.objectives-section {
    margin-top: 10px;
    padding: 8px;
    background: linear-gradient(135deg, rgba(25, 33, 44, 0.95) 0%, rgba(36, 47, 58, 0.9) 100%);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    font-size: 0.9em;
}

.objectives-section h2 {
    color: var(--primary-color);
    margin-bottom: 8px;
    text-align: center;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    text-shadow: 0 0 8px rgba(157, 28, 31, 0.4);
}

.objective-spaces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.objective-space {
    background: var(--card-background);
    border: 2px solid rgba(244, 245, 240, 0.12);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 10px var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.objective-space:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.objective-space h3 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: bold;
    letter-spacing: 0.06em;
}

.objective-space p {
    margin: 0 0 6px 0;
    font-size: 0.95em;
    color: rgba(244, 245, 240, 0.85);
    line-height: 1.3;
}

.objective-space .dice-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 5px;
    min-height: 20px;
    border: 1px dashed rgba(244, 245, 240, 0.2);
    border-radius: 4px;
    padding: 3px;
    background: rgba(30, 41, 53, 0.8);
}

.objective-space .dice-slot {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(244, 245, 240, 0.25);
    border-radius: 4px;
    background: rgba(244, 245, 240, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: bold;
    color: var(--primary-color);
}

.objective-space .dice-slot.occupied {
    background: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    font-size: 1em;
}

/* Visual grouping for different objective types */
.objective-space[data-action="military_dominance"],
.objective-space[data-action="armed_supply_lines"] {
    border-left: 4px solid var(--primary-color);
}

.objective-space[data-action="political_influence"],
.objective-space[data-action="military_political_alliance"],
.objective-space[data-action="political_supply_chain"] {
    border-left: 4px solid var(--secondary-color);
}

.objective-space[data-action="supply_chain"],
.objective-space[data-action="resource_empire"] {
    border-left: 4px solid var(--accent-color);
}

/* Mobile-specific font size adjustments */
@media (max-width: 768px) {
    /* Header and main titles */
    h1 {
        font-size: 2.5em;
    }
    
    h2 {
        font-size: 1.4em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    /* Resource values */
    .value {
        font-size: 1.8em;
    }
    
    .resource label {
        font-size: 0.8em;
    }
    
    /* Action spaces */
    .action-space h3 {
        font-size: 1em;
    }
    
    .action-space p {
        font-size: 0.8em;
    }
    
    .action-effect {
        font-size: 0.8em;
    }
    
    /* Objective spaces */
    .objective-space h3 {
        font-size: 1.3em;
    }
    
    .objective-space p {
        font-size: 1em;
    }
    
    /* Dice */
    .die {
        font-size: 1.3em;
    }
    
    /* Buttons */
    button {
        font-size: 1em;
        padding: 12px 24px;
    }
    
    
    /* Event card */
    .event-card h3 {
        font-size: 1.2em;
    }
    
    .event-card p {
        font-size: 1em;
    }
    
    /* Feedback message */
    .feedback-message {
        font-size: 1.1em;
    }
    
    /* Turn counter */
    .turn-counter {
        font-size: 1.1em;
    }
}

/* Footer */
.game-footer .disclaimer {
    font-size: 0.7em;
    opacity: 0.7;
    margin-top: 0.5em;
    font-style: italic;
}

.game-footer {
    text-align: center;
    padding: 9px 12px;
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(15, 27, 38, 0.9) 0%, rgba(5, 9, 14, 0.95) 100%);
    border-top: 2px solid rgba(244, 245, 240, 0.1);
    font-size: 0.9em;
    color: var(--text-color);
    line-height: 1.4;
}

.game-footer p {
    margin: 0;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', sans-serif;
}

.game-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.game-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .game-footer {
        font-size: 0.95em;
        padding: 12px 8px;
    }
}