:root {
    --primary-color: #8B4513; /* Brown for "old west" feel */
    --secondary-color: #DAA520; /* Goldenrod */
    --background-color: #F5F5DC; /* Beige */
    --dark-accent: #654321;
    --light-accent: #F8F8FF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Georgia', serif;
    background-color: var(--background-color);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-variant: small-caps;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.game-area {
    background-color: var(--light-accent);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.status-panel {
    background-color: var(--dark-accent);
    color: var(--light-accent);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resources {
    display: flex;
    gap: 20px;
}

.resource {
    display: flex;
    align-items: center;
    gap: 5px;
}

.resource-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.journey-progress {
    width: 300px;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background-color: #ccc;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress {
    height: 100%;
    background-color: var(--secondary-color);
    width: 0%;
    transition: width 0.5s ease;
}

#current-city {
    text-align: center;
    font-weight: bold;
}

.train-view {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.landscape {
    height: 100%;
    width: 400%;
    position: relative;
    background-image: url('images/landscape.png');
    background-repeat: repeat-x;
    background-size: auto 200px;
    transition: transform 2s linear;
    left: -150%; /* Centers the landscape */
    transform: translateX(0); /* Starting position for animations */
}

.train {
    position: absolute;
    left: 40%;
    bottom: 30px;
    width: 150px;
    height: 60px;
    background-image: url('images/train.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
}

/* Train animation */
@keyframes trainMovement {
    0% { transform: translateY(0); }
    25% { transform: translateY(-2px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(2px); }
    100% { transform: translateY(0); }
}

.tracks {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 10px;
    background-color: #777;
}

.city-interaction {
    padding: 20px;
    border-top: 2px solid var(--primary-color);
}

/* Changed from grid to flex column layout */
.city-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 15px 0;
}

.passenger-management, .market {
    background-color: rgba(218, 165, 32, 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    padding: 10px;
    width: 100%;
}

h2, h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

button {
    background-color: var(--secondary-color);
    border: none;
    color: #333;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #B8860B;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1em;
    padding: 10px 20px;
}

.primary-btn:hover {
    background-color: #654321;
}

.primary-btn:disabled {
    background-color: #999;
}

.actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.game-message {
    margin: 20px auto;
    padding: 10px;
    border-left: 4px solid var(--secondary-color);
    background-color: rgba(218, 165, 32, 0.1);
    max-width: 80%;
    text-align: center;
    display: none;
}

.game-over {
    background-color: rgba(0,0,0,0.8);
    color: white;
    text-align: center;
    padding: 40px;
    border-radius: 10px;
    margin: 20px auto;
    display: none;
}

#restart-game {
    background-color: var(--secondary-color);
    font-size: 1.2em;
    margin-top: 20px;
}

ul {
    list-style-position: inside;
}

i {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.train {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.landscape {
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 60%, #8B4513 60%, #8B4513 70%, #228B22 70%, #228B22 100%);
}