/* ============================================================
   PROTOCOL / HACKER — Anonymous Dark Neon Theme
   Entity: NESSUS | Mission: Restore the Signal
   Visual: Hacker / Anonymous — sleek, modern, neon green
   ============================================================ */

/* --- CSS Variables ----------------------------------------- */
:root {
    --bg-deep:       #0d0d0d;
    --bg-surface:    #1a1a1a;
    --bg-surface-lt: #242424;
    --glow-green:    #39ff14;
    --glow-cyan:     #00d4ff;
    --glow-magenta:  #ff2d7b;
    --text-primary:  #d0d0d0;
    --text-dim:      #666666;
    --text-bright:   #f0f0f0;
    --signal-red:    #ff2d2d;
    --signal-yellow: #ffd700;
    --signal-green:  #39ff14;
    --border-glow:   rgba(57, 255, 20, 0.12);
    --font-mono:     "Courier New", Courier, monospace;
    --font-sans:     "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --radius:        8px;
    --radius-lg:     16px;
    --transition:    0.25s ease;
    --viz-wave-rgb:  57, 255, 20;
    --viz-glow-rgb:  57, 255, 20;
}

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Body -------------------------------------------------- */
.hacker-body {
    min-height: 100vh;
    background: var(--bg-deep);
    background-image:
        url('/images/bg_hacker.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

.hacker-body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.85) 0%, rgba(17, 17, 17, 0.80) 50%, rgba(10, 10, 10, 0.85) 100%);
    z-index: 0;
    pointer-events: none;
}

.hacker-body > * {
    position: relative;
    z-index: 1;
}

/* --- No background image mode ------------------------------ */
.hacker-body.no-theme-bg {
    background-image: linear-gradient(180deg, #0d0d0d 0%, #111111 50%, #0a0a0a 100%);
}

.hacker-body.no-theme-bg::before {
    display: none;
}

/* --- Scanline Overlay (disabled in hacker theme) ----------- */
.scanline-overlay {
    display: none;
}

/* --- Subtle Flicker for Logo ------------------------------- */
@keyframes subtle-flicker {
    0%, 92%, 100% { opacity: 1; transform: none; }
    93% { opacity: 0.8; transform: translateX(2px); }
    95% { opacity: 1; transform: translateX(-1px); }
    97% { opacity: 0.85; }
}

.glitch {
    position: relative;
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 800;
    color: var(--glow-green);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow:
        0 0 6px rgba(57, 255, 20, 0.5),
        0 0 20px rgba(57, 255, 20, 0.2);
    animation: subtle-flicker 4s infinite;
}

.glitch::before,
.glitch::after {
    display: none;
}

/* --- Pulsing Glow Animation -------------------------------- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(57, 255, 20, 0.3); }
    50%      { box-shadow: 0 0 20px rgba(57, 255, 20, 0.6), 0 0 40px rgba(57, 255, 20, 0.15); }
}

@keyframes pulse-text {
    0%, 100% { text-shadow: 0 0 5px rgba(57, 255, 20, 0.4); }
    50%      { text-shadow: 0 0 15px rgba(57, 255, 20, 0.8), 0 0 30px rgba(57, 255, 20, 0.25); }
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

@keyframes signal-glow {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.25); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Header ------------------------------------------------ */
.nessus-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 1px solid var(--border-glow);
    backdrop-filter: blur(12px);
}

.nessus-header .header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.nessus-header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
}

.nessus-header .mini-signal {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--glow-green);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.nessus-header .mini-signal-bar {
    width: 80px;
    height: 6px;
    background: var(--bg-surface);
    border-radius: 3px;
    overflow: hidden;
}

.nessus-header .mini-signal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--signal-red), var(--signal-yellow), var(--signal-green));
    border-radius: 3px;
    transition: width 0.8s ease;
}

.nessus-nav-info {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 1.0;
    transition: opacity 0.2s;
}

.nessus-nav-info:hover {
    opacity: 1.0;
}

.nessus-nav-info a {
    font-size: 0.68rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.nessus-nav-info a:hover {
    color: var(--glow-green);
    text-decoration: none;
}

.nessus-logo:hover {
    text-decoration: none;
}

.nessus-nav-info .nav-sep {
    font-size: 0.6rem;
}

.nessus-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nessus-nav a {
    font-size: 0.8rem;
    color: var(--glow-green);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.nessus-nav a:hover {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.8), 0 0 20px rgba(57, 255, 20, 0.4);
}

.nav-sep {
    color: var(--border-color);
    font-size: 0.75rem;
    user-select: none;
    opacity: 0.4;
}

/* --- Main Content ------------------------------------------ */
.nessus-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

/* --- Footer ------------------------------------------------ */
.nessus-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 24px;
    background: rgba(13, 13, 13, 0.95);
    border-top: 1px solid var(--border-glow);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    z-index: 100;
    backdrop-filter: blur(12px);
}

/* --- Signal Bar -------------------------------------------- */
.signal-bar-container {
    width: 100%;
    height: 28px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid rgba(57, 255, 20, 0.15);
    overflow: hidden;
    position: relative;
    margin: 12px 0;
}

.signal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg,
        var(--signal-red) 0%,
        var(--signal-yellow) 50%,
        var(--signal-green) 100%
    );
    border-radius: var(--radius);
    transition: width 1s ease;
    animation: signal-glow 2s ease-in-out infinite;
    position: relative;
}

.signal-bar-fill::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.signal-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--glow-green);
    text-align: center;
    animation: pulse-text 2s ease-in-out infinite;
    letter-spacing: 0.05em;
}

/* --- Signal Log -------------------------------------------- */
.signal-log {
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid rgba(57, 255, 20, 0.08);
    scrollbar-width: thin;
    scrollbar-color: var(--glow-green) var(--bg-surface);
}

.signal-log::-webkit-scrollbar {
    width: 6px;
}

.signal-log::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

.signal-log::-webkit-scrollbar-thumb {
    background: rgba(57, 255, 20, 0.3);
    border-radius: 3px;
}

.signal-log-entry {
    padding: 8px 12px;
    margin-bottom: 4px;
    border-left: 3px solid var(--glow-green);
    background: rgba(57, 255, 20, 0.03);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.4;
}

