:root {
    --bg-page: #02040a;
    --bg-shell: linear-gradient(160deg, rgba(6, 10, 22, 0.95) 0%, rgba(9, 16, 32, 0.95) 50%, rgba(3, 7, 18, 0.95) 100%);
    --panel: rgba(12, 18, 34, 0.94);
    --panel-soft: rgba(16, 24, 42, 0.86);
    --card: rgba(18, 28, 48, 0.82);
    --border-soft: rgba(120, 216, 255, 0.18);
    --border-strong: rgba(247, 195, 107, 0.28);
    --text-primary: #edf5ff;
    --text-secondary: rgba(188, 208, 236, 0.8);
    --accent-cyan: #67f0ff;
    --accent-amber: #ffca6b;
    --accent-magenta: #ff6acb;
    --accent-green: #74ffb5;
    --shadow-soft: 0 22px 60px rgba(0, 8, 24, 0.65);
    --shadow-strong: 0 30px 90px rgba(0, 12, 34, 0.72);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: "Inter", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(103, 240, 255, 0.24), transparent 60%),
        radial-gradient(circle at 80% 18%, rgba(255, 118, 194, 0.22), transparent 64%),
        var(--bg-page);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 36px 28px;
}

.shell {
    width: min(1280px, 100%);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.masthead {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(12px);
}

.masthead__brand {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.masthead__brand h1 {
    margin: 0;
    font-size: clamp(1.9rem, 2.4vw, 2.5rem);
}

.masthead__brand p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.masthead__status {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-end;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 12px;
}

.stat {
    background: var(--panel-soft);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    border: 1px solid var(--border-soft);
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stat__label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat__value {
    font-size: 1.3rem;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 12px;
}

.btn {
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    border: 1px solid var(--border-soft);
    background: rgba(14, 24, 46, 0.7);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--accent-cyan);
    color: #021624;
    border-color: var(--accent-cyan);
    font-weight: 600;
}

.lang-switch {
    display: flex;
    gap: 8px;
}

.lang-btn {
    border: 1px solid var(--border-soft);
    background: rgba(8, 16, 32, 0.6);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lang-btn.is-active {
    background: var(--accent-cyan);
    color: #021624;
    border-color: var(--accent-cyan);
    font-weight: 600;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr) 320px;
    gap: 24px;
}

.panel {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.panel__header h2,
.panel__header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(103, 240, 255, 0.16);
    border: 1px solid rgba(103, 240, 255, 0.32);
    color: var(--accent-cyan);
}

.story {
    background: var(--panel-soft);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.story p {
    margin: 0;
}

.story__choice {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.story__choice:hover,
.story__choice:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
}

.story__choice.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.panel--evidence {
    gap: 16px;
}

.evidence {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.evidence__item {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.evidence__item:hover,
.evidence__item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(103, 240, 255, 0.28);
}

.evidence__item h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--accent-cyan);
}

.evidence__item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.panel__hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.panel--actions {
    gap: 16px;
}

.actions__body {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline h4 {
    margin: 0;
    font-size: 1rem;
}

.timeline ol {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-bar {
    background: var(--panel);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    border: 1px solid var(--border-soft);
    font-size: 0.95rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-soft);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 16, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 40;
}

.overlay.hidden {
    display: none;
}

.overlay__panel {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-strong);
}

.overlay__panel--wide {
    width: min(720px, 100%);
}

.overlay__title {
    margin: 0;
    font-size: 1.6rem;
    text-align: center;
}

.overlay__note {
    margin: 0 0 6px;
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
}

.overlay__actions {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.overlay__input {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: rgba(12, 20, 36, 0.85);
    color: var(--text-primary);
    padding: 12px 14px;
    font-size: 1rem;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.overlay__input:focus-visible {
    border-color: rgba(103, 240, 255, 0.35);
    box-shadow: 0 0 0 2px rgba(103, 240, 255, 0.2);
}

.summary__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .stats {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        grid-template-rows: auto auto;
    }

    .panel--actions {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    body {
        padding: 28px 18px;
    }

    .masthead {
        padding: 24px;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .panel--actions {
        grid-column: span 1;
    }
}
