* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: #050510;
    color: #fff;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 1000px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #050510 100%);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

@media (min-width: 601px) {
    #game-container {
        height: 90vh;
        border-radius: 20px;
        border: 2px solid #2a2a4e;
    }
}

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;
}

#hud {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

#hud.visible {
    opacity: 1;
}

.hud-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #ff4d00;
    box-shadow: 0 0 10px rgba(255, 77, 0, 0.3);
    color: #ffaa00;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    pointer-events: auto;
    z-index: 20;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.fire-text {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(to bottom, #fff200, #ff4d00, #aa0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 0px 15px rgba(255, 77, 0, 0.8));
    line-height: 1;
    letter-spacing: 2px;
}

.sub-text {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 5px;
    text-shadow: 0 0 10px #00aaff;
}

.premium-btn {
    background: linear-gradient(135deg, #ff4d00, #aa0000);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(170, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    transition: transform 0.1s, box-shadow 0.1s;
    pointer-events: auto;
}

.premium-btn:active {
    transform: scale(0.95);
    box-shadow: 0 5px 10px rgba(170, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.4);
}

.instructions {
    margin-top: 30px;
    text-align: center;
    color: #aaa;
    font-size: 1rem;
    line-height: 1.5;
}

#gameOverTitle {
    font-size: 3rem;
    color: #ff4d00;
    text-shadow: 0 0 20px rgba(255, 77, 0, 0.6);
    margin-bottom: 20px;
}

.stats {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ffaa00;
}