.signal-log-entry .log-time {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.signal-log-entry .log-value {
    color: var(--glow-green);
    font-weight: 700;
}

/* --- Chat Interface ---------------------------------------- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(57, 255, 20, 0.12);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--glow-green) var(--bg-surface);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(57, 255, 20, 0.3);
    border-radius: 3px;
}

.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.55;
    position: relative;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.22);
    color: var(--text-bright);
    border-bottom-right-radius: 4px;
}

.chat-message.ai {
    align-self: flex-start;
    background: rgba(57, 255, 20, 0.04);
    border: 1px solid rgba(57, 255, 20, 0.15);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-message.ai::before {
    content: "NESSUS";
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--glow-green);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.chat-message .msg-time {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 6px;
    text-align: right;
}

/* --- Chat Input -------------------------------------------- */
.chat-input-form {
    padding: 12px 16px;
    background: rgba(13, 13, 13, 0.6);
    border-top: 1px solid rgba(57, 255, 20, 0.08);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid rgba(57, 255, 20, 0.18);
    border-radius: var(--radius);
    color: var(--text-bright);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.chat-input:focus {
    border-color: var(--glow-green);
    box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.12);
}

.chat-submit {
    padding: 10px 20px;
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid var(--glow-green);
    border-radius: var(--radius);
    color: var(--glow-green);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chat-submit:hover {
    background: rgba(57, 255, 20, 0.22);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.25);
}

.chat-submit:active {
    transform: scale(0.97);
}

.chat-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Buttons ----------------------------------------------- */
.btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid var(--glow-green);
    border-radius: var(--radius);
    color: var(--glow-green);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.03em;
}

.btn-primary:hover {
    background: rgba(57, 255, 20, 0.18);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.25);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--glow-cyan);
    border-radius: var(--radius);
    color: var(--glow-cyan);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.18);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}

.btn-danger {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255, 45, 123, 0.08);
    border: 1px solid var(--glow-magenta);
    border-radius: var(--radius);
    color: var(--glow-magenta);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-danger:hover {
    background: rgba(255, 45, 123, 0.18);
    box-shadow: 0 0 20px rgba(255, 45, 123, 0.25);
}

/* --- Cards ------------------------------------------------- */
.card {
    background: var(--bg-surface);
    border: 1px solid rgba(57, 255, 20, 0.08);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color var(--transition);
}

.card:hover {
    border-color: rgba(57, 255, 20, 0.2);
}

.card-header {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--glow-green);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(57, 255, 20, 0.08);
}

/* --- Hint Card --------------------------------------------- */
.hint-card {
    padding: 18px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    opacity: 0.8;
}
.hint-card:last-child {
    border-bottom: none;
}

.hint-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
}

.hint-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius);
}

.hint-player audio,
.hint-player video {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius);
}

.play-counter {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--glow-cyan);
    letter-spacing: 0.05em;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.18);
}

.play-counter.exhausted {
    color: var(--glow-magenta);
    border-color: rgba(255, 45, 123, 0.25);
    background: rgba(255, 45, 123, 0.08);
}

/* --- Hints System ------------------------------------------ */
.hints-container {
    max-width: 960px;
    margin: 0 auto;
}

.hints-header {
    text-align: center;
    margin-bottom: 24px;
}

.hints-subtitle,
.missions-subtitle,
.messages-subtitle,
.vote-subtitle,
.section-subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 8px;
}

.btn-back-to-play {
    display: inline-block;
    color: var(--glow-cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 8px 18px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.6);
    transition: all var(--transition);
}

.btn-back-to-play:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 212, 255, 0.5);
    text-decoration: none;
}

.hint-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hint-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--glow-green);
    margin: 0 0 8px;
}

.hint-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 20px;
}

.hint-type-fragmented {
    color: var(--glow-cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.22);
}

.hint-type-video {
    color: var(--glow-magenta);
    background: rgba(255, 45, 123, 0.1);
    border: 1px solid rgba(255, 45, 123, 0.22);
}

.hint-type-text {
    color: var(--glow-green);
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.22);
}

.hint-reveal-counter {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
}

.hint-reveal-warning {
    color: var(--signal-yellow);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    padding: 8px 12px;
    margin-bottom: 10px;
    background: rgba(255, 204, 0, 0.06);
    border: 1px solid rgba(255, 204, 0, 0.18);
    border-radius: var(--radius);
}

.btn-hint-reveal {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-family: var(--font-mono);
    color: var(--glow-cyan);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-hint-reveal:hover {
    background: rgba(0, 212, 255, 0.18);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.btn-hint-reveal:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-countdown {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--signal-yellow);
    padding: 6px 12px;
    margin-bottom: 10px;
    background: rgba(255, 204, 0, 0.05);
    border-radius: var(--radius);
    animation: pulse-glow 2s ease-in-out infinite;
}

.hint-body {
    padding: 0;
}

.hint-reveal-anim {
    animation: hint-reveal 0.5s ease-out;
}

.hint-fragment {
    padding: 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.fragment-text {
    font-family: var(--font-mono);
    color: var(--glow-cyan);
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}

.hint-audio-controls,
.hint-video-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn-hint-play {
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--glow-green);
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.22);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-hint-play:hover {
    background: rgba(57, 255, 20, 0.18);
}

.btn-hint-play:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-dim);
}

.hint-text-content {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.55;
    margin-bottom: 10px;
}

.hint-text-content strong {
    color: var(--glow-green);
}

.hint-text-content h1 {
    font-size: 1.3em;
    margin: 0.6em 0 0.4em;
    color: var(--text-bright);
}

.hint-text-content h2 {
    font-size: 1.1em;
    margin: 0.5em 0 0.3em;
    color: var(--text-bright);
}

.hint-exhausted-msg {
    color: var(--text-dim);
    font-style: italic;
    font-family: var(--font-mono);
    padding: 10px 0;
}

.hint-auto-hidden {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.hint-highlight {
    animation: hint-highlight-pulse 2s ease-out;
}

.hints-tab-container {
    padding: 8px 0;
    text-align: center;
}

.hints-tab-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 70%;
    margin: 0 auto;
}

.hint-tab-item {
    display: block;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-align: center;
    text-decoration: none;
    transition: all var(--transition);
}

.hint-tab-item:hover {
    background: var(--bg-surface-lt);
    border-color: rgba(0, 212, 255, 0.28);
    text-decoration: none;
    color: var(--text-bright);
}

.hint-tab-item.revealed {
}

.hint-tab-item.exhausted {
}

