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

body {
    background: #0a0a0f;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

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

#player-stats, #enemy-stats {
    min-width: 200px;
}

#player-stats {
    text-align: left;
}

#enemy-stats {
    text-align: right;
}

.name {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 5px;
}

.health-bar {
    width: 200px;
    height: 20px;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #333;
}

.health-fill {
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
}

#player-health {
    background: linear-gradient(90deg, #00b894, #00cec9);
}

#enemy-health {
    background: linear-gradient(90deg, #e17055, #d63031);
}

#player-hp, #enemy-hp {
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

#timer {
    font-size: 24px;
    font-weight: bold;
    color: #ffeaa7;
    text-shadow: 0 0 10px #ffeaa7;
}

#game-canvas {
    flex: 1;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

#bullet-time-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
    animation: pulse 1s ease-in-out infinite;
}

#bullet-time-overlay.hidden {
    display: none;
}

.bt-text {
    font-size: 48px;
    font-weight: bold;
    color: #74b9ff;
    text-shadow: 0 0 20px #74b9ff;
    animation: glow 0.5s ease-in-out infinite alternate;
}

.bt-hint {
    font-size: 18px;
    color: #aaa;
    margin-top: 10px;
}

@keyframes pulse {
    0%, 100% { background: rgba(0, 100, 255, 0.05); }
    50% { background: rgba(0, 100, 255, 0.15); }
}

@keyframes glow {
    from { text-shadow: 0 0 20px #74b9ff; }
    to { text-shadow: 0 0 40px #74b9ff, 0 0 60px #0984e3; }
}

#action-panel {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.action-btn {
    width: 100px;
    height: 100px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn .icon {
    font-size: 32px;
}

.action-btn .label {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.action-btn .key {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

.action-btn.attack {
    background: linear-gradient(135deg, #e17055, #d63031);
}

.action-btn.block {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.action-btn.dodge {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

#predict-panel {
    position: absolute;
    bottom: 220px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

#predict-panel.hidden {
    display: none;
}

.predict-text {
    font-size: 14px;
    color: #ffeaa7;
    text-shadow: 0 0 10px #ffeaa7;
}

.predict-buttons {
    display: flex;
    gap: 10px;
}

.predict-btn {
    padding: 10px 20px;
    border: 2px solid #ffeaa7;
    background: rgba(255, 234, 167, 0.1);
    color: #ffeaa7;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.predict-btn:hover {
    background: rgba(255, 234, 167, 0.3);
}

#controls-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    font-size: 12px;
    color: #555;
}

#battle-log {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.log-entry {
    padding: 8px 16px;
    background: rgba(0,0,0,0.7);
    border-radius: 5px;
    font-size: 14px;
    animation: fadeInOut 2s ease forwards;
}

.log-entry.hit {
    color: #e17055;
    border-left: 3px solid #e17055;
}

.log-entry.counter {
    color: #ffeaa7;
    border-left: 3px solid #ffeaa7;
    font-weight: bold;
}

.log-entry.miss {
    color: #636e72;
    border-left: 3px solid #636e72;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

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

#game-over.hidden {
    display: none;
}

#game-over-text {
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 0 20px currentColor;
}

#game-over-text.victory {
    color: #00b894;
}

#game-over-text.defeat {
    color: #d63031;
}

#restart-btn {
    padding: 15px 40px;
    font-size: 18px;
    border: 2px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

#restart-btn:hover {
    background: white;
    color: black;
}
