:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e67e22;
    --board-bg: #ecf0f1;
    --cell-border: #bdc3c7;
    
    --p1-color: #e74c3c;
    --p2-color: #3498db;
    --p3-color: #2ecc71;
    --p4-color: #f1c40f;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    margin: 0;
    color: var(--primary-color);
}

.back-btn {
    text-decoration: none;
    color: white;
    background-color: var(--secondary-color);
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.2s;
}

.back-btn:hover {
    background-color: var(--primary-color);
}

/* Setup Screen */
.setup-screen {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.input-group {
    margin: 15px 0;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group select, .input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#start-game-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s;
}

#start-game-btn:hover {
    transform: scale(1.05);
}

/* Main Game Area */
.main-area {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

/* Board */
.board-container {
    flex: 0 0 auto;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 5px;
    width: 700px;
    height: 700px;
    background-color: var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    position: relative;
}

.cell {
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    text-align: center;
    position: relative;
    padding: 2px;
    box-sizing: border-box;
}

.cell-name {
    font-weight: bold;
    margin-bottom: 2px;
}

.cell-icon {
    font-size: 1.2rem;
}

.cell-price {
    font-size: 0.65rem;
    color: #7f8c8d;
}

.cell.service .cell-price {
    color: #d35400;
    font-weight: bold;
}

/* Special Cells */
.cell.start-line { background-color: #ffeaa7; }
.cell.luxury-estate { background-color: #dff9fb; border: 2px solid #f1c40f; }
.cell.service { background-color: #ffccbc; border: 2px solid #d84315; }
.cell.shortcut { background-color: #e0f7fa; border: 2px dashed #00bcd4; }
.cell.player-home { border: 2px solid; }

/* Center Field */
.center-field {
    grid-column: 2 / 8;
    grid-row: 2 / 8;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.center-logo {
    font-size: 5rem;
    margin-bottom: 10px;
}

.center-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Tokens */
.tokens-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    bottom: 2px;
    width: 100%;
    pointer-events: none;
}

.token {
    font-size: 1.2rem;
    transition: all 0.5s ease;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

/* Controls */
.controls {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 20px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.action-panel {
    text-align: center;
}

.current-player-display {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.dice-display {
    font-size: 4rem;
    margin: 10px 0;
    height: 80px;
}

.dice-display.rolling {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background-color: var(--primary-color);
}

.action-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#buy-btn {
    background-color: #27ae60;
}

#buy-btn:hover {
    background-color: #2ecc71;
}

/* Player Cards */
.players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.player-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.player-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-card.active {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Animations */
.anim-bounce { animation: bounce 0.5s; }
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