.hint-tab-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.hint-tab-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-tab-time {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

.hint-new-badge {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    color: var(--glow-cyan);
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 20px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.hint-exhausted-badge {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    padding: 2px 8px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.hint-badge-new {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 8px; margin-left: 6px;
    border-radius: 4px;
    background: rgba(255, 170, 0, 0.85);
    color: #fff;
    animation: hint-badge-pulse 1.8s ease-in-out infinite;
}
@keyframes hint-badge-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(255, 170, 0, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 14px rgba(255, 170, 0, 0.7); }
}
.hint-badge-count {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    min-width: 20px; height: 20px; padding: 0 5px;
    margin-left: 6px; border-radius: 50%;
    background: rgba(255, 170, 0, 0.8);
    color: #fff;
}

.hints-tab-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.btn-go-to-hints {
    display: inline-block;
    color: var(--glow-cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 8px 18px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(0, 212, 255, 0.06);
    transition: all var(--transition);
}

.btn-go-to-hints:hover {
    background: rgba(0, 212, 255, 0.15);
    text-decoration: none;
}

/* --- Missions Tab (play page) ------------------------------ */
.missions-tab-container { padding: 8px 0; }
.missions-tab-list { display: flex; flex-direction: column; gap: 10px; max-width: 70%; margin: 0 auto; }
.mission-tab-item {
    display: block;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid rgba(0, 255, 65, 0.12);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-align: center;
    text-decoration: none;
}
.mission-tab-item:hover {
    background: var(--bg-surface-lt);
    border-color: rgba(0, 255, 65, 0.28);
    text-decoration: none;
    color: var(--text-bright);
}
.mission-tab-item.completed { }
.mission-tab-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.mission-tab-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-tab-time {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}
.mission-new-badge {
    font-size: 0.7rem; font-weight: 600; font-family: var(--font-mono);
    text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px;
    color: var(--green); background: rgba(0, 255, 65, 0.12);
    border: 1px solid rgba(0, 255, 65, 0.28); border-radius: 20px;
}
.mission-done-badge {
    font-size: 0.7rem; font-weight: 600; font-family: var(--font-mono);
    text-transform: uppercase; padding: 2px 8px; color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
}
.missions-tab-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.btn-go-to-missions {
    display: inline-block; color: var(--green); font-family: var(--font-mono);
    font-size: 0.9rem; padding: 8px 18px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: var(--radius); background: rgba(0, 255, 65, 0.06);
    transition: all var(--transition);
}
.btn-go-to-missions:hover {
    background: rgba(0, 255, 65, 0.15); text-decoration: none;
}

/* Video modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.hint-video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius);
}

.btn-close-modal {
    margin-top: 16px;
    padding: 8px 24px;
    font-family: var(--font-mono);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.18);
}

@keyframes hint-reveal {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes hint-highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 0 20px 4px rgba(0, 212, 255, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

/* --- Mission Card ------------------------------------------ */
.missions-container {
    max-width: 700px;
    margin: 0 auto;
}
.mission-card {
    position: relative;
    padding: 18px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    opacity: 0.8;
}
.mission-card:last-child {
    border-bottom: none;
}
.mission-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
}
.mission-card.mission-completed {
    border-color: rgba(0, 255, 65, 0.3);
    opacity: 0.85;
}
.mission-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.mission-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mission-badge-basic {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent);
}
.mission-badge-terminal {
    background: rgba(0, 255, 65, 0.15);
    color: var(--green);
}
.mission-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--glow-green);
    margin: 0 0 8px;
}
.mission-status-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
}
.mission-status-done {
    background: rgba(0, 255, 65, 0.15);
    color: var(--green);
}
.mission-description {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.55;
    margin-bottom: 10px;
}

.content-image {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin: 20px 0 10px;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}
.content-image:hover {
    opacity: 0.85;
}

/* --- Terminal Window --------------------------------------- */
.terminal-window {
    background: #000000;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88em;
    cursor: text;
}
.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #333333;
    border-bottom: 1px solid #4a4a4a;
}
.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot-red { background: #ff5f56; }
.terminal-dot-yellow { background: #ffbd2e; }
.terminal-dot-green { background: #27c93f; }
.terminal-header-title {
    margin-left: 8px;
    color: #999999;
    font-size: 0.85em;
}
.terminal-output {
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
    color: rgba(0, 255, 65, 0.8);
}
.terminal-line {
    margin-bottom: 4px;
    line-height: 1.5;
}
.terminal-cmd {
    color: rgba(0, 255, 65, 0.6);
}
.terminal-success {
    color: #27c93f;
    font-weight: bold;
}
.terminal-error {
    color: #ff3333;
    font-weight: bold;
}
.terminal-info {
    color: rgba(0, 255, 65, 0.5);
    font-size: 0.9em;
}
.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(0, 255, 65, 0.08);
}
.terminal-prompt {
    color: var(--glow-green);
    font-weight: bold;
    margin-right: 6px;
}
.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--glow-green);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    caret-color: transparent;
    width: 1ch;
    min-width: 1ch;
}
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--glow-green);
    animation: cursor-blink 0.8s step-end infinite;
    flex-shrink: 0;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.terminal-completed {
    opacity: 0.7;
}
.terminal-completed .terminal-output {
    color: rgba(0, 255, 65, 0.5);
}

/* --- Mission Video Modal ----------------------------------- */
.mission-video-modal-content {
    max-width: 800px;
    width: 90%;
}
.mission-video-canvas {
    width: 100%;
    display: block;
    border-radius: 4px;
    background: #000;
}
.mission-video-warning {
    color: #ffcc00;
    font-size: 0.85em;
    margin: 0 0 0.5rem 0;
    font-style: italic;
}
.mission-video-exhausted {
    color: #ff4444;
    font-size: 0.85em;
    font-style: italic;
}
.btn-mission-replay-video {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.25);
    color: var(--green);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}
.btn-mission-replay-video:hover {
    background: rgba(0, 255, 65, 0.18);
    border-color: rgba(0, 255, 65, 0.4);
}

/* --- Mission Badge ----------------------------------------- */
.mission-badge-new {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 8px; margin-left: 6px;
    border-radius: 4px;
    background: rgba(255, 0, 170, 0.85);
    color: #fff;
    animation: mission-badge-pulse 1.8s ease-in-out infinite;
}
@keyframes mission-badge-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(255, 0, 170, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 14px rgba(255, 0, 170, 0.7); }
}
.mission-badge-count {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    min-width: 20px; height: 20px; padding: 0 5px;
    margin-left: 6px; border-radius: 50%;
    background: rgba(255, 0, 170, 0.8);
    color: #fff;
}

/* --- Message Badges ---------------------------------------- */
.message-badge-new {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 8px; margin-left: 6px;
    border-radius: 4px;
    background: rgba(0, 212, 255, 0.85);
    color: #fff;
    animation: msg-badge-pulse 1.8s ease-in-out infinite;
}
@keyframes msg-badge-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(0, 212, 255, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 14px rgba(0, 212, 255, 0.7); }
}
.message-badge-count {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    min-width: 20px; height: 20px; padding: 0 5px;
    margin-left: 6px; border-radius: 50%;
    background: rgba(0, 212, 255, 0.8);
    color: #fff;
}

