/* Parcheesi Web Game Styles */

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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
}

/* Board Panel */
.board-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 3px solid #2B1402;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background: #5C3406;
    cursor: pointer;
    display: block;
}

/* Controls Panel */
.controls-panel {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-panel h1 {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

/* Player Section */
.player-section {
    text-align: center;
}

.player-section label {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
    color: #cccccc;
}

.player-indicator {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dice Section */
.dice-section {
    text-align: center;
}

.dice-section label {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
    color: #cccccc;
}

.dice-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.die {
    width: 50px;
    height: 50px;
    background: white;
    color: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.die.used {
    opacity: 0.3;
}

.dice-remaining {
    font-size: 11px;
    color: #aaaaaa;
}

/* Buttons */
.button-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: #2196F3;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-info {
    background: #FF9800;
    color: white;
}

.btn-info:hover {
    background: #e68900;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* Status Message */
.status-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info Section */
.info-section {
    display: flex;
    gap: 8px;
}

.info-section .btn {
    flex: 1;
    padding: 10px;
    font-size: 11px;
}

/* Player Selection */
.player-selection {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.player-selection h3 {
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
}

.selection-group {
    margin-bottom: 12px;
}

.selection-group label {
    display: block;
    font-size: 11px;
    margin-bottom: 5px;
    color: #cccccc;
}

.selection-group select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 12px;
}

.selection-buttons {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.selection-buttons .btn {
    flex: 1;
    padding: 10px;
    font-size: 11px;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a2e;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 700px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #FFD700;
}

.rules-content {
    font-size: 13px;
    line-height: 1.6;
    color: #cccccc;
}

.setup-modal {
    max-width: 500px;
}

.setup-modal .selection-group {
    margin-bottom: 20px;
}

.setup-modal label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #FFD700;
    font-weight: bold;
}

.setup-modal select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #2a2a3e;
    color: #fff;
    font-size: 13px;
}

.setup-modal select:hover {
    border-color: #666;
}

.setup-modal #opponentsList {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 4px;
}

.setup-modal #opponentsList label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #cccccc;
    font-weight: normal;
    cursor: pointer;
}

.setup-modal #opponentsList label:last-child {
    margin-bottom: 0;
}

.setup-modal #opponentsList input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.setup-modal .selection-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.setup-modal .selection-buttons .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

.pass-device-modal {
    max-width: 400px;
    text-align: center;
}

.pass-device-modal h2 {
    margin-bottom: 20px;
}

.pass-device-modal #passDeviceMessage {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #FFD700;
}

.pass-device-modal #passDeviceButtons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pass-device-modal .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-width: 120px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }

    .controls-panel {
        width: 100%;
        max-width: 500px;
    }

    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
}

