* { box-sizing: border-box; }
body.bg-slate-900 {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1e293b 0, #020617 55%);
    color: #f9fafb;
}
.app-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.md\:flex-row { flex-direction: column; }
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
}
.gap-6 { gap: 1.5rem; }
.p-4 { padding: 1rem; }
.card {
    background: rgba(15,23,42,0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.6);
    border: 1px solid rgba(148,163,184,0.25);
}
.title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.subtitle {
    font-size: 1.1rem;
    font-weight: 600;
}
label {
    font-size: 0.85rem;
    margin-top: 8px;
    display: block;
}
.input {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #f9fafb;
}
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
}
.btn-primary {
    background: linear-gradient(90deg,#22c55e,#a3e635);
    color: #020617;
}
.btn-secondary {
    background: #0ea5e9;
    color: #020617;
}
.btn-option {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: rgba(15,23,42,0.8);
    color: #e5e7eb;
    text-align: left;
    cursor: pointer;
    transition: transform .1s, box-shadow .1s, border-color .1s, background .1s;
}
.btn-option.selected {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.4);
    background: rgba(22,163,74,0.15);
}
.w-full { width: 100%; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th, .table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(55,65,81,0.7);
}
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(14,165,233,0.15);
    color: #7dd3fc;
    font-size: 0.8rem;
}
.small { font-size: 0.8rem; opacity: 0.75; }
.alert, .error {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(56,189,248,0.1);
}
.error { background: rgba(248,113,113,0.15); }
.space-y-2 > * + * { margin-top: .5rem; }
/* --- Live leaderboard --- */
/* --- Live leaderboard (enhanced) --- */
.lb-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(34,197,94,0.18), transparent 55%),
        #020617;
}

.lb-card {
    width: 100%;
    max-width: 1120px;
    border-radius: 32px;
    border: 1px solid rgba(148,163,184,0.35);
    background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,0.98));
    box-shadow:
        0 32px 80px rgba(15,23,42,0.95),
        0 0 0 1px rgba(15,23,42,0.9);
    position: relative;
    overflow: hidden;
}
.lb-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(59,130,246,0.2), transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(34,197,94,0.12), transparent 50%);
    opacity: .7;
    pointer-events: none;
}
.lb-card > * {
    position: relative;
    z-index: 1;
}

.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.lb-eyebrow {
    font-size: 0.7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: .25rem;
}

.lb-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .55rem;
}

.lb-code {
    background: rgba(30,64,175,0.65);
    color: #e0f2fe;
}

.lb-copy-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.8);
    color: #e5e7eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: all 0.18s ease-out;
}
.lb-copy-btn:hover {
    border-color: #22c55e;
    box-shadow: 0 0 14px rgba(34,197,94,0.7);
    background: radial-gradient(circle at top left, rgba(34,197,94,0.16), rgba(15,23,42,0.95));
}
.lb-copy-ok {
    border-color: #22c55e;
    background: linear-gradient(90deg,#22c55e,#a3e635);
    color: #022c22;
}

.lb-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr);
    gap: 1.75rem;
}
@media (max-width: 900px) {
    .lb-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .lb-code-wrap {
        align-items: flex-start;
    }
    .lb-grid {
        grid-template-columns: 1fr;
    }
}

.lb-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .6rem;
}

.lb-chip {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(52,211,153,0.7);
    color: #6ee7b7;
    background: rgba(6,95,70,0.35);
}
.lb-chip-muted {
    border-color: rgba(148,163,184,0.7);
    color: #cbd5f5;
    background: rgba(15,23,42,0.5);
}

.lb-empty {
    font-size: 0.85rem;
    color: #9ca3af;
    padding: 0.75rem 0;
}

/* Scores list */
.lb-podium-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.lb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: radial-gradient(circle at left, rgba(15,23,42,0.95), rgba(15,23,42,0.98));
    border: 1px solid rgba(30,64,175,0.4);
    box-shadow: 0 14px 40px rgba(15,23,42,0.85);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    opacity: 1;
    animation: lb-pop-in 0.35s ease-out;
    transition: transform .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out, background .18s ease-out;
}
.lb-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(15,23,42,0.95);
}

.lb-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.lb-rank-badge {
    min-width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(148,163,184,0.9);
    color: #e5e7eb;
}