/* --- Messages Tab (play page) ------------------------------ */
.messages-tab-container { padding: 8px 0; text-align: center; }
.messages-tab-list { display: flex; flex-direction: column; gap: 10px; max-width: 70%; margin: 0 auto; }
.message-tab-item {
    display: block;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius);
    color: var(--text-bright);
    text-align: center;
    text-decoration: none;
    transition: all var(--transition);
}
.message-tab-item:hover {
    background: var(--bg-surface-lt);
    border-color: rgba(0, 212, 255, 0.3);
    text-decoration: none;
}
.message-tab-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}
.message-tab-time {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}
.messages-tab-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.btn-go-to-messages {
    display: inline-block; color: var(--glow-cyan); font-size: 0.85rem;
    padding: 8px 20px; border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius); background: rgba(0, 212, 255, 0.08);
    transition: all var(--transition);
}
.btn-go-to-messages:hover {
    background: rgba(0, 212, 255, 0.18); text-decoration: none;
}

/* --- Messages page (/messages) ----------------------------- */
.messages-page-container { max-width: 700px; margin: 0 auto; padding: 0 12px; }
.messages-page-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0.3em 0 0.8em;
    text-align: center;
}
.message-card {
    position: relative;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    opacity: 0.8;
}
.message-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
}
.message-card:last-child {
    border-bottom: none;
}
.message-card-visualizer {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.message-card-title {
    font-size: 1.05rem; font-weight: 600;
    color: var(--glow-green); margin: 0 0 8px;
}
.message-card-desc {
    font-size: 0.9rem; color: #fff;
    line-height: 1.55; margin-bottom: 10px;
}
.message-card-time {
    display: block; font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7); margin-top: 10px;
    letter-spacing: 0.02em;
}

/* --- Detail Tabs (Messages / Hints / Missions pages) ------ */
.detail-tab-nav {
    display: flex; gap: 4px;
    background: var(--bg-surface);
    border: 1px solid rgba(57, 255, 20, 0.15);
    border-radius: 8px 8px 0 0;
    padding: 4px 4px 0;
    overflow-x: auto; scrollbar-width: none;
}
.detail-tab-nav::-webkit-scrollbar { display: none; }
.detail-tab-btn {
    padding: 10px 18px;
    font-family: var(--font-mono);
    font-size: 0.82rem; font-weight: 700;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.detail-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(57, 255, 20, 0.05);
}
.detail-tab-btn.active {
    color: var(--glow-green);
    background: var(--bg-surface);
    border-color: rgba(57, 255, 20, 0.2);
    border-bottom-color: var(--bg-surface);
    position: relative;
    bottom: -1px;
}
.detail-tab-pane { display: none; }
.detail-tab-pane.active { display: block; }

/* --- Voting Card ------------------------------------------- */
.vote-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 45, 123, 0.12);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: all var(--transition);
}

.vote-card:hover {
    border-color: rgba(255, 45, 123, 0.3);
    background: rgba(255, 45, 123, 0.03);
}

.vote-card .player-name {
    font-weight: 700;
    color: var(--text-bright);
}

.vote-btn {
    padding: 6px 16px;
    background: rgba(255, 45, 123, 0.08);
    border: 1px solid var(--glow-magenta);
    border-radius: var(--radius);
    color: var(--glow-magenta);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
}

.vote-btn:hover {
    background: rgba(255, 45, 123, 0.2);
    box-shadow: 0 0 12px rgba(255, 45, 123, 0.25);
}

.vote-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- Action Modal (Přihlásit / Hlasovat) ------------------- */
.action-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.action-modal {
    background: #0d0d0d;
    border: 1px solid #00ff41;
    border-radius: 4px;
    padding: 28px 32px;
    min-width: 280px;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

.action-modal h3 {
    color: #00ff41;
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.action-modal p {
    color: #888;
    margin: 0 0 20px;
    font-size: 0.9rem;
}

.action-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 14px;
}

.action-modal-buttons .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.btn-action-vote {
    padding: 10px 16px;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid #ffaa00;
    border-radius: 4px;
    color: #ffaa00;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-action-vote:hover {
    background: rgba(255, 170, 0, 0.25);
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
}

/* --- Message Modal (stylová náhrada alert) ----------------- */
.msg-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(4px);
}

.msg-modal {
    background: #0d0d0d;
    border: 1px solid #00ff41;
    border-radius: 4px;
    padding: 28px 32px;
    min-width: 260px;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
    animation: msgPop 0.2s ease-out;
}

@keyframes msgPop {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.msg-modal-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    line-height: 1;
}

.msg-success .msg-modal {
    border-color: #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
}

.msg-success .msg-modal-icon {
    color: #00ff41;
}

.msg-error .msg-modal {
    border-color: #ff4444;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.15);
}

.msg-error .msg-modal-icon {
    color: #ff4444;
}

.msg-info .msg-modal {
    border-color: #4488ff;
    box-shadow: 0 0 30px rgba(68, 136, 255, 0.15);
}

.msg-info .msg-modal-icon {
    color: #4488ff;
}

.msg-modal-text {
    color: #00ff41;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.msg-modal .btn {
    min-width: 100px;
}

/* --- Vote Poll Results ------------------------------------- */
.voting-container {
    padding: 10px 0;
    text-align: center;
}

.vote-active-notice {
    padding: 16px;
    background: rgba(255, 170, 0, 0.05);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 4px;
    margin-bottom: 20px;
}

.vote-active-notice h2,
.vote-active-notice h3 {
    color: #ffaa00;
    margin: 0 0 8px;
}

.vote-results-section {
    margin-top: 20px;
}

.vote-results-section h3 {
    color: #00ff41;
    margin-bottom: 12px;
}

.vote-poll-result {
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-radius: 4px;
    margin-bottom: 12px;
}

.vote-poll-result h4 {
    color: #00ff41;
    margin: 0 0 4px;
}

.vote-poll-date {
    color: #666;
    font-size: 0.82rem;
    display: block;
    margin-bottom: 10px;
}

.vote-poll-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.vote-poll-table th {
    text-align: left;
    padding: 6px 10px;
    color: #888;
    border-bottom: 1px solid rgba(0, 255, 65, 0.15);
    font-weight: 600;
}

.vote-poll-table td {
    padding: 6px 10px;
    color: #00ff41;
    border-bottom: 1px solid rgba(0, 255, 65, 0.05);
}

.vote-poll-table tr:first-child td {
    color: #ffaa00;
    font-weight: 700;
}

/* Vote result list (collapsible groups) */
.vote-result-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vote-result-group {
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-radius: 6px;
    background: rgba(0, 255, 65, 0.02);
    overflow: hidden;
}

