:root {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    color: #0f172a;
    background-color: #f8fafc;
}

body {
    margin: 0;
    padding: 0 16px 48px;
}

.host-body {
    --stage-bg: none;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

th,
td {
    text-align: center;
}

.host-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--stage-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: var(--stage-bg-opacity);
    transition:
        opacity 0.4s ease,
        filter 0.4s ease;
    filter: brightness(0.65);
    z-index: -1;
}

.hidden {
    display: none !important;
}

/*.host-body {
  background-color: #0f172a;
  color: #f8fafc;
}*/

.host-container {
    max-width: 1280px;
    padding-top: 32px;
}

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

.host-subtitle {
    margin-top: 8px;
    color: rgba(248, 250, 252, 0.7);
}

.lobby-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.pin-display {
    font-size: 48px;
    letter-spacing: 6px;
    font-weight: 700;
    margin: 8px 0 0;
}

.host-meta {
    text-align: right;
    color: rgba(148, 163, 184, 0.8);
    font-size: 14px;
}

.lobby-body {
    display: flex;
    flex-wrap: wrap;
    margin-top: 24px;
    gap: 24px;
}

.lobby-players {
    flex: 1 1 320px;
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.player-list li {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.15);
    font-size: 18px;
}

.lobby-hint {
    margin-top: 16px;
    color: rgba(148, 163, 184, 0.7);
}

.lobby-start {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.lobby-info {
    color: rgba(148, 163, 184, 0.9);
}

.highlight-url {
    font-weight: 600;
    color: #38bdf8;
}

.host-primary,
.host-secondary,
.host-danger {
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease,
        opacity 0.2s ease;
}

.host-primary {
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    color: #0f172a;
}

.host-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

.host-danger {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #0f172a;
}

.host-primary:disabled,
.host-secondary:disabled,
.host-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.host-primary:not(:disabled):hover,
.host-secondary:not(:disabled):hover,
.host-danger:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

.stage-card {
    min-height: 480px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(18px);
    padding: 32px 40px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.6);
}

.question-overlay {
    position: relative;
    z-index: 1;
}

.question-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.question-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.question-choices {
    list-style: none;
    display: grid;
    gap: 12px;
    padding: 0;
    margin-top: 32px;
}

.choice-display {
    background: rgba(15, 23, 42, 0.55);
    padding: 18px 22px;
    border-radius: 16px;
    font-size: 22px;
    color: #f8fafc;
}

.answer-progress {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

.stage-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

.leaderboard-note {
    margin-top: 16px;
    color: rgba(148, 163, 184, 0.8);
}

.player-container {
    max-width: 520px;
    padding-top: 32px;
}

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

.player-subtitle {
    color: #475569;
}

.player-card {
    margin-bottom: 24px;
}

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

.player-label {
    font-weight: 600;
    color: #1f2937;
}

.player-status {
    margin-top: 8px;
    min-height: 20px;
}

.player-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-question {
    margin-top: 24px;
}

.player-question-text {
    font-size: 24px;
    margin-bottom: 16px;
    color: #0f172a;
}

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

.player-choice-btn {
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid transparent;
    font-size: 18px;
    background: #1d4ed8;
    color: #fff;
    cursor: pointer;
    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

.player-choice-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(29, 78, 216, 0.3);
}

.choice-correct {
    background: #16a34a;
    border-color: #22c55e;
}

.choice-disabled {
    background: #cbd5f5;
    color: #475569;
    pointer-events: none;
    opacity: 0.7;
}

.player-feedback {
    margin-top: 16px;
    font-weight: 600;
    color: #0f172a;
}

.player-feedback.error {
    color: #dc2626;
}

.player-reset {
    margin-top: 24px;
    align-self: flex-start;
}

h1,
h2,
h3 {
    color: #1e293b;
}

a {
    color: #2563eb;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-weight: 600;
    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 12px rgba(37, 99, 235, 0.25);
}

input,
textarea,
select {
    width: 100%;
    padding: 10px;
    margin: 6px 0 16px;
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box;
}

textarea {
    min-height: 140px;
    font-family: monospace;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    margin: 24px 0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.flex {
    display: flex;
    gap: 24px;
}

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

.pill {
    display: inline-flex;
    align-items: center;
    background-color: #2563eb15;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 14px;
}

.notice {
    background-color: #eef2ff;
    border-left: 4px solid #6366f1;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

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

@media (min-width: 640px) {
    .choices-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.choice {
    border-radius: 12px;
    padding: 16px;
    background: #f1f5f9;
    border: 2px solid transparent;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.choice:hover {
    border-color: #3b82f6;
}

.choice.selected {
    border-color: #22c55e;
    background: #ecfdf5;
}

.leaderboard {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard th,
.leaderboard td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard tr:nth-child(even) {
    background-color: #f8fafc;
}

.status-tag {
    font-size: 15px;
    font-weight: 600;
    color: #10b981;
}

.error {
    color: #dc2626;
    font-weight: 600;
}

.question-card {
    border-radius: 18px;
    padding: 24px;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    opacity: 70%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.question-list-card.active {
    border: 2px solid #22c55e;
}