.lb-avatar {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e5e7eb;
    background: radial-gradient(circle at top, #1d4ed8, #0f172a);
    border: 1px solid rgba(129,140,248,0.7);
}
.lb-avatar span {
    transform: translateY(1px);
}

.lb-player-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.lb-player-name {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-player-sub {
    font-size: 0.75rem;
    color: #9ca3af;
}

.lb-right {
    display: flex;
    align-items: center;
}

.lb-score-chip {
    min-width: 4rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(90deg,#22c55e,#a3e635);
    color: #022c22;
    box-shadow: 0 0 16px rgba(34,197,94,0.85);
}

/* Rank-specific styles */
.lb-row.rank-1 {
    background: linear-gradient(90deg,#22c55e,#22c55e,#a3e635);
    border-color: rgba(190,242,100,0.9);
}
.lb-row.rank-1 .lb-player-name,
.lb-row.rank-1 .lb-player-sub {
    color: #052e16;
}
.lb-row.rank-1 .lb-rank-badge {
    background: rgba(4,120,87,0.97);
    border-color: #bbf7d0;
}
.lb-row.rank-1 .lb-avatar {
    background: radial-gradient(circle at top, #22c55e, #16a34a);
    border-color: #bbf7d0;
}
.lb-row.rank-2 {
    border-color: rgba(129,140,248,0.95);
}
.lb-row.rank-3 {
    border-color: rgba(251,191,36,0.9);
}
.lb-row.rank-2 .lb-rank-badge {
    background: rgba(30,64,175,0.98);
}
.lb-row.rank-3 .lb-rank-badge {
    background: rgba(161,98,7,0.98);
}

/* Progress panel */
.lb-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.lb-progress-item {
    padding: 0.35rem 0;
}

.lb-progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}
.lb-progress-name {
    font-weight: 500;
}
.lb-progress-count {
    color: #9ca3af;
}

.lb-progress-bar {
    width: 100%;
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    overflow: hidden;
}
.lb-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,#22c55e,#22c55e,#a3e635);
    box-shadow: 0 0 10px rgba(34,197,94,0.9);
    transition: width 0.32s ease-out;
}

@keyframes lb-pop-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* --- Play page styling --- */
.play-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1rem;
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.13), transparent 50%),
        radial-gradient(circle at bottom right, rgba(52,211,153,0.13), transparent 55%),
        #020617;
}

.play-card {
    width: 100%;
    max-width: 960px;
    border-radius: 32px;
    border: 1px solid rgba(148,163,184,0.35);
    background: radial-gradient(circle at top, rgba(15,23,42,0.97), rgba(15,23,42,0.99));
    box-shadow: 0 30px 80px rgba(15,23,42,0.95);
}

.play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.play-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.play-question-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #a5b4fc;
}

.play-subtext {
    font-size: 0.8rem;
    color: #9ca3af;
}

.play-header-right {
    display: flex;
    align-items: center;
}

.play-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.8);
    background: rgba(15,23,42,0.9);
    font-size: 0.8rem;
    color: #e5e7eb;
    box-shadow: 0 0 0 1px rgba(15,23,42,0.9);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}
.play-timer-icon {
    font-size: 0.9rem;
}
.play-timer-warning {
    border-color: #f97316;
    box-shadow: 0 0 14px rgba(249,115,22,0.6);
}
.play-timer-danger {
    border-color: #ef4444;
    box-shadow: 0 0 18px rgba(239,68,68,0.8);
    background: radial-gradient(circle at top, rgba(127,29,29,0.9), rgba(15,23,42,0.96));
    animation: play-pulse 0.55s ease-in-out infinite alternate;
}

.play-body {
    padding-top: 0.25rem;
}

.play-question-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.play-timer-bar-wrap {
    width: 100%;
    height: 0.32rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    overflow: hidden;
    margin-bottom: 1rem;
}

.play-timer-bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg,#22c55e,#22c55e,#a3e635);
    box-shadow: 0 0 10px rgba(34,197,94,0.7);
    transition: width 0.25s ease-out;
}

.play-options {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
}

.play-submit {
    width: 100%;
}

/* ensure drag/drop rows fit new design */
.drag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
    gap: 0.75rem;
}
.drag-left {
    flex: 1;
    font-size: 0.9rem;
}
.drag-right {
    width: 58%;
}