.btn-reveal-voters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--glow-cyan);
    border-radius: 4px;
    color: var(--glow-cyan);
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-reveal-voters:hover {
    background: rgba(0, 212, 255, 0.08);
}

.btn-reveal-voters .reveal-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.btn-reveal-voters.open .reveal-arrow {
    transform: rotate(90deg);
}

.vote-result-group:first-child {
    border-color: rgba(255, 170, 0, 0.3);
    background: rgba(255, 170, 0, 0.04);
}

.vote-result-group:first-child .vote-result-name {
    color: #ffaa00;
    font-weight: 700;
}

.vote-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
}

.vote-result-rank {
    font-size: 0.85em;
    color: #888;
    min-width: 22px;
}

.vote-result-group:first-child .vote-result-rank {
    color: #ffaa00;
    font-weight: 700;
}

.vote-result-name {
    flex: 1;
    font-size: 0.95em;
}

.vote-result-count {
    font-size: 0.8em;
    color: #888;
    margin-left: 12px;
    white-space: nowrap;
}

.voter-list {
    list-style: none;
    margin: 0;
    padding: 4px 14px 10px 28px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    background: rgba(0, 212, 255, 0.03);
}

.voter-list li {
    padding: 3px 0;
    font-size: 0.85em;
    color: var(--glow-cyan);
}

.voter-list li::before {
    content: '↳ ';
    opacity: 0.5;
}

/* --- Navigation Tabs --------------------------------------- */
.nav-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(57, 255, 20, 0.08);
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(57, 255, 20, 0.04);
}

.nav-tab.active {
    color: var(--glow-green);
    background: var(--bg-surface);
    border-color: rgba(57, 255, 20, 0.15);
    border-bottom-color: var(--bg-surface);
    position: relative;
    bottom: -1px;
}

/* --- Join / Landing Page ----------------------------------- */
.join-header {
    text-align: center;
    margin-bottom: 28px;
}

.join-subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.join-form {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px;
    background: var(--bg-surface);
    border: 1px solid rgba(57, 255, 20, 0.12);
    border-radius: var(--radius-lg);
}

.pin-input {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 2rem;
    letter-spacing: 0.5em;
    padding: 16px 12px;
}

.join-footer {
    text-align: center;
    margin-top: 24px;
}

/* --- Player select grid (game PIN mode) ------------------- */
.player-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.player-select-form {
    margin: 0;
}
.player-select-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    width: 100%;
    background: rgba(0, 255, 0, 0.10);
    border: 1px solid var(--hk-accent-dim, rgba(0,255,0,0.15));
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--hk-text, #b0b0b0);
    font-family: var(--hk-font-mono, 'Fira Code', monospace);
}
.player-select-card:hover {
    background: rgba(0, 255, 0, 0.08);
    border-color: var(--hk-accent, #0f0);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.12);
    color: var(--hk-accent, #0f0);
}
.player-select-name {
    font-weight: bold;
    font-size: 1.05rem;
}
.player-select-nick {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 4px;
}

/* --- Signal mini (header) --------------------------------- */
.signal-mini {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon);
    text-shadow:
        0 0 6px rgba(57, 255, 20, 0.6),
        0 0 20px rgba(57, 255, 20, 0.25);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-title {
    font-family: var(--font-sans);
    font-size: 3.2rem;
    font-weight: 800;
    text-align: center;
    color: var(--glow-green);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-shadow:
        0 0 10px rgba(57, 255, 20, 0.5),
        0 0 40px rgba(57, 255, 20, 0.15);
    margin-bottom: 8px;
    animation: pulse-text 3s ease-in-out infinite;
}

.landing-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    margin-bottom: 32px;
}

.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px;
}

.landing-story {
    margin-bottom: 24px;
}

.landing-story .timed-segment {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.landing-actions {
    margin-top: 8px;
}

.landing-inactive {
    text-align: center;
}

.landing-inactive .blink-slow {
    color: var(--glow-green);
    animation: pulse-text 3s ease-in-out infinite;
}

.landing-decoration {
    width: 100%;
    margin-top: 32px;
}

/* --- Voice Visualizer ------------------------------------- */
.voice-visualizer {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 60px;
    margin: 0 auto 24px;
    border: 1px solid rgba(57, 255, 20, 0.4);
    border-radius: 8px;
    background: rgba(0, 5, 0, 0.85);
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s;
}

.voice-visualizer.active {
    border-color: rgba(57, 255, 20, 0.3);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.08), inset 0 0 30px rgba(57, 255, 20, 0.03);
}

.voice-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.voice-play-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid rgba(57, 255, 20, 0.25);
    border-radius: 50%;
    background: rgba(0, 5, 0, 0.8);
    color: var(--glow-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.voice-play-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    border-color: rgba(57, 255, 20, 0.5);
}

/* Compact variant — inline next to text */
.voice-visualizer--compact {
    max-width: 100%;
    height: 44px;
    margin: 8px 0 12px;
    border-radius: 6px;
}

.voice-visualizer--compact .voice-play-btn {
    width: 30px;
    height: 30px;
    right: 6px;
}

.voice-visualizer--compact .voice-play-btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 600px) {
    .voice-visualizer--compact {
        height: 40px;
    }
}

/* --- Form Elements ----------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--glow-green);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid rgba(57, 255, 20, 0.18);
    border-radius: var(--radius);
    color: var(--text-bright);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    border-color: var(--glow-green);
    box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.1);
}

.form-input::placeholder {
    color: var(--text-dim);
}

/* --- Alerts ------------------------------------------------ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert-success {
    background: rgba(57, 255, 20, 0.06);
    border-color: rgba(57, 255, 20, 0.2);
    color: var(--glow-green);
}

.alert-error {
    background: rgba(255, 45, 123, 0.06);
    border-color: rgba(255, 45, 123, 0.2);
    color: var(--glow-magenta);
}

.alert-info {
    background: rgba(0, 212, 255, 0.06);
    border-color: rgba(0, 212, 255, 0.2);
    color: var(--glow-cyan);
}

/* --- Period Indicator / Questions Remaining ----------------- */
.period-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--glow-cyan);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.period-indicator::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glow-cyan);
    animation: pulse-glow 2s ease-in-out infinite;
}

.questions-remaining {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(57, 255, 20, 0.06);
    border: 1px solid rgba(57, 255, 20, 0.15);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--glow-green);
    font-weight: 700;
}

.questions-remaining.low {
    color: var(--signal-yellow);
    border-color: rgba(255, 215, 0, 0.25);
    background: rgba(255, 215, 0, 0.06);
}

.questions-remaining.exhausted {
    color: var(--glow-magenta);
    border-color: rgba(255, 45, 123, 0.25);
    background: rgba(255, 45, 123, 0.06);
}

