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

body {
    font-family: 'Courier New', monospace;
    background-color: #121212;
    color: #ffffff;
    line-height: 1.6;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid #333;
}

header h1 {
    font-size: 2.5rem;
    letter-spacing: 0.3rem;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.game-controls {
    display: flex;
    gap: 1rem;
}

button, .back-button {
    padding: 0.6rem 1.2rem;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover, .back-button:hover {
    background-color: #444;
    transform: translateY(-2px);
}

#start-game {
    background-color: #00ffcc;
    color: #121212;
}

#start-game:hover {
    background-color: #00e6b8;
}

.back-button {
    text-decoration: none;
    display: inline-block;
}

/* Game Board Styles */
.game-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.player-info {
    width: 150px;
    padding: 1rem;
    background-color: #1e1e1e;
    border-radius: 8px;
    text-align: center;
}

.player-one {
    border-left: 4px solid #3498db;
}

.player-two {
    border-right: 4px solid #e74c3c;
}

.player-info h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.score {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.player-one .score {
    color: #3498db;
}

.player-two .score {
    color: #e74c3c;
}

.status {
    font-size: 0.9rem;
    color: #aaa;
}

/* Game Grid Styles */
.game-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 10px;
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 600px;
    margin: 0 auto;
}

.grid-cell {
    background-color: #333;
    border-radius: 4px;
    position: relative;
    transition: transform 0.3s, background-color 0.3s;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
}

.grid-cell canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.grid-cell:hover {
    transform: scale(1.05);
}

.grid-cell.player-one-cell {
    background-color: rgba(52, 152, 219, 0.3);
    border: 2px solid #3498db;
}

.grid-cell.player-two-cell {
    background-color: rgba(231, 76, 60, 0.3);
    border: 2px solid #e74c3c;
}

.grid-cell.special-cell {
    background-color: rgba(241, 196, 15, 0.3);
    border: 2px solid #f1c40f;
}

.grid-cell.active {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Overlay Styles */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.countdown {
    font-size: 6rem;
    font-weight: bold;
    color: #00ffcc;
}

.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.game-over-overlay h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00ffcc;
}

#winner-display {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

#play-again {
    background-color: #00ffcc;
    color: #121212;
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.hidden {
    display: none;
}

/* Game Instructions */
.game-instructions {
    background-color: #1e1e1e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.game-instructions h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #00ffcc;
}

.game-instructions p {
    margin-bottom: 0.5rem;
}

/* QR Scanner Area */
.qr-scanner-area {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.scanner-container {
    text-align: center;
}

.scanner-container h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #aaa;
}

.join-qr {
    width: 200px;
    height: 200px;
    background-color: #fff;
    margin: 0 auto;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.join-qr img {
    max-width: 100%;
    max-height: 100%;
}

/* Server Status Styles */
.server-status {
    background-color: #1e1e1e;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
}

.status-indicator.online {
    background-color: #2ecc71;
    box-shadow: 0 0 5px #2ecc71;
}

.status-indicator.offline {
    background-color: #e74c3c;
    box-shadow: 0 0 5px #e74c3c;
}

.status-indicator.connecting {
    background-color: #f1c40f;
    box-shadow: 0 0 5px #f1c40f;
    animation: pulse 1s infinite;
}

#game-id {
    font-family: monospace;
    color: #aaa;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-board {
        flex-direction: column;
    }
    
    .player-info {
        width: 100%;
    }
    
    .player-one {
        border-left: none;
        border-top: 4px solid #3498db;
    }
    
    .player-two {
        border-right: none;
        border-bottom: 4px solid #e74c3c;
    }
    
    .game-grid {
        aspect-ratio: 1 / 1;
        width: 100%;
    }
} 