* {
    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: default;
}

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
}

.loader-title {
    font-size: 72px;
    font-weight: 900;
    letter-spacing: 20px;
    color: #ff4400;
    text-shadow: 0 0 40px rgba(255, 68, 0, 0.6), 0 0 80px rgba(255, 68, 0, 0.3);
    margin-bottom: 10px;
}

.loader-subtitle {
    font-size: 18px;
    color: #888;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.loader-bar-container {
    width: 400px;
    height: 4px;
    background: #222;
    border-radius: 2px;
    margin: 0 auto 20px;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff4400, #ff8800);
    border-radius: 2px;
    transition: width 0.3s;
}

.loader-text {
    color: #666;
    font-size: 14px;
}

/* MAIN MENU */
#main-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100;
}

.menu-bg-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.menu-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
}

.menu-title {
    font-size: 120px;
    font-weight: 900;
    letter-spacing: 30px;
    color: #ff4400;
    text-shadow: 0 0 60px rgba(255, 68, 0, 0.8), 0 0 120px rgba(255, 68, 0, 0.4), 0 4px 8px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

.menu-tagline {
    font-size: 20px;
    color: #ccc;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 60px;
    font-style: italic;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-btn {
    padding: 16px 60px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: transparent;
    color: #ddd;
    border: 2px solid #444;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    min-width: 300px;
}

.menu-btn:hover {
    background: rgba(255, 68, 0, 0.2);
    border-color: #ff4400;
    color: #ff4400;
    text-shadow: 0 0 10px rgba(255, 68, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 68, 0, 0.2);
}

.controls-panel, .credits-panel {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    padding: 40px 60px;
    text-align: center;
    z-index: 10;
}

.controls-panel h2, .credits-panel h2 {
    color: #ff4400;
    margin-bottom: 20px;
    letter-spacing: 6px;
}

.controls-panel p, .credits-panel p {
    margin: 8px 0;
    color: #aaa;
    font-size: 15px;
}

.controls-panel .menu-btn, .credits-panel .menu-btn {
    margin-top: 20px;
}

/* GAME CONTAINER */
#game-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* HUD */
#hud {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
}

#hud-top {
    position: absolute;
    top: 20px; left: 20px; right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#hud-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: auto;
}

#suspicion-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-label {
    font-size: 12px;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
}

.suspicion-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.suspicion-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #44ff00, #ffaa00, #ff4400, #ff0000);
    border-radius: 3px;
    transition: width 0.5s;
}

.suspicion-pct {
    font-size: 14px;
    font-weight: 700;
    color: #44ff00;
    min-width: 40px;
}

#scene-indicator {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border: 1px solid #333;
}

#scene-name {
    font-size: 13px;
    letter-spacing: 4px;
    color: #ff4400;
}

.hud-menu-btn {
    min-width: 220px;
    padding: 10px 22px;
    font-size: 14px;
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.55);
}

#hud-bottom {
    position: absolute;
    bottom: 20px; left: 20px; right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

#tool-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border: 1px solid #333;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: #ff4400;
    border-radius: 4px;
}

#tool-name {
    font-size: 14px;
    letter-spacing: 3px;
    font-weight: 700;
}

.gas-bar {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.gas-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff4400, #ffaa00);
    border-radius: 3px;
    transition: width 0.3s;
}

#crosshair {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    font-weight: 100;
}

#interact-prompt {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 24px;
    border: 1px solid #ff4400;
    border-radius: 4px;
    pointer-events: none;
}

#interact-text {
    font-size: 14px;
    letter-spacing: 2px;
    color: #ff4400;
}

/* DIALOG */
#dialog-box {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 100%);
    border-top: 2px solid #ff4400;
    padding: 24px 40px;
    display: flex;
    gap: 24px;
    z-index: 20;
    pointer-events: auto;
}

.dialog-portrait {
    width: 100px;
    height: 100px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.dialog-content {
    flex: 1;
}

.dialog-name {
    color: #ff4400;
    font-size: 16px;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.dialog-text {
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.dialog-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.dialog-choice-btn {
    padding: 10px 20px;
    background: rgba(255, 68, 0, 0.1);
    border: 1px solid #444;
    color: #ddd;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-family: inherit;
    pointer-events: auto;
}

.dialog-choice-btn:hover {
    background: rgba(255, 68, 0, 0.3);
    border-color: #ff4400;
    color: #fff;
}

.dialog-continue {
    padding: 8px 24px;
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 2px;
    transition: all 0.2s;
    pointer-events: auto;
}

.dialog-continue:hover {
    border-color: #ff4400;
    color: #ff4400;
}

/* NEWSPAPER */
#newspaper-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.newspaper {
    width: 600px;
    background: #f5f0e0;
    color: #222;
    padding: 40px;
    font-family: 'Georgia', serif;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.newspaper-header {
    text-align: center;
    border-bottom: 3px double #222;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.newspaper-header h1 {
    font-size: 32px;
    letter-spacing: 4px;
    color: #111;
}

.newspaper-date {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.newspaper-headline {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
    line-height: 1.3;
    text-align: center;
}

.newspaper-body {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    column-count: 2;
    column-gap: 24px;
    margin-bottom: 20px;
    text-align: justify;
}

.newspaper-img {
    width: 100%;
    height: 120px;
    background: #ddd;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #888;
    border: 1px solid #ccc;
}

.newspaper-close {
    display: block;
    margin: 0 auto;
    background: #222 !important;
    color: #f5f0e0 !important;
    border-color: #222 !important;
    pointer-events: auto;
}

.newspaper-close:hover {
    background: #ff4400 !important;
    border-color: #ff4400 !important;
}

/* PAUSE MENU */
#pause-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 50;
}

.pause-overlay, .gameover-overlay, .victory-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.pause-overlay h2 {
    font-size: 48px;
    letter-spacing: 12px;
    color: #fff;
    margin-bottom: 20px;
}

.gameover-title {
    font-size: 72px;
    font-weight: 900;
    letter-spacing: 16px;
    color: #ff0000;
    text-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
}

.gameover-text {
    font-size: 18px;
    color: #aaa;
    max-width: 500px;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 20px;
}

.victory-overlay h1 {
    font-size: 48px;
    color: #44ff00;
    letter-spacing: 8px;
    text-shadow: 0 0 40px rgba(68, 255, 0, 0.5);
}

.victory-overlay p {
    color: #aaa;
    font-size: 16px;
}

#victory-stats {
    margin: 10px 0 20px;
    color: #ff4400;
}

/* PORTRAIT COLORS */
.portrait-player { background: linear-gradient(135deg, #333, #555) !important; }
.portrait-detective { background: linear-gradient(135deg, #1a1a4a, #2a2a6a) !important; }
.portrait-investigator { background: linear-gradient(135deg, #4a1a1a, #6a2a2a) !important; }
.portrait-witness { background: linear-gradient(135deg, #1a4a1a, #2a6a2a) !important; }
.portrait-news { background: linear-gradient(135deg, #4a4a1a, #6a6a2a) !important; }
.portrait-narrator { background: linear-gradient(135deg, #111, #333) !important; }