/* --- Observation Form -------------------------------------- */
.observation-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.observation-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid rgba(57, 255, 20, 0.18);
    border-radius: var(--radius);
    color: var(--text-bright);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.55;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.observation-textarea:focus {
    border-color: var(--glow-green);
    box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.1);
}

.observation-textarea::placeholder {
    color: var(--text-dim);
}

/* --- Observation Result ------------------------------------ */
.observation-result {
    padding: 16px;
    background: rgba(57, 255, 20, 0.04);
    border: 1px solid rgba(57, 255, 20, 0.15);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 40px;
}

.observation-result .msg-error {
    color: var(--glow-magenta);
}

/* --- NESSUS Typing Dots ------------------------------------ */
.nessus-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0;
}

.nessus-typing .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--glow-green);
    animation: typing-dot 1.2s ease-in-out infinite;
}
.nessus-typing .dot:nth-of-type(2) { animation-delay: 0.2s; }
.nessus-typing .dot:nth-of-type(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
    0%, 60%, 100% { opacity: 0.2; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1.2); }
}

.nessus-typing .typing-text {
    font-size: 0.82rem;
    color: var(--glow-green);
    margin-right: 4px;
    opacity: 0.8;
}

/* --- Typing Cursor ----------------------------------------- */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--glow-green);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.8s step-end infinite;
}

/* --- Utility Classes --------------------------------------- */
.text-green  { color: var(--glow-green); }
.text-cyan   { color: var(--glow-cyan); }
.text-pink   { color: var(--glow-magenta); }
.text-dim    { color: var(--text-dim); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }

/* --- Status indicators ------------------------------------- */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online  { background: var(--glow-green); box-shadow: 0 0 6px var(--glow-green); }
.status-dot.offline { background: var(--glow-magenta); box-shadow: 0 0 6px var(--glow-magenta); }
.status-dot.waiting { background: var(--signal-yellow); box-shadow: 0 0 6px var(--signal-yellow); }

/* --- Loading spinner --------------------------------------- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(57, 255, 20, 0.15);
    border-top-color: var(--glow-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- Signal Video Component -------------------------------- */
.signal-video-container {
    text-align: center;
}

.signal-video-wrapper {
    position: relative;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid var(--border-glow);
}

.signal-video-canvas {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: #000;
}

.signal-video-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.signal-video-status {
    font-size: 0.85rem;
    color: var(--glow-green);
    font-family: var(--font-mono);
}

/* ============================================================
   PLAY PAGE — Tabs, Chat, Observations, Signal Log
   ============================================================ */

/* --- Play Container ---------------------------------------- */
.play-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Player Switcher --------------------------------------- */
.player-switcher {
    margin-top: 32px;
    padding: 24px 16px 16px;
    background: rgba(26, 26, 26, 0.65);
    border-radius: var(--radius-lg);
}

