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

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Courier New', monospace;
    overflow-x: hidden;
    min-height: 100vh;
}

#game-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border: 4px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: #2a2a3a;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: none;
}

#health-bars {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.health-container {
    flex: 1;
    max-width: 250px;
}

.health-container.right {
    text-align: right;
}

.player-name {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.health-bar {
    height: 20px;
    background: #333;
    border: 2px solid #666;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444 0%, #ffaa44 50%, #44ff44 100%);
    width: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

#game-info {
    text-align: center;
    color: white;
    flex: 0 0 auto;
    margin: 0 20px;
}

#timer {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    margin-bottom: 5px;
}

#round-text {
    font-size: 16px;
    color: #FFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Menu Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    display: none;
    z-index: 20;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title {
    text-align: center;
    margin-bottom: 40px;
}

.title h1 {
    font-size: 48px;
    color: #FFD700;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.8);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 4px 4px 8px rgba(0,0,0,0.8), 0 0 20px #FFD700; }
    to { text-shadow: 4px 4px 8px rgba(0,0,0,0.8), 0 0 30px #FFD700; }
}

.subtitle {
    font-size: 18px;
    color: #CBD5E0;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.character-card {
    background: linear-gradient(145deg, #2d3748, #1a202c);
    border: 3px solid #4A5568;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 180px;
}

.character-card:hover {
    transform: translateY(-5px);
    border-color: #FFD700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.character-card.selected-p1 {
    border-color: #FF6B6B;
    background: linear-gradient(145deg, #4A1B1B, #2d1010);
}

.character-card.selected-p2 {
    border-color: #4ECDC4;
    background: linear-gradient(145deg, #1B4A47, #10292d);
}

.character-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border-radius: 8px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #4a5568, #2d3748);
    border: 2px solid #666;
}

.grappler-icon {
    background: linear-gradient(135deg, #FF6B35, #E53E3E);
}

.weapon-master-icon {
    background: linear-gradient(135deg, #8B5CF6, #6B46C1);
}

.fundamentalist-icon {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.wild-card-icon {
    background: linear-gradient(135deg, #10B981, #059669);
    animation: chaos-spin 3s linear infinite;
}

@keyframes chaos-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
    100% { transform: rotate(360deg); }
}

.character-card h3 {
    color: #FFD700;
    font-size: 14px;
    margin-bottom: 8px;
}

.character-card p {
    color: #CBD5E0;
    font-size: 12px;
}

.menu-buttons {
    display: flex;
    gap: 20px;
}

.arcade-button {
    background: linear-gradient(145deg, #FF6B6B, #E53E3E);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.arcade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.arcade-button:active {
    transform: translateY(0);
}

.arcade-button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* Controls Screen */
.controls-content {
    text-align: center;
    color: white;
}

.controls-content h2 {
    color: #FFD700;
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.control-section h3 {
    color: #4ECDC4;
    font-size: 24px;
    margin-bottom: 20px;
}

.control-item {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #FFD700;
}

/* Victory Screen */
.victory-content {
    text-align: center;
    color: white;
}

.victory-content h2 {
    font-size: 48px;
    color: #FFD700;
    margin-bottom: 30px;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.8);
    animation: victory-pulse 1s ease-in-out infinite alternate;
}

@keyframes victory-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

#victory-quote {
    font-size: 20px;
    color: #CBD5E0;
    margin-bottom: 40px;
    font-style: italic;
}

.victory-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Sound Toggle */
.sound-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sound-button:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title h1 {
        font-size: 32px;
    }
    
    .character-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .character-card {
        width: 200px;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .victory-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    #health-bars {
        padding: 10px;
    }
    
    .health-container {
        max-width: 150px;
    }
    
    #timer {
        font-size: 24px;
    }
}

/* Footer styling */
footer a {
    color: #FFD700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}