/* =========================================
   NURSING HOME MAYHEM - Styles
   ========================================= */

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

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

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 10;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Game container */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#game-container canvas {
    display: block;
}

/* ---- MAIN MENU ---- */
#main-menu {
    flex-direction: column;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a0a00 50%, #0a0a0a 100%);
    z-index: 100;
}

.menu-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139,0,0,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(255,100,0,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(100,0,0,0.2) 0%, transparent 50%);
    animation: menuPulse 8s ease-in-out infinite;
}

@keyframes menuPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.menu-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.game-title {
    font-size: 72px;
    font-weight: 900;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        0 0 20px rgba(255,50,0,0.8),
        0 0 40px rgba(255,50,0,0.4),
        0 0 80px rgba(255,50,0,0.2),
        4px 4px 0 #000;
    line-height: 1;
    margin-bottom: 10px;
}

.title-mayhem {
    font-size: 96px;
    color: #ff3300;
    display: block;
    text-shadow:
        0 0 30px rgba(255,50,0,1),
        0 0 60px rgba(255,50,0,0.6),
        0 0 120px rgba(255,50,0,0.3),
        4px 4px 0 #000;
    animation: mayhemGlow 2s ease-in-out infinite;
}

@keyframes mayhemGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.game-subtitle {
    font-size: 22px;
    color: #ccc;
    font-weight: 300;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.steven-name {
    color: #ff6600;
    font-weight: 700;
}

.tagline {
    font-size: 16px;
    color: #888;
    font-style: italic;
    margin-bottom: 40px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.menu-btn {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #444;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 14px 60px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    min-width: 300px;
}

.menu-btn:hover {
    background: linear-gradient(180deg, #ff4400 0%, #cc2200 100%);
    border-color: #ff6600;
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    box-shadow: 0 0 20px rgba(255,68,0,0.4);
}

.menu-btn:active {
    transform: scale(0.98);
}

.menu-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #555;
    font-size: 14px;
    letter-spacing: 2px;
    z-index: 2;
}

/* ---- OVERLAY PANELS (How to Play, Credits, Pause, etc.) ---- */
.overlay-panel {
    background: rgba(10, 10, 10, 0.96);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 40px;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.overlay-panel h2 {
    font-size: 42px;
    color: #ff3300;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255,50,0,0.5);
    letter-spacing: 4px;
}

.overlay-panel p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 10px;
}

.instructions {
    text-align: left;
    margin-bottom: 20px;
}

.instructions h3 {
    color: #ff6600;
    font-size: 20px;
    margin: 20px 0 10px;
    letter-spacing: 2px;
}

.controls-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.controls-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #222;
    color: #ccc;
}

.controls-table td:first-child {
    color: #ff9900;
    font-weight: 700;
    width: 200px;
    font-family: monospace;
    font-size: 14px;
}

.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    padding: 6px 0;
    color: #ccc;
    border-bottom: 1px solid #1a1a1a;
}

.action-icon {
    font-size: 20px;
    margin-right: 8px;
}

/* Credits */
.credits-panel {
    max-width: 600px;
}

.credits-scroll {
    margin: 20px 0;
}

.credits-studio {
    font-size: 24px;
}

.studio-name {
    color: #00ff88;
    font-weight: 700;
    font-size: 28px;
}

.disclaimer {
    color: #666;
    font-size: 12px;
    font-style: italic;
    margin-top: 20px;
}

.copyright {
    color: #444;
    font-size: 11px;
    margin-top: 10px;
}

/* Exit */
.exit-note {
    color: #666;
    font-size: 14px;
}

/* ---- GAME HUD ---- */
#game-hud {
    pointer-events: none;
    z-index: 20;
}

#game-hud.active {
    display: block;
}

#hud-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 25px;
}

#hud-score {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hud-label {
    font-size: 12px;
    color: #888;
    letter-spacing: 3px;
    font-weight: 700;
}

#score-value {
    font-size: 48px;
    font-weight: 900;
    color: #ff3300;
    text-shadow: 0 0 15px rgba(255,50,0,0.6);
    line-height: 1;
}

