/* ============================================================
   S.C.A.M. (Sunset Company of Audio and Media) — Pip-Boy-inspired
   terminal styling. Vlastní stylizace inspirovaná zeleným CRT
   terminálem, žádné grafické assety ani loga z Falloutu/Bethesdy.
   ============================================================ */

:root {
    --green: #33ff5a;
    --green-bright: #aaffc0;
    --green-dim: #0f6621;
    --bg: #030a03;
    --glow: 0 0 2px rgba(51, 255, 90, 0.8), 0 0 8px rgba(51, 255, 90, 0.4);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
}

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    overflow-x: hidden;
}

.crt {
    position: relative;
    width: 100%;
    min-width: 0; /* jinak flex item nejde zmenšit pod min-content dlouhého textu a box přeteče přes okraj obrazovky */
    max-width: 640px;
    background:
        radial-gradient(ellipse at center, rgba(20, 60, 30, 0.25) 0%, rgba(0, 0, 0, 0.85) 100%),
        var(--bg);
    border: 2px solid var(--green-dim);
    border-radius: 12px;
    box-shadow: 0 0 24px rgba(51, 255, 90, 0.15), inset 0 0 60px rgba(0, 0, 0, 0.6);
    padding: 1.75rem 1.5rem 1.25rem;
    overflow: hidden;
    animation: flicker 6s infinite;
}

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 1px,
        rgba(0, 0, 0, 0.25) 2px,
        rgba(0, 0, 0, 0.25) 3px
    );
    mix-blend-mode: multiply;
    opacity: 0.6;
}

.terminal {
    position: relative;
    z-index: 1;
    text-shadow: var(--glow);
    overflow-wrap: break-word;
}

.terminal__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.terminal__boot {
    font-size: 0.75rem;
    color: var(--green-dim);
    text-shadow: none;
    margin-bottom: 0.5rem;
    min-height: 1em;
}

.terminal__title {
    font-family: 'VT323', monospace;
    font-size: clamp(2rem, 11vw, 3rem);
    letter-spacing: 0.1em;
    margin: 0;
    line-height: 1;
    color: var(--green-bright);
}

.terminal__subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--green);
    opacity: 0.85;
    margin-top: 0.4rem;
}

.panel {
    border: 1px solid var(--green-dim);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: rgba(15, 102, 33, 0.06);
}

.panel--alert {
    border-color: var(--green-bright);
    animation: alert-pulse 1.4s ease-in-out infinite;
}

.panel__label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--green-dim);
    text-shadow: none;
    margin-bottom: 0.5rem;
}

.panel__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.led {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--green-dim);
    box-shadow: 0 0 4px var(--green-dim);
    display: inline-block;
    flex-shrink: 0;
}

.led.led--on {
    background: var(--green);
    box-shadow: 0 0 8px var(--green), 0 0 16px var(--green);
    animation: pulse 1.6s ease-in-out infinite;
}

.led.led--alert {
    background: var(--green-bright);
    box-shadow: 0 0 8px var(--green-bright), 0 0 16px var(--green-bright);
    animation: pulse 0.7s ease-in-out infinite;
}

.btn {
    display: block;
    width: 100%;
    text-align: center;
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--green-bright);
    background: rgba(51, 255, 90, 0.08);
    border: 1px solid var(--green);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    cursor: pointer;
    text-decoration: none;
    text-shadow: var(--glow);
    transition: background 0.15s ease, transform 0.05s ease;
}

.btn:hover {
    background: rgba(51, 255, 90, 0.18);
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    border-color: var(--green-bright);
}

.btn--playing {
    background: rgba(51, 255, 90, 0.25);
}

.hint {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--green);
    opacity: 0.8;
    margin: 0.75rem 0 0.25rem;
}

.hint-details {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: var(--green);
    opacity: 0.9;
}

.hint-details summary {
    cursor: pointer;
    color: var(--green-bright);
}

.hint-details a {
    color: var(--green-bright);
}

.hint-details ul {
    margin: 0.4rem 0;
    padding-left: 1.2rem;
}

.terminal__footer {
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--green-dim);
    text-shadow: none;
    margin-top: 0.5rem;
}

@keyframes flicker {
    0%, 96%, 100% { filter: brightness(1); }
    97% { filter: brightness(0.85); }
    98% { filter: brightness(1.05); }
    99% { filter: brightness(0.92); }
}

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

@keyframes alert-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(170, 255, 192, 0); }
    50% { box-shadow: 0 0 16px rgba(170, 255, 192, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
    .crt { animation: none; }
    .led.led--on, .led.led--alert { animation: none; }
    .panel--alert { animation: none; }
}
