* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
}

.game-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.panel {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.panel h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 24px;
}

.panel h3 {
    color: #764ba2;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
}

.player-info div {
    margin: 8px 0;
    font-size: 14px;
}

.player-info span {
    font-weight: bold;
    color: #667eea;
}

.game-btn {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game-btn:active {
    transform: translateY(0);
}

.game-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.game-btn.secondary {
    background: #6c757d;
}

#claimTimer, #resetTimer {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

#nearbyPlayers {
    max-height: 150px;
    overflow-y: auto;
}

.player-item {
    padding: 8px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.player-item:hover {
    background: #e9ecef;
}

.player-item .player-name {
    font-weight: bold;
    color: #667eea;
}

.player-item .player-tokens {
    font-size: 12px;
    color: #666;
}

.empty-state {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.stats div {
    margin: 6px 0;
    font-size: 13px;
}

.stats span {
    font-weight: bold;
    color: #764ba2;
}

.instructions {
    list-style-position: inside;
    font-size: 12px;
    line-height: 1.6;
    color: #555;
}

.instructions li {
    margin: 5px 0;
}

.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    z-index: 100;
    white-space: pre-line;
    line-height: 1.5;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip.visible {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

#position, #movementCost {
    font-size: 13px;
    margin: 5px 0;
}

#costValue, #timerValue, #earnedValue, #balanceValue, #bankValue {
    color: #667eea;
    font-weight: bold;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
}
