:root {
    --bg-color: #121212;
    --ui-text: #ffffff;
    --health-p1: #4cd964;
    --health-p2: #ff3b30;
    --hud-bg: rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--ui-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.game-container {
    position: relative;
    display: inline-block;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    border: 4px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

canvas {
    display: block;
}

.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.player-hud, .enemy-hud {
    width: 40%;
    display: flex;
    flex-direction: column;
}

.enemy-hud {
    align-items: flex-end;
}

.player-name {
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px #000;
}

.health-bar-container {
    position: relative;
    width: 100%;
    height: 30px;
    background: #333;
    border: 2px solid #fff;
}

.enemy-hud .health-bar-container {
    display: flex;
    justify-content: flex-end;
}

.health-bar-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: yellow;
    z-index: 1;
}

.health-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--health-p1);
    width: 100%;
    z-index: 2;
    transition: width 0.1s linear;
}

.enemy-hud .health-bar {
    right: 0;
    left: auto;
    background: var(--health-p2);
}

.timer {
    background: var(--hud-bg);
    color: #fff;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    border: 3px solid #fff;
    border-radius: 5px;
}

.display-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 4px 4px 0 #000;
    text-transform: uppercase;
    z-index: 20;
    text-align: center;
}

.back-btn {
    position: absolute;
    top: -45px;
    left: 0;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.controls-info {
    margin-top: 15px;
    font-size: 1rem;
    color: #888;
}
