/* ============================================
   AGENT 007: UNDER FIRE - GoldenEye Tribute
   Authentic Bond / GoldenEye N64 Styling
   ============================================ */

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

body {
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', monospace;
    cursor: none;
    user-select: none;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#game-container canvas {
    display: block;
}

.hidden {
    display: none !important;
}

/* ============================================
   GUN BARREL SEQUENCE
   ============================================ */

#gun-barrel-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gun-barrel-canvas {
    width: 100vw;
    height: 100vh;
}

/* ============================================
   MENU SCREEN
   ============================================ */

#menu-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a15 60%, #000 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" fill="none" stroke="%23ff3333" stroke-width="1.5"/><line x1="12" y1="0" x2="12" y2="7" stroke="%23ff3333" stroke-width="1.5"/><line x1="12" y1="17" x2="12" y2="24" stroke="%23ff3333" stroke-width="1.5"/><line x1="0" y1="12" x2="7" y2="12" stroke="%23ff3333" stroke-width="1.5"/><line x1="17" y1="12" x2="24" y2="12" stroke="%23ff3333" stroke-width="1.5"/></svg>') 12 12, crosshair;
    overflow-y: auto;
}

#menu-container {
    text-align: center;
    color: #d4af37;
    max-width: 700px;
    padding: 30px 20px;
}

#menu-title {
    margin-bottom: 10px;
}

.title-line {
    font-size: 2.5em;
    letter-spacing: 15px;
    color: #c0c0c0;
    text-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

.title-007 {
    font-size: 8em;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.5), 0 4px 8px rgba(0,0,0,0.5);
    line-height: 1;
    margin: -10px 0;
}

#menu-subtitle {
    font-size: 1em;
    letter-spacing: 8px;
    color: #888;
    margin-bottom: 25px;
}

/* Dossier-style mission briefing */
#mission-dossier {
    text-align: left;
    margin: 0 auto 25px auto;
    max-width: 520px;
    border: 1px solid #333;
    background: rgba(10, 10, 20, 0.8);
    padding: 20px;
    position: relative;
}

.dossier-header {
    text-align: center;
    color: #cc3333;
    font-size: 0.8em;
    letter-spacing: 4px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.dossier-section {
    margin-bottom: 12px;
}

.dossier-from {
    color: #d4af37;
    font-size: 0.75em;
    letter-spacing: 3px;
    margin-bottom: 3px;
}

.dossier-text {
    color: #aaa;
    font-size: 0.8em;
    line-height: 1.6;
    padding-left: 10px;
    border-left: 2px solid #333;
}

#difficulty-select {
    margin-bottom: 20px;
}

.menu-label {
    font-size: 0.9em;
    letter-spacing: 4px;
    color: #888;
    margin-bottom: 15px;
}

.menu-btn {
    background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    padding: 10px 30px;
    margin: 5px 10px;
    cursor: inherit;
    letter-spacing: 3px;
    transition: all 0.2s;
}

.menu-btn:hover, .menu-btn.selected {
    background: #d4af37;
    color: #000;
}

#start-prompt {
    font-size: 1.3em;
    letter-spacing: 5px;
    color: #d4af37;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 30px;
    margin-top: 15px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

#controls-info {
    display: inline-block;
    text-align: left;
    color: #666;
    font-size: 0.85em;
    line-height: 2;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.control-row span {
    display: inline-block;
    width: 120px;
    color: #999;
    text-align: right;
    margin-right: 15px;
}

/* ============================================
   WATCH / PAUSE MENU (Bond's Q Watch)
   ============================================ */

#watch-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

#watch-frame {
    width: 420px;
    padding: 30px;
    border: 3px solid #666;
    border-radius: 20px;
    background: linear-gradient(135deg, #2a2a2a, #0d0d0d);
    box-shadow: 0 0 60px rgba(100, 100, 100, 0.2), inset 0 0 30px rgba(0,0,0,0.5),
                0 0 3px 1px rgba(150,150,150,0.15);
}

#watch-face {
    border: 2px solid #444;
    border-radius: 10px;
    padding: 20px;
    background: #060a06;
}

#watch-title {
    text-align: center;
    color: #00cc44;
    font-size: 1em;
    letter-spacing: 3px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 204, 68, 0.3);
}

#watch-mission-name {
    text-align: center;
    color: #00aa33;
    font-size: 0.7em;
    letter-spacing: 4px;
    margin-bottom: 15px;
    opacity: 0.7;
}

#watch-status {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.watch-bar-container {
    flex: 1;
}

.watch-bar-label {
    color: #00cc44;
    font-size: 0.65em;
    letter-spacing: 2px;
    margin-bottom: 5px;
    opacity: 0.7;
}

