@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=JetBrains+Mono:wght@300;400;700&display=swap');

:root {
    --color-bg: #030912;
    --color-surface: #080f1e;
    --color-border: #0d2137;
    --color-primary: #00d4ff;
    --color-accent: #ff3366;
    --color-success: #00ff9d;
    --color-warning: #ffaa00;
    --color-text: #c8e0f0;
    --color-text-muted: #4a6a80;
    
    --glow-primary: 0 0 10px rgba(0, 212, 255, 0.4);
    --glow-accent: 0 0 10px rgba(255, 51, 102, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: #000 url('../img/emergency_room_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--color-text);
    font-family: 'JetBrains Mono', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.5;
}

/* Dark Overlay for Readability */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(3, 9, 18, 0.7);
    z-index: -1;
}

/* Background Grid (Very subtle now) */
.bg-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: -1;
    opacity: 0.1;
}

@keyframes grid-scroll {
    from { transform: perspective(500px) rotateX(60deg) translateY(-50%); }
    to { transform: perspective(500px) rotateX(60deg) translateY(-40%); }
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Medical Card */
.card {
    background: var(--color-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    padding: 2rem;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.card::after {
    content: "";
    position: absolute;
    bottom: 0; right: 0;
    width: 20px; height: 20px;
    border-bottom: 2px solid var(--color-primary);
    border-right: 2px solid var(--color-primary);
}

/* Form Elements */
input, select, button {
    background: rgba(13, 33, 55, 0.6);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 12px 20px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 5px var(--color-primary);
}

select option {
    background: #080f1e;
    color: #fff;
}

button {
    background: var(--color-primary);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    border-color: var(--color-primary);
    text-shadow: var(--glow);
}

button:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px var(--color-primary);
    background: var(--color-primary);
    color: #000;
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.tab-btn {
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
}

.tab-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Tables style: terminal */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th {
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-primary);
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
}

.critical-value {
    color: var(--color-accent);
    animation: critical-pulse 1s infinite alternate;
}

@keyframes critical-pulse {
    from { opacity: 1; text-shadow: 0 0 5px var(--color-accent); }
    to { opacity: 0.6; text-shadow: 0 0 15px var(--color-accent); }
}

/* Timer Bar */
.timer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #000;
    z-index: 1000;
}

#timer-bar {
    height: 100%;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    width: 100%;
    transition: width 1s linear;
}

.timer-warning #timer-bar {
    animation: timer-blink 0.5s infinite alternate;
}

@keyframes timer-blink {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

/* --- EVIDENCE SYSTEM (ESCAPE ROOM HUD) --- */

.evidence-frame {
    position: relative;
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid var(--color-border);
    padding: 30px;
    margin: 20px 0;
    box-shadow: inset 0 0 50px rgba(0, 212, 255, 0.05);
}

.evidence-frame::before {
    content: "BIO-LOG: SECURE_DATA";
    position: absolute;
    top: -10px; left: 20px;
    font-size: 0.6rem;
    color: var(--color-primary);
    background: var(--color-bg);
    padding: 0 10px;
    font-weight: bold;
}

.evidence-frame-meta {
    position: absolute;
    bottom: -15px; right: 20px;
    font-size: 0.5rem;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono';
    text-transform: uppercase;
}

.watermark-confidential {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255, 51, 102, 0.04);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
    font-family: 'Orbitron';
}

.data-stream {
    position: absolute;
    font-size: 0.5rem;
    color: var(--color-primary);
    opacity: 0.3;
    pointer-events: none;
    font-family: monospace;
}

.ds-top-right { top: 5px; right: 10px; text-align: right; }
.ds-bottom-left { bottom: 5px; left: 10px; }

.medical-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
    position: relative;
    z-index: 1;
}

.medical-table th {
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-primary);
    font-size: 0.7rem;
    padding: 10px;
    text-transform: uppercase;
    border: none;
}

.medical-table td {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-top: 1px solid rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid rgba(0, 212, 255, 0.05);
}

.medical-table tr:hover td {
    background: rgba(0, 212, 255, 0.05);
}
