/* General Setup */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --accent-color: #03dac6;
}

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

html, body { height: 100%; overflow: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Screens and Layout */
#game-container {
    width: 100%;
    /* max-width: 1200px; <-- REMOVED to allow full screen width */
    height: 100%;
}
.screen { position: relative; width: 100%; height: 100%; }
#start-screen, #game-over-screen { display: flex; flex-direction: column; align-items: center; padding-top: 10vh; }
#game-screen { display: flex; flex-direction: column; height: 100%; }

h1 { color: var(--accent-color); }

button, select {
    background-color: var(--surface-color); color: var(--primary-text-color);
    border: 1px solid var(--accent-color); padding: 10px 20px;
    border-radius: 5px; cursor: pointer; font-size: 1rem;
}
button:hover { background-color: var(--accent-color); color: var(--bg-color); }
select { min-width: 250px; }

/* Game Screen UI Elements */
#game-info {
    flex-shrink: 0; width: auto; align-self: center; margin-bottom: 20px;
    display: flex; gap: 40px; padding: 12px 30px;
    background-color: var(--surface-color); border-radius: 12px;
    border: 1px solid #333; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

#timeline-container {
    display: flex; justify-content: center; align-items: center;
    width: 100%; flex-grow: 1; min-height: 250px;
    padding: 10px; overflow: hidden;
}

#timeline-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

#current-card-area {
    flex-shrink: 0; padding: 20px 0; align-self: center;
    display: flex; flex-direction: column; align-items: center;
}

/* Card Layout */
.event-card {
    background-color: var(--surface-color); border: 1px solid #333;
    border-radius: 10px; padding: 8px; width: 140px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    gap: 6px; flex-shrink: 0;
    transition: transform 0.3s ease; /* Animate position change in flexbox */
}

.event-card.current .event-year { display: none; }
.event-card.in-timeline .event-info { display: none; }

.event-image-container { width: 120px; height: 120px; border-radius: 8px; overflow: hidden; }
.event-image { width: 100%; height: 100%; object-fit: cover; }
.event-year { font-size: 1rem; font-weight: bold; color: var(--accent-color); }
.event-title { font-size: 0.8rem; font-weight: bold; min-height: 32px; }
.event-info { font-size: 0.75rem; color: var(--secondary-text-color); }

#current-card-container .event-card { cursor: grab; }
#current-card-container .event-card:active { cursor: grabbing; opacity: 0.8; transform: scale(1.05); }

.timeline-placeholder { width: 140px; height: 180px; flex-shrink: 0; }

/* Floating Score Feedback */
@keyframes float-up-and-fade {
    to {
        transform: translateY(-60px);
        opacity: 0;
    }
}

.score-feedback {
    position: absolute;
    z-index: 100;
    pointer-events: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px black;
    animation: float-up-and-fade 1.5s ease-out forwards;
}