.watch-bar {
    height: 18px;
    background: #111;
    border: 1px solid #333;
    border-radius: 2px;
    overflow: hidden;
}

.watch-bar-fill {
    height: 100%;
    transition: width 0.3s;
}

.health-bar .watch-bar-fill {
    background: linear-gradient(to right, #cc4400, #ff6600);
}

.armor-bar .watch-bar-fill {
    background: linear-gradient(to right, #2244aa, #4488ff);
}

#watch-weapon-info {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1a2a1a;
}

.watch-section-title {
    color: #00cc44;
    font-size: 0.75em;
    letter-spacing: 3px;
    margin-bottom: 8px;
    border-bottom: 1px solid #1a2a1a;
    padding-bottom: 5px;
}

#watch-weapon-name {
    color: #00ee55;
    font-size: 0.9em;
    letter-spacing: 2px;
}

#watch-ammo-info {
    color: #00aa44;
    font-size: 0.8em;
    opacity: 0.8;
    margin-top: 3px;
}

#objectives-list {
    margin-bottom: 15px;
}

.objective-item {
    color: #00bb44;
    font-size: 0.75em;
    padding: 3px 0;
    padding-left: 25px;
    position: relative;
    opacity: 0.8;
}

.objective-item::before {
    content: '[ ]';
    position: absolute;
    left: 0;
    color: #006622;
}

.objective-item.completed {
    color: #00ee55;
    text-decoration: line-through;
    opacity: 1;
}

.objective-item.completed::before {
    content: '[X]';
    color: #00ee55;
}

.watch-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid #00cc44;
    color: #00cc44;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    padding: 10px;
    margin-top: 8px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s;
}

.watch-btn:hover {
    background: #00cc44;
    color: #000;
}

/* Watch page tabs */
#watch-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #1a2a1a;
}

.watch-tab {
    width: 30px;
    height: 4px;
    background: #1a3a1a;
    border-radius: 2px;
}

.watch-tab.active {
    background: #00cc44;
    box-shadow: 0 0 6px rgba(0, 204, 68, 0.4);
}

/* ============================================
   GAME OVER SCREEN - Blood Drip (Gun Barrel)
   ============================================ */

#gameover-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 0, 0, 0.95);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

#blood-drip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 601;
}

.blood-drip {
    position: absolute;
    top: -10%;
    width: 60px;
    background: linear-gradient(to bottom,
        rgba(160, 0, 0, 0.9) 0%,
        rgba(120, 0, 0, 0.7) 60%,
        rgba(80, 0, 0, 0.3) 90%,
        transparent 100%);
    border-radius: 0 0 30px 30px;
    animation: bloodDripFall 2s ease-in forwards;
}

.drip-1 { left: 10%; height: 70vh; animation-delay: 0s; width: 50px; }
.drip-2 { left: 30%; height: 55vh; animation-delay: 0.3s; width: 70px; }
.drip-3 { left: 50%; height: 80vh; animation-delay: 0.15s; width: 55px; transform: translateX(-50%); }
.drip-4 { left: 68%; height: 60vh; animation-delay: 0.45s; width: 65px; }
.drip-5 { left: 85%; height: 50vh; animation-delay: 0.6s; width: 45px; }

@keyframes bloodDripFall {
    0% { top: -100%; opacity: 0.8; }
    30% { opacity: 1; }
    100% { top: 0; opacity: 0.9; }
}

#gameover-container {
    text-align: center;
    z-index: 602;
    position: relative;
}

#gameover-title {
    font-size: 4em;
    color: #ff3333;
    letter-spacing: 10px;
    margin-bottom: 30px;
    text-shadow: 0 0 40px rgba(255, 0, 0, 0.5);
    animation: gameoverPulse 3s ease-in-out infinite;
}

@keyframes gameoverPulse {
    0%, 100% { text-shadow: 0 0 40px rgba(255, 0, 0, 0.3); }
    50% { text-shadow: 0 0 60px rgba(255, 0, 0, 0.6), 0 0 100px rgba(255, 0, 0, 0.2); }
}

#gameover-stats {
    color: #ccc;
    font-size: 1.1em;
    line-height: 2;
    margin-bottom: 30px;
}

/* ============================================
   VICTORY SCREEN
   ============================================ */

#victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 10, 30, 0.95);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

#victory-container {
    text-align: center;
}

#victory-title {
    font-size: 3.5em;
    color: #d4af37;
    letter-spacing: 10px;
    margin-bottom: 30px;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
}

#victory-stats {
    color: #ccc;
    font-size: 1.1em;
    line-height: 2;
    margin-bottom: 20px;
}

