* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: #0a0a15;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
}

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

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 10;
}

#header {
    text-align: center;
    padding: 10px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

#title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(16px, 4vw, 28px);
    font-weight: 900;
    color: #00ffaa;
    text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    96% { transform: translate(-1px, 2px); }
    98% { transform: translate(1px, -2px); }
}

#subtitle {
    font-size: clamp(10px, 2vw, 12px);
    color: #666;
    margin-top: 5px;
}

#stats-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ff88;
    border-radius: 8px;
    padding: 8px 15px;
    text-align: center;
    min-width: 100px;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(12px, 3vw, 18px);
    font-weight: 700;
    color: #00ff88;
}

#meters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.meter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meter-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.meter-bar {
    width: 120px;
    height: 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 8px;
}

.meter-fill.stress {
    background: linear-gradient(90deg, #00ff88, #ffaa00, #ff2222);
}

.temptation-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #00ffaa;
}

.overlay-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(5, 5, 15, 0.95);
    border: 2px solid #00ff88;
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    z-index: 100;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.3);
}

.overlay-screen.hidden {
    display: none;
}

.overlay-screen h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(18px, 5vw, 28px);
    color: #00ff88;
    margin-bottom: 15px;
    text-shadow: 0 0 20px #00ff88;
}

.tagline {
    color: #666;
    font-style: italic;
    margin-bottom: 25px;
}

#mode-select {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.mode-btn {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 2px solid #00ff88;
    border-radius: 12px;
    padding: 15px 25px;
    color: #00ff88;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.mode-btn:hover {
    background: linear-gradient(180deg, #00ff88 0%, #00aa55 100%);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.mode-btn small {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.7;
}

#high-score-display {
    color: #888;
    font-size: 14px;
}

#high-score-display span {
    color: #ffaa00;
    font-family: 'Orbitron', sans-serif;
}

#game-over-title {
    color: #ff4444 !important;
    text-shadow: 0 0 20px #ff4444 !important;
}

#final-stats {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

#final-stats p {
    color: #aaa;
    margin: 8px 0;
}

#final-stats span {
    color: #00ff88;
    font-family: 'Orbitron', sans-serif;
}

.roast {
    color: #ffaa00;
    font-style: italic;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 10px;
    border-left: 3px solid #ffaa00;
}

#restart-btn, #share-btn {
    background: linear-gradient(180deg, #00ff88 0%, #00aa55 100%);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s;
}

#share-btn {
    background: linear-gradient(180deg, #4488ff 0%, #2255aa 100%);
    color: #fff;
}

#restart-btn:hover, #share-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

#controls {
    position: absolute;
    bottom: 60px;
    right: 20px;
    z-index: 50;
}

#sound-toggle {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

#sound-toggle:hover {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.2);
}

#footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    font-size: 11px;
    color: #555;
    z-index: 20;
}

#footer a {
    color: #00ff88;
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}

.disclaimer {
    opacity: 0.7;
}

@media (max-width: 600px) {
    .stat-box {
        min-width: 80px;
        padding: 6px 10px;
    }
    
    .overlay-screen {
        padding: 20px;
    }
    
    .mode-btn {
        padding: 12px 20px;
        min-width: 100px;
    }
    
    #footer {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        text-align: center;
    }
}