:root {
    --bg-dark: #070a12;
    --bg-panel: #0d1525;
    --bg-panel-border: #1e293b;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-blue: #0284c7;
    --accent-purple: #a855f7;
    --text-main: #f3f4f6;
    --text-muted: #94a3b8;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.5;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border: 1px solid var(--bg-panel-border);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.app-header h1 {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.accent-red { color: var(--accent-red); }
.subtitle { font-size: 0.82rem; color: var(--text-muted); font-family: var(--font-mono); }

.day-tracker {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.day-badge {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
}

.extraction-bar {
    width: 220px;
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
}

.extraction-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-green));
    transition: width 0.4s ease;
}

.extraction-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Grid Layout */
.campaign-grid {
    display: grid;
    grid-template-columns: 320px 1fr 340px;
    gap: 20px;
    flex: 1;
}

@media (max-width: 1200px) {
    .campaign-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--bg-panel-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--accent-blue);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
    letter-spacing: 1px;
}

/* Meters & Vitals */
.stat-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.meter-bar {
    height: 8px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill { height: 100%; transition: width 0.3s ease; }
.fill-green { background: var(--accent-green); }
.fill-yellow { background: var(--accent-yellow); }
.fill-blue { background: var(--accent-blue); }
.fill-purple { background: var(--accent-purple); }
.fill-red { background: var(--accent-red); }

.threat-group {
    background: rgba(239, 68, 68, 0.08);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.inventory-section {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 12px;
}

.inventory-section h4 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.inventory-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.inventory-list li {
    background: #141f36;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Director Panel & CRT Box */
.director-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.director-header h3 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent-red);
}

.audio-controls { display: flex; gap: 8px; }

.btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--bg-panel-border);
    background: #1e293b;
    color: var(--text-main);
    transition: all 0.2s;
}

.btn:hover { background: #334155; border-color: var(--accent-blue); }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; font-family: var(--font-mono); }
.btn-mic { background: rgba(2, 132, 199, 0.2); border-color: var(--accent-blue); color: var(--accent-blue); }

.crt-screen {
    background: #040810;
    border: 1px solid #00f0ff33;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.scanline {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

.crt-header {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding-bottom: 6px;
}

.status-dot {
    width: 8px; height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink { 50% { opacity: 0.3; } }

.crt-content h4 {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--accent-yellow);
    margin-bottom: 8px;
}

.crt-content p {
    font-size: 0.92rem;
    color: #e2e8f0;
    line-height: 1.6;
}

.consequence-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed var(--accent-yellow);
    border-radius: 8px;
    padding: 12px;
}

.consequence-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-yellow);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.consequence-box p {
    font-size: 0.88rem;
    color: var(--text-main);
}

/* Choices Grid */
.choices-section h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.choices-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-card {
    background: #121c2e;
    border: 1px solid var(--bg-panel-border);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.choice-card:hover {
    border-color: var(--accent-blue);
    background: #182740;
    transform: translateX(4px);
}

.choice-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
}

.choice-stats {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-blue);
    display: flex;
    gap: 12px;
}

/* Survivor Roster */
.survivors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.survivor-card {
    background: #121c2e;
    border: 1px solid var(--bg-panel-border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.survivor-card.dead {
    opacity: 0.4;
    filter: grayscale(1);
}

.survivor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.survivor-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.survivor-role {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(2, 132, 199, 0.15);
    color: var(--accent-blue);
    padding: 2px 8px;
    border-radius: 12px;
}

.survivor-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Campaign Timeline Log */
.campaign-log-section {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.campaign-log-section h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.log-timeline {
    flex: 1;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-right: 4px;
}

.log-item {
    background: #10192a;
    padding: 6px 8px;
    border-left: 2px solid var(--accent-blue);
    border-radius: 0 4px 4px 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 8, 16, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: var(--bg-panel);
    border: 2px solid var(--accent-blue);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-card h2 {
    font-family: var(--font-mono);
    font-size: 1.8rem;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    font-size: 1rem;
    padding: 12px 24px;
}

/* Author Details Footer */
.author-footer {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.footer-card {
    background: rgba(13, 21, 37, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 28px;
    text-align: center;
    max-width: 850px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.developed-by { font-size: 0.9rem; color: #94a3b8; }
.developed-by .author-name { color: #00f0ff; font-weight: 700; }
.developed-by .heart { color: #ef4444; display: inline-block; animation: heartPulse 1.5s infinite; }
@keyframes heartPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.footer-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.footer-link { color: #00f0ff; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.footer-links .dot { color: #475569; }
.tech-badges { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.badge-pill { background: rgba(6, 182, 212, 0.08); border: 1px solid rgba(6, 182, 212, 0.3); color: #38bdf8; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 4px; }
.copyright-text { font-size: 0.75rem; color: #64748b; }