#victory-rating {
    font-size: 1.5em;
    color: #d4af37;
    margin-bottom: 30px;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ============================================
   HUD - Minimal GoldenEye Style
   ============================================ */

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

/* Health & Armor bars - Flanking crosshair, GoldenEye style */
#health-bars {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    display: flex;
    gap: 120px;
    opacity: 0;
    transition: opacity 0.3s;
}

#health-bars.visible {
    opacity: 1;
}

.hud-bar-container {
    width: 6px;
    height: 100px;
    position: relative;
}

.hud-bar-bg {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.hud-bar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    transition: height 0.3s;
}

.hud-bar-fill.health {
    background: linear-gradient(to top, #cc4400, #ff6600);
}

.hud-bar-fill.armor {
    background: linear-gradient(to top, #2244cc, #4488ff);
}

/* Crosshair - Iconic GoldenEye red circle reticle */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
}

.crosshair-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255, 50, 50, 0.85);
    border-radius: 50%;
}

.crosshair-line {
    position: absolute;
    background: rgba(255, 50, 50, 0.85);
}

.crosshair-line.top {
    width: 1.5px;
    height: 10px;
    left: 50%;
    transform: translateX(-50%);
    top: -4px;
}

.crosshair-line.bottom {
    width: 1.5px;
    height: 10px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -4px;
}

.crosshair-line.left {
    height: 1.5px;
    width: 10px;
    top: 50%;
    transform: translateY(-50%);
    left: -4px;
}

.crosshair-line.right {
    height: 1.5px;
    width: 10px;
    top: 50%;
    transform: translateY(-50%);
    right: -4px;
}

/* Ammo display - Minimal, just numbers */
#ammo-display {
    position: absolute;
    bottom: 25px;
    right: 25px;
    text-align: right;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.5);
}

#ammo-count {
    font-size: 1.8em;
    letter-spacing: 2px;
}

#ammo-current {
    color: #fff;
}

#ammo-reserve {
    color: #999;
    font-size: 0.7em;
}

#weapon-name {
    font-size: 0.8em;
    color: #999;
    letter-spacing: 3px;
    opacity: 0.7;
}

/* Weapon selector */
#weapon-selector {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    pointer-events: none;
}

.weapon-slot {
    padding: 6px 12px;
    margin: 2px 0;
    color: #666;
    font-size: 0.8em;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid transparent;
    text-align: right;
    transition: all 0.15s;
}

.weapon-slot.active {
    color: #d4af37;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.weapon-slot.unavailable {
    color: #333;
}

/* Damage overlay */
#damage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

#damage-overlay.flash {
    opacity: 1;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(200, 0, 0, 0.4) 100%);
}

/* Objective notification */
#objective-notify {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: #00cc44;
    font-size: 1em;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 204, 68, 0.5);
    text-align: center;
    animation: fadeInOut 3s ease-in-out;
    white-space: nowrap;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Kill feed - subtle */
#kill-feed {
    position: absolute;
    top: 15px;
    right: 15px;
    text-align: right;
}

.kill-entry {
    color: #bbb;
    font-size: 0.75em;
    padding: 2px 8px;
    margin-bottom: 2px;
    background: rgba(0, 0, 0, 0.3);
    animation: killFade 4s ease-in-out forwards;
}

@keyframes killFade {
    0% { opacity: 0; transform: translateX(20px); }
    10% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Interaction prompt */
#interact-prompt {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9em;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Scope overlay for sniper */
#scope-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    pointer-events: none;
}

.scope-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70vh;
    height: 70vh;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid #333;
    box-shadow: 0 0 0 2000px #000;
    background: transparent;
}

.scope-circle::before,
.scope-circle::after {
    content: '';
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
}

.scope-circle::before {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

.scope-circle::after {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
}

/* Muzzle flash overlay */
.muzzle-flash-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 200, 50, 0.6) 0%, transparent 70%);
    pointer-events: none;
    animation: muzzleFlash 0.08s ease-out forwards;
}

@keyframes muzzleFlash {
    0% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(1.5); }
}

/* Loading text */
.loading-text {
    color: #d4af37;
    font-size: 1.5em;
    letter-spacing: 5px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   LEVEL SELECT
   ============================================ */

#level-select {
    margin-bottom: 20px;
}

/* ============================================
   GRENADE / MINE HUD
   ============================================ */

#grenade-display {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grenade-slot {
    color: #aaa;
    font-size: 0.75em;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grenade-slot.active {
    color: #d4af37;
    border-color: #d4af37;
}

.grenade-slot.empty {
    color: #555;
}
