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

body {
    background: #000;
    color: #fff;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Join Screen */
.join-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #111;
}

.join-box {
    text-align: center;
    padding: 40px;
    border: 1px solid #333;
    border-radius: 12px;
    background: #1a1a1a;
}

.join-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #00ff88;
}

.join-box p {
    color: #888;
    margin-bottom: 20px;
}

.join-box input {
    font-size: 32px;
    text-align: center;
    letter-spacing: 8px;
    text-transform: uppercase;
    width: 260px;
    padding: 12px;
    background: #000;
    border: 2px solid #444;
    border-radius: 8px;
    color: #fff;
    outline: none;
}

.join-box input:focus {
    border-color: #00ff88;
}

.join-box button {
    display: block;
    width: 260px;
    margin: 20px auto 0;
    padding: 12px;
    font-size: 18px;
    background: #00aa55;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.join-box button:hover {
    background: #00cc66;
}

.error {
    color: #ff4444;
    margin-top: 10px;
    min-height: 20px;
}

/* Monitor Screen */
.monitor-screen {
    height: 100vh;
    width: 100vw;
    position: relative;
}

.monitor-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.waveform-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.waveform-row {
    flex: 1 1 0;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.waveform-label {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    writing-mode: horizontal-tb;
    border-right: 1px solid #1a1a1a;
}

.waveform-canvas {
    flex: 1;
    display: block;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.numeric-box {
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #1a1a1a;
    padding: 4px;
}

.numeric-label {
    font-size: 13px;
    opacity: 0.7;
}

.numeric-value {
    font-size: 42px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.numeric-unit {
    font-size: 12px;
    opacity: 0.5;
}

/* Colors matching industry standards */
.ecg-color { color: #00ff41; }
.spo2-color { color: #00e5ff; }
.abp-color { color: #ff3333; }
.capno-color { color: #ffff00; }
.resp-color { color: #ffaa00; }

/* Bottom bar */
.bottom-bar {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #0a0a0a;
    border-top: 1px solid #222;
    font-size: 14px;
}

.temp-display {
    color: #ff8800;
}

.temp-label {
    opacity: 0.6;
    margin-right: 6px;
}

.temp-value {
    font-size: 18px;
    font-weight: bold;
}

.temp-unit {
    opacity: 0.6;
    margin-left: 2px;
}

.session-info {
    color: #666;
}

.rhythm-display {
    color: #888;
}

/* Alarm overlay */
.alarm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
}

.alarm-overlay.alarm-active {
    animation: alarm-flash 0.5s infinite;
}

.alarm-text {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

@keyframes alarm-flash {
    0%, 100% { border: 4px solid transparent; }
    50% { border: 4px solid #ff0000; }
}
