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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0202 0%, #1a0505 50%, #0a0202 100%);
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #050102 0%, #0d0205 50%, #050102 100%);
}

/* Can çubuğu - haritanın en üstünde */
.top-health-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 0, 0, 0.95);
    border-bottom: 2px solid rgba(139, 0, 0, 0.5);
    z-index: 11;
}

.health-label {
    font-size: 14px;
    font-weight: bold;
    min-width: 50px;
}

.health-bar-full {
    flex: 1;
    height: 20px;
    background: rgba(50, 0, 0, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(139, 0, 0, 0.8);
}

.health-bar-full .health-fill {
    height: 100%;
}

.top-health-bar .health-value {
    font-size: 16px;
    font-weight: bold;
    min-width: 40px;
}

/* HUD */
.hud {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 10;
}

.player-stats, .enemy-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.health-container, .mana-container, .enemy-health {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label {
    font-size: 12px;
    min-width: 50px;
}

.health-bar, .mana-bar {
    flex: 1;
    height: 12px;
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    overflow: hidden;
}

.health-bar.enemy {
    border: 1px solid #ff4444;
}

.health-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #8b0000, #5c0000);
    transition: width 0.3s ease;
    box-shadow: inset 0 0 10px rgba(139, 0, 0, 0.5);
}

.mana-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.health-value, .mana-value {
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
}

.game-info {
    text-align: center;
    padding: 5px 15px;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
}

.wave, .score, .kills {
    font-size: 14px;
}

/* Controls */
.controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn.attack {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn.heavy {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.btn.dodge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.btn:active {
    transform: scale(0.98);
}

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

/* Start Screen */
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0202 0%, #0d0101 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: auto;
}

.start-content {
    text-align: center;
    padding: 40px;
    max-width: 450px;
}

.start-content h1 {
    font-size: 42px;
    color: #8b0000;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 20px rgba(139, 0, 0, 0.5);
}

.subtitle {
    font-size: 20px;
    color: #8b0000;
    margin-bottom: 10px;
}

.extreme-warning {
    background: rgba(80, 0, 0, 0.8);
    border: 3px solid #8b0000;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
}

.extreme-warning p {
    color: #ff4444;
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0;
}

.extreme-warning p:first-child {
    font-size: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.description {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 30px;
}

.start-btn {
    padding: 18px 50px;
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(135deg, #8b0000, #5c0000);
    color: white;
    border: 2px solid #4a0000;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.6);
}

.controls-info {
    margin-top: 25px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.controls-info kbd {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Game Over */
.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.game-over-screen.show {
    display: flex;
}

.game-over-content {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, #1a0202, #0d0101);
    border-radius: 20px;
    border: 3px solid #8b0000;
    box-shadow: 0 0 40px rgba(139, 0, 0, 0.5), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    font-size: 36px;
    color: #8b0000;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
}

.final-stats {
    font-size: 18px;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
}

.restart-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #8b0000, #5c0000);
    color: white;
    border: 2px solid #4a0000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.restart-btn:hover {
    background: linear-gradient(135deg, #a00, #700);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
}

/* Victory */
.victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.victory-screen.show {
    display: flex;
}

.victory-content {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, #1a1a02, #0d0d01);
    border-radius: 20px;
    border: 3px solid #b8860b;
    box-shadow: 0 0 40px rgba(184, 134, 11, 0.5), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.victory-content h2 {
    font-size: 42px;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.victory-message {
    font-size: 20px;
    color: rgba(255,255,255,0.95);
    margin-bottom: 15px;
}

.victory-content .restart-btn {
    background: linear-gradient(135deg, #b8860b, #8b6914);
    border-color: #6b5010;
}

.victory-content .restart-btn:hover {
    background: linear-gradient(135deg, #daa520, #b8860b);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}
