body {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.game-container {
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.game-area {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1 {
    color: var(--primary-color);
    margin: 0;
}

.status {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #2c3e50;
    min-height: 1.5em;
}

/* Clue Layout */
.clue-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    text-align: left;
}

.board-section {
    flex: 0 0 auto;
}

.side-panel {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

/* Board */
.clue-board {
    display: grid;
    grid-template-columns: repeat(25, 28px);
    grid-template-rows: repeat(25, 28px);
    gap: 1px;
    background: #2c3e50;
    border: 3px solid #2c3e50;
    border-radius: 4px;
    position: relative;
}

.board-cell {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    position: relative;
    cursor: default;
}

.board-cell.hallway {
    background: #f5e6ca;
}

.board-cell.wall {
    background: #2c3e50;
}

.board-cell.room {
    cursor: pointer;
}

.board-cell.room:hover {
    filter: brightness(1.1);
}

.board-cell.room-kitchen { background: #e74c3c; color: white; }
.board-cell.room-ballroom { background: #f39c12; color: white; }
.board-cell.room-conservatory { background: #27ae60; color: white; }
.board-cell.room-billiard { background: #2980b9; color: white; }
.board-cell.room-library { background: #8e44ad; color: white; }
.board-cell.room-study { background: #d35400; color: white; }
.board-cell.room-hall { background: #16a085; color: white; }
.board-cell.room-lounge { background: #c0392b; color: white; }
.board-cell.room-dining { background: #2c3e50; color: white; }

.board-cell.room-label {
    font-size: 0.55rem;
    text-align: center;
    line-height: 1.1;
    pointer-events: none;
}

.board-cell.door {
    background: #ffeaa7;
    border: 1px dashed #e17055;
}

.board-cell.start-cell {
    background: #dfe6e9;
    border: 1px solid #b2bec3;
}

/* Player Tokens */
.player-token {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    position: absolute;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.board-cell .player-token {
    position: relative;
}

.token-scarlet { background: #e74c3c; }
.token-mustard { background: #f39c12; }
.token-white { background: #ecf0f1; color: #333; border-color: #bdc3c7; }
.token-green { background: #27ae60; }
.token-peacock { background: #2980b9; }
.token-plum { background: #8e44ad; }

.player-token.current-player {
    animation: tokenPulse 1s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

@keyframes tokenPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.board-cell.highlight {
    outline: 2px solid #f1c40f;
    outline-offset: -1px;
    animation: highlightPulse 0.8s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% { outline-color: #f1c40f; }
    50% { outline-color: #e67e22; }
}

/* Dice */
.dice-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.dice-display {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.dice-display.rolling {
    animation: diceRoll 0.5s ease-in-out;
}

@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* Player Hand */
.player-hand {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-item {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.card-item.suspect { background: #e74c3c; }
.card-item.weapon { background: #2980b9; }
.card-item.room-card { background: #27ae60; }

/* Notepad */
.notepad {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.notepad-category {
    padding: 4px 8px;
    background: #34495e;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notepad-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.notepad-item:hover {
    background: #f8f9fa;
}

.notepad-item input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary-color);
}

.notepad-item label {
    cursor: pointer;
    flex: 1;
}

.notepad-item.checked label {
    text-decoration: line-through;
    color: #999;
}

/* Panel Sections */
.panel-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.panel-section h3 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-buttons .btn {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: var(--secondary-color);
}

.modal-form .input-group {
    text-align: left;
    margin-bottom: 12px;
}

.modal-form select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn,
.modal-buttons .btn-secondary {
    flex: 1;
}

/* Disprove Cards */
.disprove-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.disprove-card-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.disprove-card-btn:hover {
    transform: scale(1.05);
    border-color: #333;
}

.disprove-card-btn.suspect { background: #e74c3c; color: white; }
.disprove-card-btn.weapon { background: #2980b9; color: white; }
.disprove-card-btn.room-card { background: #27ae60; color: white; }

/* Cover Screen */
.cover-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.cover-content {
    text-align: center;
    color: white;
}

.cover-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cover-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.cover-content .btn {
    font-size: 1.2rem;
    padding: 15px 40px;
}

/* Game Buttons */
.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

#exit-game-btn {
    padding: 10px 20px;
    font-size: 1rem;
}

/* Online Game Info */
.online-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.opponent-name {
    font-weight: 600;
    color: var(--text-muted);
}

/* Eliminated overlay */
.eliminated-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    color: white;
    font-size: 1.5rem;
    text-align: center;
}

/* Players info bar */
.players-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.player-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f0f2f5;
    border: 2px solid transparent;
}

.player-badge.active {
    border-color: var(--primary-color);
    background: #ebf5fb;
}

.player-badge.eliminated {
    opacity: 0.4;
    text-decoration: line-through;
}

.player-badge .badge-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 900px) {
    .clue-layout {
        flex-direction: column;
        align-items: center;
    }

    .side-panel {
        max-width: 100%;
        width: 100%;
    }

    .clue-board {
        grid-template-columns: repeat(25, 22px);
        grid-template-rows: repeat(25, 22px);
    }

    .board-cell {
        width: 22px;
        height: 22px;
        font-size: 0.5rem;
    }

    .player-token {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 600px) {
    .clue-board {
        grid-template-columns: repeat(25, 16px);
        grid-template-rows: repeat(25, 16px);
    }

    .board-cell {
        width: 16px;
        height: 16px;
        font-size: 0.4rem;
    }

    .player-token {
        width: 10px;
        height: 10px;
        font-size: 0.3rem;
    }

    .game-area {
        padding: 10px;
    }
}