.player-switcher-title {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.player-switcher-columns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.player-switcher-table {
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.player-switcher-row {
    cursor: pointer;
    transition: var(--transition);
}

.player-switcher-row:hover:not(.active) {
    background: rgba(57, 255, 20, 0.06);
}

.player-switcher-row:hover:not(.active) .ps-name {
    color: var(--glow-green);
}

.player-switcher-row.active {
    cursor: default;
}

.player-switcher-row.active .ps-name {
    color: var(--glow-green);
}

.player-switcher-row td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(57, 255, 20, 0.06);
}

.ps-name {
    color: var(--text-primary);
    white-space: nowrap;
}

.ps-nick {
    color: var(--text-primary);
    font-size: 0.78rem;
    opacity: 0.65;
}

.ps-status {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.player-switcher-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    background: var(--glow-green);
    color: var(--bg-deep);
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Player logout ----------------------------------------- */
.player-logout {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.player-logout .btn {
    opacity: 1;
    font-size: 0.85rem;
    color: var(--glow-green);
    border-color: var(--glow-green);
    background: rgba(57, 255, 20, 0.15);
}
.player-logout .btn:hover {
    background: rgba(57, 255, 20, 0.25);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

/* --- PIN Modal --------------------------------------------- */
.pin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pin-modal {
    background: var(--bg-surface);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
}

.pin-modal-title {
    font-size: 1rem;
    color: var(--text-bright);
    margin-bottom: 20px;
}

.pin-modal-title span {
    color: var(--glow-green);
}

.pin-modal-error {
    color: var(--signal-red);
    font-size: 0.85rem;
    margin-top: 8px;
    margin-bottom: 4px;
}

.pin-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

/* --- Game Title Bar ---------------------------------------- */
.game-title-bar {
    text-align: center;
}

.game-title {
    font-size: 1.4rem;
    margin: 0;
}

/* --- Signal Section ---------------------------------------- */
.signal-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.game-day-indicator {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 700;
}

.info-sep {
    color: var(--text-secondary, rgba(255,255,255,0.3));
    font-size: 0.85rem;
}

.game-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    background: var(--bg-surface);
    border: 1px solid rgba(57, 255, 20, 0.12);
    border-radius: 8px;
    text-align: center;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.countdown-days {
    font-size: 1.3rem;
    color: var(--glow-green);
    letter-spacing: 0.02em;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.countdown-test-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ff6b00;
    border: 1px solid rgba(255, 107, 0, 0.4);
    border-radius: 4px;
    background: rgba(255, 107, 0, 0.08);
}

/* --- Tab Navigation ---------------------------------------- */
.tab-nav {
    display: flex;
    gap: 4px;
    background: var(--bg-surface);
    border: 1px solid rgba(57, 255, 20, 0.15);
    border-radius: 8px 8px 0 0;
    padding: 4px 4px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 10px 18px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(57, 255, 20, 0.05);
}

.tab-btn.active {
    color: var(--glow-green);
    background: var(--bg-surface);
    border-color: rgba(57, 255, 20, 0.2);
    border-bottom-color: var(--bg-surface);
    position: relative;
    bottom: -1px;
}

/* --- Tab Content ------------------------------------------- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- Chat bubbles ------------------------------------------ */
.tab-inactive-notice {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
    border: 1px dashed rgba(57, 255, 20, 0.12);
    border-radius: 8px;
    background: rgba(57, 255, 20, 0.02);
}

.tab-inactive-notice p:first-child {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.chat-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-dim);
    line-height: 1.8;
    --viz-wave-rgb: 0, 170, 255;
    --viz-glow-rgb: 0, 120, 255;
}

.chat-empty .voice-visualizer.active {
    border-color: rgba(0, 170, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.08), inset 0 0 30px rgba(0, 120, 255, 0.03);
}

.chat-empty .voice-play-btn:hover {
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.5);
    color: var(--glow-cyan);
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 4px;
}

.chat-bubble.chat-player {
    align-self: flex-end;
    margin-left: auto;
    background: rgba(0, 170, 255, 0.12);
    border: 1px solid rgba(0, 170, 255, 0.25);
    color: var(--text-bright);
    border-bottom-right-radius: 4px;
}

.chat-bubble.chat-nessus {
    align-self: flex-start;
    margin-right: auto;
    background: rgba(57, 255, 20, 0.05);
    border: 1px solid rgba(57, 255, 20, 0.2);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.chat-author {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chat-bubble.chat-player .chat-author {
    color: var(--glow-cyan);
}

.chat-bubble.chat-nessus .chat-author {
    color: var(--glow-green);
}

.chat-audio-btn {
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid var(--glow-green);
    color: var(--glow-green);
    font-size: 0.75rem;
    height: 26px;
    border-radius: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 10px;
    transition: all 0.2s;
    vertical-align: middle;
    line-height: 1;
}
.chat-audio-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}
.chat-audio-btn.playing {
    background: rgba(0, 255, 65, 0.25);
    border-color: var(--glow-green);
    color: var(--glow-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

.chat-time {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.chat-text {
    line-height: 1.6;
}

.chat-signal {
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--glow-green);
    text-shadow: 0 0 6px rgba(57, 255, 20, 0.4);
}

/* --- Chat Form --------------------------------------------- */
.chat-form {
    padding: 12px 16px;
    background: rgba(10, 10, 26, 0.6);
    border-top: 1px solid rgba(57, 255, 20, 0.1);
}

.chat-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.chat-input-group .chat-input {
    flex: 1;
    min-width: 0;
}

.chat-prompt-name {
    color: var(--glow-green);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0.8;
}

.btn-send {
    padding: 10px 20px;
    background: rgba(57, 255, 20, 0.15);
    border: 1px solid var(--glow-green);
    border-radius: var(--radius);
    color: var(--glow-green);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-send:hover {
    background: rgba(57, 255, 20, 0.25);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.chat-locked,
.obs-locked {
    padding: 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    background: rgba(10, 10, 26, 0.6);
    border-top: 1px solid rgba(57, 255, 20, 0.1);
    line-height: 1.6;
}

/* --- Observations ------------------------------------------ */
.observations-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.observations-info {
    text-align: center;
}

.observations-info p {
    color: var(--text-bright);
}

.observations-info h3 {
    color: var(--glow-green);
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.observations-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Signal Log Container ---------------------------------- */
.signal-log-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.signal-log-container h3 {
    color: var(--glow-green);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.signal-log-empty {
    color: var(--text-bright);
}

.signal-log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signal-log-amount {
    font-size: 1rem;
    font-weight: 700;
    min-width: 60px;
}

.signal-log-entry.positive .signal-log-amount {
    color: var(--glow-green);
}

.signal-log-entry.negative .signal-log-amount {
    color: var(--signal-red);
}

.signal-log-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.signal-log-reason {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.signal-log-time {
    font-size: 0.72rem;
    color: var(--text-primary);
    opacity: 0.6;
}

/* Signal Log - expandable entries */
.signal-log-list .signal-log-entry {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 14px;
    transition: background 0.2s;
}

.signal-log-entry.has-detail:hover {
    background: rgba(0, 255, 136, 0.04);
}

.signal-log-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.signal-log-entry.has-detail .signal-log-row {
    cursor: pointer;
}

.signal-log-toggle {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.signal-log-entry.open .signal-log-toggle {
    transform: rotate(180deg);
}

.signal-log-expand {
    display: none;
    padding: 10px 0 4px 0;
    margin-top: 8px;
    gap: 6px;
}

.signal-log-entry.open .signal-log-expand {
    display: flex;
    flex-direction: column;
}

.signal-log-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.signal-log-bubble.signal-log-q {
    background: rgba(0, 170, 255, 0.08);
    border-left: 3px solid var(--glow-cyan, #00aaff);
}

.signal-log-bubble.signal-log-a {
    background: rgba(0, 255, 136, 0.05);
    border-left: 3px solid var(--glow-green);
}

.signal-log-bubble-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.signal-log-q .signal-log-bubble-header {
    color: var(--glow-cyan, #00aaff);
}

.signal-log-a .signal-log-bubble-header {
    color: var(--glow-green);
}

.signal-log-bubble-text {
    color: var(--text-primary);
}

/* ── Log sub-tabs ── */
.log-subtab-nav {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
}

.log-subtab-btn {
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.log-subtab-btn:hover {
    color: var(--text-primary);
}

.log-subtab-btn.active {
    color: var(--glow-green);
    border-bottom-color: var(--glow-green);
}

.log-subtab-content {
    display: none;
}

.log-subtab-content.active {
    display: block;
}

/* ── Game Notes ── */
.game-notes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-note-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-note-form textarea {
    resize: vertical;
    min-height: 60px;
}

.game-note-form-actions {
    display: flex;
    gap: 8px;
}

.btn-note-save {
    padding: 6px 16px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    background: rgba(0, 255, 136, 0.1);
    color: var(--glow-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-note-save:hover {
    background: rgba(0, 255, 136, 0.2);
}

.btn-note-cancel {
    padding: 6px 16px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    background: transparent;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    cursor: pointer;
}

.game-notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-notes-empty {
    text-align: center;
    color: var(--text-dim);
}

.game-note-entry {
    padding: 10px 14px;
    background: rgba(0, 255, 136, 0.03);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: var(--radius);
}

.game-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.game-note-date {
    font-size: 0.7rem;
    color: var(--text-secondary, rgba(255,255,255,0.6));
    font-family: var(--font-mono);
}

.btn-note-edit {
    padding: 2px 10px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    background: transparent;
    color: var(--glow-cyan, #00aaff);
    border: 1px solid rgba(0, 170, 255, 0.25);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-note-edit:hover {
    background: rgba(0, 170, 255, 0.1);
}

.game-note-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ============================================================
   MEDIA PLAY BUTTON (zvukový doprovod textů)
   ============================================================ */

.media-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(57, 255, 20, 0.25);
    border-radius: 50%;
    background: rgba(57, 255, 20, 0.06);
    color: rgba(57, 255, 20, 0.7);
    cursor: pointer;
    vertical-align: middle;
    margin-left: 6px;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.media-play-btn:hover {
    background: rgba(57, 255, 20, 0.15);
    color: var(--glow-green);
    border-color: rgba(57, 255, 20, 0.5);
    transform: scale(1.1);
}

.media-play-btn.playing {
    background: rgba(57, 255, 20, 0.15);
    color: var(--glow-green);
    border-color: rgba(57, 255, 20, 0.5);
    animation: media-pulse 1.5s ease-in-out infinite;
}

@keyframes media-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.3); }
    50% { box-shadow: 0 0 8px 4px rgba(57, 255, 20, 0.15); }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* --- Mobile (< 768px) -------------------------------------- */
@media (max-width: 767px) {
    .media-play-btn {
        width: 40px;
        height: 40px;
    }
    .media-play-btn svg {
        width: 22px;
        height: 22px;
    }

    .nessus-header {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }

    .signal-mini {
        position: static;
        transform: none;
        text-align: center;
    }

    .nessus-header .header-left,
    .nessus-header .header-right {
        width: 100%;
        justify-content: center;
    }

    .nessus-main {
        padding: 16px 10px 90px;
    }

    .glitch {
        font-size: 1.4rem;
    }

    .landing-title {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }

    .landing-subtitle {
        font-size: 0.88rem;
    }

    .join-form {
        padding: 20px 16px;
        margin: 0 8px;
    }

    .chat-container {
        height: 400px;
        border-radius: var(--radius);
    }

    .chat-message {
        max-width: 90%;
    }

    .chat-submit {
        width: 100%;
        min-height: 44px;
    }

    .nav-tabs {
        gap: 2px;
    }

    .nav-tab {
        padding: 10px 12px;
        font-size: 0.78rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .signal-value {
        font-size: 1.6rem;
    }

    .vote-card {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .vote-btn {
        padding: 12px 20px;
        min-height: 44px;
        font-size: 0.85rem;
        width: 100%;
    }

    .period-indicator,
    .questions-remaining {
        font-size: 0.72rem;
    }

    .signal-video-controls {
        flex-direction: column;
        gap: 8px;
    }

    /* Touch-friendly buttons & inputs */
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 44px;
        padding: 12px 24px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 44px;
    }

    .chat-input {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 44px;
    }

    .observation-textarea {
        font-size: 16px;
    }

    .game-status-overlay-content {
        max-width: 90vw;
        padding: 24px 20px;
    }

    .game-status-overlay-content h2 {
        font-size: 1.2rem;
    }

    /* Play page mobile */
    .play-container {
        gap: 16px;
    }

    .chat-input-group {
        flex-direction: column;
    }

    .btn-send {
        width: 100%;
        min-height: 44px;
    }

    .chat-bubble {
        max-width: 90%;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.75rem;
        min-height: 44px;
    }

    .game-info {
        gap: 8px;
    }
}

/* --- Small mobile (< 400px) -------------------------------- */
@media (max-width: 400px) {
    .nessus-main {
        padding: 12px 6px 80px;
    }

    .landing-title {
        font-size: 1.5rem;
        letter-spacing: 0.06em;
    }

    .join-form {
        padding: 16px 12px;
        margin: 0 4px;
    }

    .chat-container {
        height: 350px;
    }

    .chat-message {
        max-width: 95%;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .nessus-header .mini-signal-bar {
        width: 60px;
    }

    .card {
        padding: 14px 12px;
    }

    .hint-card {
        padding: 14px;
    }

    .signal-bar-container {
        height: 22px;
    }

    .nessus-footer {
        padding: 6px 12px;
        font-size: 0.68rem;
    }
}

/* --- Tablet (768px - 1024px) ------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
    .nessus-main {
        padding: 24px 24px 80px;
    }

    .landing-title {
        font-size: 2.6rem;
    }

    .chat-container {
        height: 450px;
    }
}

/* --- Desktop (> 1024px) ------------------------------------ */
@media (min-width: 1025px) {
    .nessus-main {
        max-width: 960px;
        padding: 32px 16px 80px;
    }

    .game-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }

    .game-layout .chat-section {
        grid-column: 1;
    }

    .game-layout .info-section {
        grid-column: 2;
    }

    .chat-container {
        height: 560px;
    }
}

/* --- Selection & Scrollbar Theming ------------------------- */
::selection {
    background: rgba(57, 255, 20, 0.25);
    color: var(--text-bright);
}

/* --- Link styling ------------------------------------------ */
a {
    color: var(--glow-cyan);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--glow-green);
    text-decoration: underline;
}

/* --- Game Status Overlay ----------------------------------- */
.game-status-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.game-status-overlay-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.game-status-overlay-icon {
    font-size: 4rem;
    color: #39ff14;
    margin-bottom: 20px;
    text-shadow: 0 0 30px #39ff14;
    animation: overlay-pulse 2s ease-in-out infinite;
}

.game-status-overlay-content h2 {
    font-size: 1.6rem;
    color: #e0e0e0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.game-status-overlay-content p {
    font-size: 1rem;
    color: #888;
    line-height: 1.6;
}

@keyframes overlay-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Rules page ─────────────────────────── */
.rules-container {
    max-width: 960px;
    margin: 0 auto;
}

.rules-header {
    text-align: center;
    margin-bottom: 24px;
}

.rules-content {
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.8;
    padding: 20px;
    border: 1px solid rgba(0, 255, 0, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
}

.rules-content strong {
    color: #0f0;
}

.rules-content h1 {
    font-size: 1.4em;
    margin: 0.8em 0 0.6em;
}

.rules-content h2 {
    font-size: 1.15em;
    margin: 0.8em 0 0.4em;
}

.rules-content h1:first-child,
.rules-content h2:first-child {
    margin-top: 0;
}

/* ── Timed Text Player ── */
.timed-text {
    position: relative;
}

.timed-group {
    margin-bottom: 12px;
}

.timed-group .timed-segment {
    margin-bottom: 0;
}

.timed-text-scroll {
    max-height: 70vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to bottom, transparent 0%, black 3%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 3%, black 85%, transparent 100%);
    padding-bottom: 15vh;
}

.timed-text-scroll::-webkit-scrollbar {
    width: 4px;
}

.timed-text-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.timed-text-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.15);
    border-radius: 2px;
}

.timed-text-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.35);
}

.timed-text-init .timed-segment {
    display: none;
}

.timed-text-init .timed-segment.visible {
    display: block;
    animation: timedSegmentIn 0.7s ease forwards;
}

@keyframes timedSegmentIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.timed-chapter {
    font-size: 0.95em;
    color: rgba(0, 255, 0, 0.75);
    cursor: pointer;
    margin: 18px 0 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.15);
    transition: color 0.2s;
}

.timed-chapter:hover {
    color: #0f0;
}

.timed-chapter::before {
    content: '\25B6\00a0';
    font-size: 0.7em;
    opacity: 0.6;
}

.timed-text-reveal {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 6px 18px;
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: rgba(0, 255, 0, 0.6);
    font-size: 0.82em;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.timed-text-reveal:hover {
    border-color: rgba(0, 255, 0, 0.6);
    color: #0f0;
}
