@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap');

body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #b4b4b4;
    font-family: 'Ubuntu', sans-serif;
    user-select: none;
}

#game {
    display: block;
    cursor: crosshair;
}

#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

/* Score Board */
#score-board {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    text-align: center;
}

.ui-text {
    display: inline-block;
    margin: 0 15px;
    font-size: 24px;
    color: white;
    font-weight: 900;
    text-shadow: 2px 2px 0 #333, -1px -1px 0 #333;
}

#bar-container {
    width: 100%;
    height: 24px;
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    margin-top: 8px;
    border: 2px solid #555;
    overflow: hidden;
    position: relative;
}

#xp-bar {
    height: 100%;
    width: 0%;
    background-color: #e8e656;
    transition: width 0.1s linear;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.2);
}

/* Upgrades */
#upgrade-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    pointer-events: auto;
}

#stat-points-msg {
    color: #e8e656;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 1px 1px 0 #000;
    display: none;
    animation: blink 1s infinite;
}

@keyframes blink { 50% { opacity: 0.5; } }

#upgrade-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.4);
    padding: 4px;
    border-radius: 20px;
    width: 240px;
    height: 18px;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.stat-row:hover {
    transform: scale(1.02);
    background: rgba(0,0,0,0.6);
}

.stat-name {
    position: absolute;
    left: 12px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    z-index: 5;
    pointer-events: none;
}

.stat-bar {
    height: 100%;
    border-radius: 15px;
    width: 0%; 
    transition: width 0.2s;
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.2);
}

/* Colors for stats */
.s-1 { background: #e59797; }
.s-2 { background: #e597e5; }
.s-3 { background: #9797e5; }
.s-4 { background: #97e5e5; }
.s-5 { background: #e5e597; }
.s-6 { background: #e59797; }
.s-7 { background: #97e597; }
.s-8 { background: #97e5e5; }

/* Death Screen */
#death-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    pointer-events: auto;
    z-index: 100;
    backdrop-filter: blur(2px);
}

#death-screen h1 { font-size: 60px; margin-bottom: 10px; text-shadow: 3px 3px 0 #000; }
#death-screen p { font-size: 24px; margin: 5px; font-weight: bold; }

button {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 24px;
    background: #00b2e1;
    border: 4px solid #008eb3;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Ubuntu', sans-serif;
    font-weight: bold;
    transition: 0.1s;
}
button:hover { background: #4fd0f2; transform: translateY(-2px); }
button:active { transform: translateY(0); }