@media (max-width: 768px) {
    .play-card {
        border-radius: 24px;
    }
    .play-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .drag-right {
        width: 100%;
    }
}

/* fun but subtle pulse when time is low */
@keyframes play-pulse {
    from { transform: scale(1); }
    to   { transform: scale(1.04); }
}
/* --- Bigger Timer for Visibility --- */

.play-timer-big {
    font-size: 1.5rem;              /* Bigger text */
    padding: 0.55rem 1.3rem;        /* Bigger pill */
    border-radius: 16px;
    border-width: 2px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(15,23,42,0.85);
    color: #f0f9ff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 22px rgba(34,197,94,0.25);
    transition: all 0.25s ease;
}

/* Timer icon bigger */
.play-timer-big .play-timer-icon {
    font-size: 1.7rem;
}

/* Warning state (10s to 6s) */
.play-timer-big.play-timer-warning {
    border-color: #fb923c;
    box-shadow: 0 0 25px rgba(251,146,60,0.8);
    background: rgba(124,45,18,0.85);
    color: #fff4e6;
}

/* Danger state (5s to 0s) */
.play-timer-big.play-timer-danger {
    border-color: #ef4444;
    box-shadow: 0 0 28px rgba(239,68,68,1);
    background: linear-gradient(135deg, #7f1d1d, #450a0a);
    animation: timer-pulse 0.55s ease-in-out infinite alternate;
    color: #fee2e2;
}

/* Timer Bar should also be thicker */
.play-timer-bar-wrap {
    height: 0.5rem;
}

/* Pulse animation */
@keyframes timer-pulse {
    from { transform: scale(1); }
    to   { transform: scale(1.1); }
}

/* Responsive scaling on mobile */
@media (max-width: 768px) {
    .play-timer-big {
        font-size: 1.3rem;
        padding: 0.45rem 1.1rem;
    }
    .play-timer-big .play-timer-icon {
        font-size: 1.5rem;
    }
}

/* --- Final leaderboard (player view) --- */

.lb-final-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.12), transparent 55%),
        radial-gradient(circle at bottom right, rgba(34,197,94,0.12), transparent 60%),
        #020617;
}

.lb-final-card {
    width: 100%;
    max-width: 960px;
    border-radius: 32px;
    border: 1px solid rgba(148,163,184,0.35);
    background: radial-gradient(circle at top, rgba(15,23,42,0.97), rgba(15,23,42,0.99));
    box-shadow: 0 32px 90px rgba(15,23,42,0.95);
}

