﻿/* wwwroot/css/board-game.css */

body.game-page {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(17, 1fr);
    gap: 2px;
    margin: 20px 0;
    background: #ddd;
    padding: 10px;
    border-radius: 5px;
}

.board-square {
    aspect-ratio: 1;
    background: #fff;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

    .board-square:hover {
        border-color: #007bff;
    }

    .board-square.occupied {
        border-width: 3px;
    }

    .board-square.green {
        border-color: #28a745;
    }

    .board-square.yellow {
        border-color: #ffc107;
    }

    .board-square.red {
        border-color: #dc3545;
    }

    .board-square.blue {
        border-color: #007bff;
    }

    .board-square.purple {
        border-color: #6f42c1;
    }

.player-token {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.token-green {
    background: #28a745;
}

.token-yellow {
    background: #ffc107;
}

.token-red {
    background: #dc3545;
}

.token-blue {
    background: #007bff;
}

.token-purple {
    background: #6f42c1;
}

.game-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.players-panel, .game-status-panel {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.player-card {
    background: white;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .player-card.green {
        border-left-color: #28a745;
    }

    .player-card.yellow {
        border-left-color: #ffc107;
    }

    .player-card.red {
        border-left-color: #dc3545;
    }

    .player-card.blue {
        border-left-color: #007bff;
    }

    .player-card.purple {
        border-left-color: #6f42c1;
    }

.cards-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.cards-panel {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.card {
    background: white;
    border: 2px solid #007bff;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    min-width: 30px;
    text-align: center;
}

    .card:hover {
        background: #e3f2fd;
    }

    .card.selected {
        background: #007bff;
        color: white;
    }

.shop-card {
    border-color: #28a745;
}

    .shop-card.selected {
        background: #28a745;
    }

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.game-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

    .game-btn:hover {
        background: #0056b3;
    }

    .game-btn:disabled {
        background: #6c757d;
        cursor: not-allowed;
    }

    .game-btn.success {
        background: #28a745;
    }

        .game-btn.success:hover {
            background: #1e7e34;
        }

.phase-indicator {
    background: #17a2b8;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    display: inline-block;
    margin: 10px 0;
    font-weight: bold;
}

.login-form {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
}

    .login-form h1 {
        color: #333;
        margin-bottom: 30px;
    }

.form-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
}

    .form-input:focus {
        outline: none;
        border-color: #007bff;
    }

.hidden {
    display: none !important;
}

.messages {
    height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: white;
    border-radius: 5px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 14px;
}

.message-item {
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f0;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

    .game-header h1 {
        color: #333;
        margin: 0;
    }

.status-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.status-label {
    font-weight: bold;
    color: #666;
}

.status-value {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
        margin: 10px;
    }

    .game-board {
        grid-template-columns: repeat(10, 1fr);
        gap: 1px;
    }

    .board-square {
        font-size: 10px;
    }

    .game-info {
        grid-template-columns: 1fr;
    }

    .cards-section {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .game-btn {
        width: 100%;
        margin: 5px 0;
    }
}
