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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #050510;
    color: #fff;
    overflow: hidden;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

#top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.team-score {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

#blue-team .score {
    color: #00e5ff;
    font-size: 32px;
    text-shadow: 0 0 15px #00e5ff;
}

#red-team .score {
    color: #ff3b3b;
    font-size: 32px;
    text-shadow: 0 0 15px #ff3b3b;
}

#match-timer {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#ability-bar {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.ability {
    position: relative;
    width: 80px;
    height: 80px;
    background: rgba(10, 10, 30, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    transition: transform 0.1s, border-color 0.1s;
}

.ability.active {
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    transform: scale(1.05);
}

.ability-icon {
    font-size: 28px;
}

.ability-key {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.ability-name {
    position: absolute;
    bottom: -22px;
    font-size: 11px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.8);
}

.cooldown-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(0, 0, 0, 0.75);
    transition: height 0.1s linear;
}

#hero-status {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 250px;
}

.health-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.health-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00e5ff);
    transition: width 0.15s ease-out;
}

.status-text {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

#kill-feed {
    position: absolute;
    top: 80px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 280px;
}

.kill-feed-item {
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    animation: slideIn 0.3s ease-out;
    border-left: 3px solid #ff3b3b;
}

.kill-feed-item.ally {
    border-left-color: #00e5ff;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#minimap {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 150px;
    height: 150px;
    background: rgba(5, 5, 16, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

#minimap canvas {
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 100;
}

.screen.hidden {
    display: none;
}

.screen-content {
    text-align: center;
    max-width: 500px;
}

.screen-content h1 {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 8px;
    background: linear-gradient(180deg, #00e5ff, #7b2dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: none;
}

.subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    letter-spacing: 4px;
}

.controls-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.control span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    color: #fff;
    min-width: 60px;
}

.btn-primary {
    background: linear-gradient(135deg, #00e5ff, #7b2dff);
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 48px;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

#game-over-screen h1 {
    background: linear-gradient(180deg, #ffeb3b, #ff3b3b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#final-score {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
}

@media (max-width: 768px) {
    .controls-info {
        flex-direction: column;
        gap: 15px;
    }

    .screen-content h1 {
        font-size: 42px;
    }

    #ability-bar {
        bottom: 80px;
    }

    .ability {
        width: 70px;
        height: 70px;
    }
}