.lb-final-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.lb-final-empty {
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* --- Kahoot-style podium stage --- */

.lb-stage {
    position: relative;
    margin-top: 0.75rem;
    margin-bottom: 2.4rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.3rem;
    padding: 1.8rem 0 0.5rem;
}

.lb-stage-slot {
    position: relative;
    flex: 0 0 28%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Pedestal block */
.lb-stage-block {
    width: 100%;
    max-width: 220px;
    border-radius: 18px 18px 0 0;
    padding: 3.4rem 0.75rem 1.6rem;   /* more bottom padding */
    background: linear-gradient(180deg,#4c1d95,#1e1b4b);
    border: 2px solid rgba(191,219,254,0.75);
    box-shadow: 0 22px 50px rgba(15,23,42,0.9);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 190px;                /* let content define height */
}

.lb-stage-block::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top, rgba(248,250,252,0.18), transparent 60%);
    opacity: .7;
    pointer-events: none;
}

/* Different heights like a stage */
.lb-stage-slot.rank-1 .lb-stage-block {
    min-height: 230px;   /* taller center stage */
    background: linear-gradient(180deg,#6d28d9,#4c1d95);
}
.lb-stage-slot.rank-2 .lb-stage-block {
    min-height: 200px;
    background: linear-gradient(180deg,#312e81,#111827);
}
.lb-stage-slot.rank-3 .lb-stage-block {
    min-height: 185px;
    background: linear-gradient(180deg,#7c2d12,#1f2937);
}


/* Avatar bubble sitting above the stage */
.lb-stage-avatar {
    position: absolute;
    top: -52px;
    left: 50%;
    transform: translateX(-50%);
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: radial-gradient(circle at top, #f97316, #4c1d95);
    border: 3px solid #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 35px rgba(0,0,0,0.85);
}
.lb-stage-avatar span {
    font-size: 2rem;
    font-weight: 800;
    color: #f9fafb;
    transform: translateY(2px);
}
.lb-stage-slot.rank-2 .lb-stage-avatar {
    background: radial-gradient(circle at top, #e5e7eb, #1f2937);
}
.lb-stage-slot.rank-3 .lb-stage-avatar {
    background: radial-gradient(circle at top, #fbbf24, #7c2d12);
}

/* Medal + text */
.lb-stage-medal {
    font-size: 1.5rem;
    margin-bottom: 0.1rem;
}
.lb-stage-rank {
    font-size: 0.8rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #cbd5f5;
    margin-bottom: 0.2rem;
}
.lb-stage-name {
    font-size: 1rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-stage-score {
    font-size: 0.95rem;
    font-weight: 600;
    color: #bbf7d0;
    margin-bottom: 0.05rem;
}
.lb-stage-time {
    font-size: 0.8rem;
    color: #cbd5f5;
}

/* Little bounce-in animation for the podium */
.lb-stage-slot {
    animation: stage-pop 0.55s ease-out;
}
.lb-stage-slot.rank-1 {
    animation-delay: 0.1s;
}
.lb-stage-slot.rank-2 {
    animation-delay: 0.0s;
}
.lb-stage-slot.rank-3 {
    animation-delay: 0.2s;
}
@keyframes stage-pop {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .lb-stage {
        gap: 0.8rem;
    }
}
@media (max-width: 700px) {
    .lb-stage {
        flex-direction: column-reverse;
        align-items: center;
    }
    .lb-stage-slot {
        flex: 0 0 auto;
        width: 70%;
        max-width: 260px;
    }
}


/* Table */

.lb-final-table-wrap {
    border-radius: 20px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(31,41,55,0.9);
    padding: 0.75rem 1.25rem 1.1rem;
    overflow-x: auto;
}

.lb-final-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.lb-final-table thead tr {
    border-bottom: 1px solid rgba(55,65,81,0.9);
}
.lb-final-table th,
.lb-final-table td {
    padding: 0.55rem 0.25rem;
    text-align: left;
}
.lb-final-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #9ca3af;
}
.lb-final-table tbody tr {
    border-bottom: 1px solid rgba(30,41,59,0.75);
}
.lb-final-table tbody tr:last-child {
    border-bottom: none;
}
.lb-final-table tbody tr:hover {
    background: rgba(15,23,42,0.75);
}

/* highlight top 3 rows */

.lb-final-table .row-gold {
    background: rgba(251,191,36,0.08);
}
.lb-final-table .row-silver {
    background: rgba(148,163,184,0.1);
}
.lb-final-table .row-bronze {
    background: rgba(234,179,8,0.08);
}

/* Responsive */

@media (max-width: 900px) {
    .lb-final-card {
        border-radius: 24px;
    }
    .lb-final-podium {
        grid-template-columns: 1fr;
    }
    .lb-final-podium-item {
        padding: 0.9rem 0.8rem 1rem;
    }
}
.shuffle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.85rem;
    color: #e5e7eb;
    margin-top: 0.35rem;
}
.shuffle-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.shuffle-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
.link-small {
    font-size: 0.78rem;
    color: #a5b4fc;
    text-decoration: none;
}
.link-small:hover {
    text-decoration: underline;
}

.badge-mini {
    display: inline-block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    color: #9ca3af;
}

.btn-secondary-inline {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(59,130,246,0.7);
    font-size: 0.85rem;
    color: #e5e7eb;
    text-decoration: none;
}
.btn-secondary-inline:hover {
    background: rgba(37,99,235,0.25);
}
.shuffle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.85rem;
    color: #e5e7eb;
    margin-top: 0.35rem;
}
.shuffle-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.shuffle-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
/* Join card mobile tweaks */
.join-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Avatar grid */
.avatar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.avatar-pill {
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.9);
    padding: 0.3rem 0.7rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.18s ease-out;
}
.avatar-pill.active {
    border-color: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,0.8);
    background: radial-gradient(circle at top,#22c55e,#16a34a);
}

/* Lobby orbit animation */
.lobby-card {
    text-align: center;
}
.lobby-orbit {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 999px;
    border: 1px dashed rgba(148,163,184,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lobby-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34,197,94,0.9);
}
.lobby-dot.dot1 {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: orbit 1.2s linear infinite;
}
.lobby-dot.dot2 {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    animation: orbit 1.2s linear infinite 0.15s;
}
.lobby-dot.dot3 {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: orbit 1.2s linear infinite 0.3s;
}

@keyframes orbit {
    0%   { transform: translate(-50%, -50%) scale(1); }
    50%  { transform: translate(-50%, -50%) scale(1.4); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
.group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.group-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.7);
    font-size: 0.8rem;
}
.group-tag input {
    width: 14px;
    height: 14px;
}
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 30px;
}

.admin-sidebar {
    background: #0f172a;
    padding: 20px;
    border-radius: 16px;
}

.sidebar-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.menu-item {
    display: block;
    padding: 8px 0;
    color: #cbd5e1;
}

.menu-item.active {
    color: #fff;
    font-weight: bold;
}

.divider {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 20px 0;
}

.section-title {
    margin-bottom: 8px;
    font-weight: bold;
}

.input-file {
    background: #1e293b;
    padding: 8px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #334155;
}

.admin-main .card {
    background: #0f172a;
    padding: 25px;
    border-radius: 16px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.table th {
    text-align: left;
    padding: 10px;
    color: #94a3b8;
    border-bottom: 1px solid #1e293b;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #1e293b;
}

.badge {
    background: #1e40af;
    padding: 3px 8px;
    border-radius: 6px;
    color: #fff;
}

.status.running { color: #22c55e; }
.status.stopped { color: #ef4444; }

.stop { color: #ef4444; }
.stopped { color: #64748b; }

.group-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-check {
    display: flex;
    align-items: center;
    background: #1e293b;
    padding: 6px 10px;
    border-radius: 20px;
}
.tag-check input {
    margin-right: 6px;
}

.flash {
    background: #065f46;
    padding: 12px;
    color: #d1fae5;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stop {
    color: #f97316; /* orange for stop */
}

.stopped {
    color: #64748b;
}

.stop:hover {
    text-decoration: underline;
}
.btn-danger {
    @apply inline-flex items-center justify-center px-4 py-2 rounded-xl text-sm font-semibold;
    background: #ef4444;
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
}
.badge-orange { background:#f97316; color:#fff; padding:2px 8px; border-radius:9999px; font-size:11px; }
.badge-red    { background:#ef4444; color:#fff; padding:2px 8px; border-radius:9999px; font-size:11px; }
.badge-muted  { background:#475569; color:#e2e8f0; padding:2px 8px; border-radius:9999px; font-size:11px; }
.table-wrap   { max-height:60vh; overflow:auto; }
.truncate     { max-width:420px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* PLAY SCREEN IMPROVED FOR DESKTOP + MOBILE */
.play-shell {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.play-card {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    border-radius: 20px;
}

.play-question-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

/* Header row */
.play-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Timer */
.play-timer-big {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    padding: 0.6rem 1.2rem;
    border-radius: 16px;
}

/* Timer icon size */
.play-timer-icon {
    font-size: 1.5rem;
    margin-right: .4rem;
}

/* Question progress text */
.play-question-label {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 600;
}

/* Dropdowns */
.play-options select {
    width: 100%;
    font-size: clamp(1rem, 3vw, 1.1rem);
    padding: 0.8rem;
    border-radius: 14px;
    margin-bottom: 1rem;
}

/* Submit / Exit buttons */
#submitBtn, #exitBtn {
    font-size: clamp(1rem, 3vw, 1.2rem);
    padding: 1rem;
    height: auto;
    border-radius: 14px;
}

/* Timer bar */
.play-timer-bar-wrap {
    height: 10px;
    border-radius: 6px;
    margin: 1rem 0 2rem 0;
    overflow: hidden;
}

.play-timer-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .play-card {
        padding: 1.4rem;
        border-radius: 14px;
    }

    .play-options select {
        padding: 0.7rem;
        margin-bottom: 1rem;
    }
}
/* Centered top logo */
.play-logo-center {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 15px;
}

.play-logo-img {
    max-width: 160px;
    width: 35%;
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0px 0px 6px rgba(0,0,0,0.4));
}

@media (max-width: 600px) {
    .play-logo-img {
        max-width: 130px;
        width: 50%;
    }
}

