/* gzjson — minimal functional CSS (iter 1) */

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

:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
    border-radius: 2px;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background: #000;
    margin: 0;
    padding: 0;
}

/* --- Common screen (projector) --- */
.screen {
    width: 100%;
    min-height: 100vh;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 2rem;
    overflow: hidden;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.screen h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.screen .game-code {
    font-size: 4rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: #4fc3f7;
    margin: 1rem 0;
}

/* --- Simplified Lobby Grid --- */
.lobby-grid-simple {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    align-items: stretch;
}

.lobby-box {
    background: #111;
    border: 2px solid #333;
    border-radius: 24px;
    padding: 3rem;
    min-height: 600px;
    height: 100%; /* Ensure full height in grid */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Space out title, content, and footer */
}

.lobby-box h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #00ff7f;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Box 1: Join */
.box-join .qr-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.qr-code {
    border-radius: 12px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 0 30px rgba(0,255,127,0.2);
    width: 400px; /* Fixed size for symmetry */
    height: 400px;
}

.qr-url-simple {
    margin-top: 2rem;
    font-size: 1.4rem;
    font-family: monospace;
}

.qr-url-simple a {
    color: #888;
    text-decoration: none;
}

/* Box 2: Challenge */
.timer-label-simple {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.timer-digits-simple {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.timer-value-simple {
    font-size: 6rem;
    font-weight: 900;
    color: #00ff7f;
    font-variant-numeric: tabular-nums;
}

.timer-unit-simple {
    font-size: 1.2rem;
    color: #666;
    margin-right: 0.5rem;
    text-transform: uppercase;
}

.timer-sep-simple {
    font-size: 5rem;
    font-weight: 300;
    color: #333;
}

/* Instructions Carousel */
.instructions-carousel {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
    margin-bottom: 1rem;
    min-height: 250px;
}

.instruction-slide {
    width: 100%;
    transition: opacity 0.6s ease-in-out;
}

.instruction-number {
    font-size: 3rem;
    font-weight: 900;
    color: #4fc3f7;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.instruction-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.instruction-text {
    font-size: 1.2rem;
    color: #aaa;
    max-width: 400px;
}

.fade-in { opacity: 1; }
.fade-out { opacity: 0; }

/* Lobby Marquee */
.lobby-marquee {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    border-top: 1px solid #333;
    padding: 1rem 0;
    overflow: hidden;
    z-index: 100;
}

.marquee-track {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-scroll 40s linear infinite;
    padding-left: 100%;
}

.marquee-content {
    font-size: 1.5rem;
    color: #00ff7f;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 2px;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.player-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.player-chip {
    background: #222;
    color: #00ff7f;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #333;
}

/* --- Player console (mobile) --- */
.player {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    background: #fff;
    color: #111;
    min-height: 100vh;
    font-size: 1.125rem;
}

.player h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.player .waiting {
    text-align: center;
    padding: 2rem 0;
}

.player .waiting .code {
    font-size: 2rem;
    font-weight: bold;
    color: #1565c0;
}

/* --- Player lobby --- */
.player-lobby {
    text-align: center;
    padding: 1rem 0;
}

.player-timer-display {
    padding: 1.5rem 0;
}

.player-timer-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.player-timer-digits {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}

.player-timer-val {
    font-size: 3rem;
    font-weight: bold;
    color: #4caf50;
    font-variant-numeric: tabular-nums;
    min-width: 2ch;
    text-align: center;
}

.player-timer-unit {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0.3rem;
}

.player-timer-sep {
    font-size: 3rem;
    font-weight: bold;
    color: #4caf50;
}

/* --- Subtitles / Instructions Ticker (Plain & Slow) --- */
.instructions-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000; /* Removed Green */
    color: #888; /* Plain, subtle */
    padding: 1.5rem 0;
    font-weight: 400;
    font-size: 1.2rem;
    overflow: hidden;
    z-index: 999;
    border-top: 1px solid #222;
}

.ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 80s linear infinite; /* Slowed down significantly */
    padding-left: 100%;
}

.ticker-content {
    display: inline-block;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- Progress / Loading bar (removed functionality, keeping class for no-op) --- */
.substate-progress-container {
    display: none; /* Removed annoying bar */
}

/* --- Build & State tags --- */
.build-tag, .state-tag {
    position: fixed;
    left: 8px;
    font-size: 0.65rem;
    font-family: monospace;
    pointer-events: none;
    z-index: 9999;
    padding: 2px 4px;
    opacity: 0.4;
}

.build-tag {
    bottom: 80px;
    color: #888;
}

.state-tag {
    bottom: 95px;
    color: #4caf50;
    font-weight: 500;
    text-transform: uppercase;
}

/* --- Question display --- */
.screen .question-text {
    font-size: 2rem;
    margin: 1rem 0;
}

.screen .countdown-number {
    font-size: 5rem;
    font-weight: bold;
    color: #4fc3f7;
}

/* --- Results table --- */
.results-table {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    border-collapse: collapse;
    font-size: 1.8rem;
}

.results-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #333;
}

.results-table .winner td {
    color: #00ff7f;
    font-weight: bold;
}

/* --- Post-Game Insight Hub (Review) --- */
.review-dashboard { margin-bottom: 2rem; }
.personal-hub {
    display: flex;
    background: #111;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    gap: 2rem;
    align-items: center;
    border: 1px solid #333;
    color: #fff;
}
.hub-identity { display: flex; align-items: center; gap: 1.5rem; flex: 1; }
.archetype-badge {
    background: linear-gradient(135deg, #00ff7f, #00b8ff);
    padding: 1rem;
    border-radius: 12px;
    color: #000;
    text-align: center;
    min-width: 120px;
}
.archetype-name { font-size: 1.2rem; font-weight: 900; display: block; }
.radar-chart { width: 120px; height: 120px; }

@media (max-width: 1200px) {
    .lobby-grid-simple { grid-template-columns: 1fr; gap: 2rem; }
    .lobby-box { min-height: auto; padding: 2rem; }
}

/* --- Forms & Buttons --- */
input[type="text"], input[type="email"] {
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #ccc;
    border-radius: 6px;
    width: 100%;
}

button, .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}

button:hover, .btn:hover { background: #0d47a1; }

.join-msg {
    font-size: 1.3rem;
    color: #00ff7f;
    animation: fadeIn 0.5s ease-in;
    margin-top: 1rem;
}

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

/* --- Vertical Player List --- */
.lobby-player-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.lobby-player-list h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.player-list-container {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

/* Custom scrollbar for player list */
.player-list-container::-webkit-scrollbar {
    width: 8px;
}
.player-list-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}
.player-list-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
.player-list-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.player-entry {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    color: #eee;
    display: flex;
    align-items: center;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Scrolling Ticker --- */
.lobby-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #333;
    padding: 1rem 0;
    overflow: hidden;
    z-index: 1000;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 60s linear infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 4rem;
    font-size: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    color: #4fc3f7;
    text-transform: uppercase;
}

.ticker-icon {
    margin-right: 1rem;
    color: #00ff7f;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