#hud-combo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#combo-text {
    font-size: 32px;
    font-weight: 900;
    color: #ffcc00;
    text-shadow: 0 0 20px rgba(255,200,0,0.8);
    opacity: 0;
    transition: opacity 0.3s;
}

#combo-text.visible {
    opacity: 1;
    animation: comboPop 0.3s ease-out;
}

@keyframes comboPop {
    0% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

#hud-wanted {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#wanted-stars {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 28px;
    color: #333;
    transition: all 0.3s;
}

.star.active {
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255,0,0,0.8);
    animation: starPulse 1s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

#hud-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 15px 25px;
}

#hud-action {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.6);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #333;
}

#current-action-icon {
    font-size: 28px;
}

#current-action-name {
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

#hud-actions-bar {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.6);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #333;
}

.action-slot {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid #333;
    border-radius: 4px;
    background: rgba(30,30,30,0.8);
    position: relative;
    transition: all 0.2s;
}

.action-slot span {
    position: absolute;
    top: 1px;
    left: 3px;
    font-size: 9px;
    color: #666;
    font-weight: 700;
}

.action-slot.selected {
    border-color: #ff3300;
    background: rgba(255,50,0,0.2);
    box-shadow: 0 0 10px rgba(255,50,0,0.4);
}

#hud-stamina {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

#stamina-bar {
    width: 150px;
    height: 12px;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    overflow: hidden;
}

#stamina-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00cc44, #00ff55);
    transition: width 0.2s;
    border-radius: 6px;
}

/* Crosshair */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(255,255,255,0.6);
    z-index: 25;
    display: none;
    pointer-events: none;
    text-shadow: 0 0 2px #000, 0 0 4px #000;
    font-weight: 300;
}

#crosshair.visible {
    display: block;
}

/* Interaction prompt */
#interaction-prompt {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid #555;
    z-index: 25;
    pointer-events: none;
}

#interaction-prompt.hidden {
    display: none;
}

#interact-text {
    color: #ffcc00;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Notifications */
#notification-area {
    position: fixed;
    top: 80px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 30;
    pointer-events: none;
}

.notification {
    background: rgba(0,0,0,0.8);
    border-left: 4px solid #ff3300;
    padding: 10px 16px;
    border-radius: 4px;
    animation: notifSlide 0.3s ease-out;
    max-width: 300px;
}

.notification.positive {
    border-left-color: #00ff88;
}

.notification .notif-title {
    font-size: 14px;
    font-weight: 700;
    color: #ff6600;
}

.notification .notif-text {
    font-size: 12px;
    color: #aaa;
}

.notification .notif-points {
    font-size: 18px;
    font-weight: 900;
    color: #ffcc00;
}

@keyframes notifSlide {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Scoreboard */
.scoreboard-panel {
    min-width: 400px;
}

#scoreboard-stats {
    text-align: left;
}

#scoreboard-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #222;
    color: #ccc;
}

#scoreboard-stats .stat-row .stat-val {
    color: #ff6600;
    font-weight: 700;
}

/* Final stats */
.final-stats {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255,50,0,0.1);
    border: 1px solid #333;
    border-radius: 8px;
}

.final-stats p {
    font-size: 18px;
    margin: 8px 0;
}

.final-stats span {
    color: #ff6600;
    font-weight: 900;
    font-size: 24px;
}

/* Pause specific */
#pause-menu {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 50;
}

/* Scrollbar */
.overlay-panel::-webkit-scrollbar {
    width: 6px;
}

.overlay-panel::-webkit-scrollbar-track {
    background: #111;
}

.overlay-panel::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Loading screen */
#loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

#loading-text {
    font-size: 24px;
    color: #ff3300;
    letter-spacing: 4px;
    animation: loadPulse 1.5s ease-in-out infinite;
}

@keyframes loadPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .game-title { font-size: 40px; }
    .title-mayhem { font-size: 56px; }
    .menu-btn { min-width: 240px; font-size: 16px; padding: 12px 30px; }
    #score-value { font-size: 32px; }
    .action-slot { width: 32px; height: 32px; font-size: 16px; }
}
