:root {
    --bg-primary: #1a1a2e;
    --bg-card: #16213e;
    --bg-accent: #0f3460;
    --color-primary: #e94560;
    --color-success: #00b894;
    --text-primary: #eee;
    --text-secondary: #888;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

h1 { text-align: center; font-size: 2.5em; margin-bottom: 10px; background: linear-gradient(135deg, #e94560, #0f3460); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { text-align: center; color: #e94560; margin-bottom: 20px; }
.subtitle { text-align: center; color: #888; margin-bottom: 30px; }

.card { background: #16213e; border-radius: 16px; padding: 30px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.card-compact { padding: 15px 20px; }

input[type="text"], input[type="password"] {
    width: 100%; padding: 14px 18px; border: 2px solid #0f3460; border-radius: 10px;
    background: #1a1a2e; color: #eee; font-size: 1.1em; margin-bottom: 15px; outline: none;
}
input:focus { border-color: #e94560; }

.btn {
    display: inline-block; padding: 14px 32px; border: none; border-radius: 10px;
    font-size: 1.1em; font-weight: 600; cursor: pointer; transition: all 0.2s;
    text-decoration: none; text-align: center; color: #fff;
}
.btn-primary { background: linear-gradient(135deg, #e94560, #c23152); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(233,69,96,0.4); }
.btn-secondary { background: #0f3460; }
.btn-secondary:hover { background: #1a4a8a; }
.btn-success { background: linear-gradient(135deg, #00b894, #00a381); }
.btn-success:hover { transform: translateY(-2px); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.9em; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.team-card { text-align: center; padding: 20px; }
.team-card img, .team-card .avatar { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 10px; }
.team-name { font-size: 1.3em; font-weight: 700; margin-bottom: 5px; }
.team-score { font-size: 2em; font-weight: 800; color: #e94560; }
.team-card-mine { border: 2px solid var(--color-primary) !important; box-shadow: 0 0 10px rgba(233,69,96,0.3); }
.team-card-clickable { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.team-card-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(233,69,96,0.2); }

.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.question-counter { color: #888; font-size: 0.9em; }
.difficulty { padding: 4px 12px; border-radius: 20px; font-size: 0.8em; font-weight: 600; }
.diff-1 { background: #00b894; color: #fff; }
.diff-2 { background: #fdcb6e; color: #333; }
.diff-3 { background: #e94560; color: #fff; }

.question-text { font-size: 1.4em; font-weight: 600; margin-bottom: 20px; line-height: 1.4; }
.question-image { max-width: 100%; max-height: 300px; border-radius: 12px; margin-bottom: 20px; display: block; margin-left: auto; margin-right: auto; }

.timer-circle-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}
.timer-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.timer-circle-bg {
    fill: none;
    stroke: var(--bg-accent);
    stroke-width: 6;
}
.timer-circle-fill {
    fill: none;
    stroke: #00b894;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s;
}
.timer-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-primary);
}

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-btn {
    padding: 18px 20px; border: 2px solid #0f3460; border-radius: 12px;
    background: #1a1a2e; color: #eee; font-size: 1.1em; cursor: pointer;
    transition: all 0.2s; text-align: left;
}
.option-btn:hover { border-color: #e94560; background: #1e2a4a; }
.option-btn.selected { border-color: #e94560; background: #e94560; color: #fff; }
.option-btn.correct { border-color: #00b894; background: #00b894; color: #fff; }
.option-btn.wrong { border-color: #e94560; background: #c23152; color: #fff; opacity: 0.7; }
.option-btn:disabled { cursor: not-allowed; }

.reveal-box { background: #0f3460; border-radius: 12px; padding: 20px; margin-top: 20px; }
.reveal-correct { color: #00b894; font-weight: 700; font-size: 1.2em; margin-bottom: 10px; }
.reveal-explanation { color: #ccc; font-style: italic; line-height: 1.5; }
.reveal-answers { margin-top: 15px; }
.reveal-answer { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.reveal-answer .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-correct { background: #00b894; }
.dot-wrong { background: #e94560; }

.waiting-text { text-align: center; color: #888; font-size: 1.2em; padding: 40px; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.tip-block { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; background: rgba(0,184,148,0.07); border: 1px solid rgba(0,184,148,0.18); border-radius: 12px; }
.tip-icon { font-size: 1.5em; line-height: 1; flex-shrink: 0; }
.tip-body { flex: 1; }
.tip-title { font-weight: 700; color: #00b894; margin-bottom: 4px; font-size: 0.95em; }
.tip-text { color: #b0b0b0; font-size: 0.88em; line-height: 1.45; }

.results-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.results-table th, .results-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #0f3460; }
.results-table th { color: #888; font-weight: 600; }
.winner { color: #00b894; font-weight: 700; }

/* Admin */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px; text-align: left; border-bottom: 1px solid #0f3460; font-size: 0.9em; }
.admin-table th { color: #888; }
.admin-actions { display: flex; gap: 8px; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #16213e; border-radius: 16px; padding: 30px; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 20px; color: #e94560; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: #888; font-size: 0.9em; }
select { width: 100%; padding: 10px; border: 2px solid #0f3460; border-radius: 8px; background: #1a1a2e; color: #eee; font-size: 1em; }

.error { color: #e94560; text-align: center; margin: 10px 0; }
.success { color: #00b894; text-align: center; margin: 10px 0; }

/* Lobby layout */
.lobby-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.lobby-main { flex: 1; min-width: 0; }
.lobby-sidebar { width: 280px; flex-shrink: 0; }
.lobby-header {
    margin-bottom: 25px;
}
.lobby-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.lobby-header h1 { margin-bottom: 0; font-size: 2em; }
.lobby-auth-bar { display: flex; align-items: center; gap: 12px; }
.player-label { color: var(--text-secondary); font-size: 0.95em; }
.header-logo { height: 48px; width: auto; border-radius: 8px; flex-shrink: 0; }

/* Auth card */
.auth-card { max-width: 400px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--bg-accent); }
.auth-tab {
    padding: 10px 18px; background: none; border: none; color: var(--text-secondary);
    font-size: 0.95em; cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.2s;
}
.auth-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.auth-tab:hover { color: var(--text-primary); }
.auth-tab-content { display: flex; flex-direction: column; gap: 0; }
.auth-tab-content input { margin-bottom: 12px; }

/* Room cards */
.room-card { padding: 20px; }
.room-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 15px; flex-wrap: wrap;
}
.room-name {
    font-size: 1.15em; font-weight: 700; color: var(--text-primary);
}
.room-code {
    font-family: monospace; font-size: 0.85em; font-weight: 600;
    background: var(--bg-accent); padding: 3px 10px; border-radius: 8px;
    letter-spacing: 2px; color: var(--text-secondary);
}
.room-status {
    padding: 4px 12px; border-radius: 20px; font-size: 0.8em; font-weight: 600;
}
.status-waiting { background: var(--color-success); color: #fff; }
.status-active { background: var(--color-primary); color: #fff; }
.room-topic { color: var(--text-secondary); font-size: 0.9em; }

.room-teams {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px;
}
.room-team {
    background: var(--bg-primary); border-radius: 10px; padding: 12px;
}
.room-team strong { display: block; margin-bottom: 4px; color: var(--text-secondary); font-size: 0.85em; }
.room-team span { display: block; font-size: 0.95em; }
.team-score-small {
    font-size: 1.1em; font-weight: 700; color: var(--color-primary); margin-top: 4px;
}

.room-footer {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.observers-count { color: var(--text-secondary); font-size: 0.85em; }
.room-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sidebar */
.sidebar-section {
    background: var(--bg-card); border-radius: 16px; padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.sidebar-sticky {
    position: sticky;
    top: 10px;
    z-index: 10;
}
.sidebar-section h3 {
    color: var(--color-primary); margin-bottom: 15px; font-size: 1.1em;
}
.leaderboard-item {
    display: flex; align-items: center; padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.leaderboard-item:last-child { border-bottom: none; }
.lb-rank {
    width: 28px; height: 28px; border-radius: 50%; background: var(--bg-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8em; font-weight: 700; margin-right: 12px; flex-shrink: 0;
}
.lb-rank:first-child { background: var(--color-primary); }
.leaderboard-item:nth-child(1) .lb-rank { background: #ffd700; color: #333; }
.leaderboard-item:nth-child(2) .lb-rank { background: #c0c0c0; color: #333; }
.leaderboard-item:nth-child(3) .lb-rank { background: #cd7f32; color: #fff; }
.lb-name { flex: 1; font-size: 0.95em; }
.lb-score { font-weight: 700; color: var(--color-primary); }
.leaderboard-empty { color: var(--text-secondary); text-align: center; padding: 20px 0; font-size: 0.9em; }

/* Room page */
#game-area {
    max-width: 900px;
    margin: 0 auto;
}

#top-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.room-top-info { display: flex; align-items: center; gap: 12px; }
.room-code-badge {
    font-family: monospace; font-size: 1.1em; font-weight: 700;
    background: var(--bg-accent); padding: 6px 14px; border-radius: 8px;
    letter-spacing: 2px;
}
.role-badge {
    padding: 4px 12px; border-radius: 20px; font-size: 0.8em; font-weight: 600;
}
.role-player { background: var(--color-success); color: #fff; }
.role-observer { background: #fdcb6e; color: #333; }

.room-scores-bar {
    display: flex; align-items: center; gap: 20px;
}
.score-team { text-align: center; }
.score-label { display: block; font-size: 0.75em; color: var(--text-secondary); }
.score-value { font-size: 1.8em; font-weight: 800; color: var(--color-primary); }
.score-vs { color: var(--text-secondary); font-weight: 600; }

.option-readonly {
    cursor: default; opacity: 0.7;
}
.option-readonly:hover { border-color: var(--bg-accent); background: var(--bg-primary); }

.team-members { color: var(--text-secondary); font-size: 0.9em; margin-top: 5px; }
.member-item { display: inline-flex; align-items: center; gap: 4px; }

/* Email input type */
input[type="email"] {
    width: 100%; padding: 14px 18px; border: 2px solid var(--bg-accent); border-radius: 10px;
    background: var(--bg-primary); color: var(--text-primary); font-size: 1.1em; margin-bottom: 15px; outline: none;
}
input[type="email"]:focus { border-color: var(--color-primary); }

@media (max-width: 800px) {
    .lobby-layout { flex-direction: column; }
    .lobby-sidebar { width: 100%; }
}

@media (max-width: 600px) {
    .options-grid { grid-template-columns: 1fr; }
    .teams-grid { grid-template-columns: 1fr; }
    .room-teams { grid-template-columns: 1fr; }
    h1 { font-size: 1.8em; }
    .lobby-header h1 { font-size: 1.5em; }
    .header-logo { height: 36px; }
}

/* Admin sidebar layout */
.admin-layout {
    display: flex;
    gap: 0;
    min-height: 100vh;
    margin: -20px;
}
.admin-sidebar {
    width: 220px;
    background: var(--bg-card);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid var(--bg-accent);
}
.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--bg-accent);
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1.1em;
}
.admin-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2em;
}
.admin-nav-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-nav-btn:hover {
    background: var(--bg-accent);
    color: var(--text-primary);
}
.admin-nav-btn.active {
    color: var(--color-primary);
    background: rgba(233,69,96,0.08);
    border-right: 3px solid var(--color-primary);
}
.admin-sidebar-footer {
    margin-top: auto;
    padding: 20px;
}
.admin-content {
    flex: 1;
    padding: 30px;
    min-width: 0;
    overflow-y: auto;
}
.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-section-header h2 {
    margin-bottom: 0;
    text-align: left;
}

/* Topic cards */
.topic-card {
    background: var(--bg-accent);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}
.topic-inactive { opacity: 0.5; }
.topic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.topic-name { font-weight: 700; font-size: 1.05em; }
.topic-count { color: var(--text-secondary); font-size: 0.85em; }
.topic-card-desc { color: var(--text-secondary); font-size: 0.9em; margin-bottom: 12px; }
.topic-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-warn { background: #e67e22; }
.btn-warn:hover { background: #d35400; }

/* Question card grid */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.question-card {
    background: var(--bg-accent);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.2s;
}
.question-inactive { opacity: 0.45; }
.question-card-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: var(--bg-primary);
}
.question-card-body { padding: 14px 16px; }
.question-card-text {
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.question-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85em;
}
.question-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
    flex-wrap: wrap;
}

/* Question edit modal — image block */
.q-edit-image-block {
    margin-bottom: 20px;
    text-align: center;
}
.q-edit-thumb {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--bg-primary);
}
.q-edit-image-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Correct answer toggle in modal */
.q-opt-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.q-opt-row input { flex: 1; margin-bottom: 0; }
.q-correct-toggle {
    width: 40px;
    height: 40px;
    border: 2px solid var(--bg-accent);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.q-correct-toggle:hover { border-color: var(--color-success); }
.q-correct-toggle.active {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
}

/* Image browser modal */
.image-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}
.image-browser-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
    border: 2px solid transparent;
    transition: border-color 0.15s;
    text-align: center;
}
.image-browser-item:hover { border-color: var(--color-primary); }
.image-browser-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}
.image-browser-item span {
    display: block;
    padding: 4px;
    font-size: 0.7em;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Topic select cards */
.topic-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.topic-select-card {
    background: var(--bg-accent);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.topic-select-card:hover { border-color: var(--color-primary); }
.topic-select-card.selected { border-color: var(--color-primary); background: rgba(233,69,96,0.1); }
.topic-select-name { font-weight: 700; margin-bottom: 4px; }
.topic-select-count { color: var(--text-secondary); font-size: 0.85em; }

/* Voting sidebar */
.vote-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.vote-item:last-child { border-bottom: none; }
.vote-item-info { flex: 1; min-width: 0; }
.vote-item-name { display: block; font-weight: 600; font-size: 0.9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-item-author { color: var(--text-secondary); font-size: 0.75em; }
.vote-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vote-arrow {
    width: 28px; height: 28px; border: none; border-radius: 6px;
    background: var(--bg-primary); color: var(--text-secondary);
    font-size: 0.8em; cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.vote-arrow:hover { color: var(--color-primary); background: var(--bg-accent); }
.vote-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.vote-arrow.voted { opacity: 0.3; pointer-events: none; }
.vote-item-rating { font-weight: 700; font-size: 0.9em; min-width: 30px; text-align: center; }

/* Vote cards (admin panel) */
.vote-card {
    padding: 12px 16px;
    background: var(--bg-accent);
    border-radius: 10px;
    margin-bottom: 8px;
}
.vote-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.vote-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vote-card-status {
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}
.vote-rating {
    font-weight: 700;
    color: var(--color-primary);
    min-width: 40px;
    text-align: center;
    white-space: nowrap;
}
.vote-author {
    color: var(--text-secondary);
    font-size: 0.85em;
    white-space: nowrap;
}
.vote-date {
    color: var(--text-secondary);
    font-size: 0.8em;
    white-space: nowrap;
}
.vote-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

@media (max-width: 800px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid var(--bg-accent);
    }
    .admin-sidebar-header { padding: 0 10px 10px; border-bottom: none; margin-bottom: 0; }
    .admin-nav-btn {
        padding: 8px 14px;
        border-right: none !important;
    }
    .admin-nav-btn.active { border-right: none; border-bottom: 2px solid var(--color-primary); }
    .admin-sidebar-footer { margin-top: 0; padding: 10px; width: 100%; }
    .admin-content { padding: 20px; }
    .questions-grid { grid-template-columns: 1fr; }
}

/* Stats cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.stat-value {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--color-primary);
}
.stat-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Reading progress bar */
.reading-progress-wrap {
    margin-top: 15px;
    background: var(--bg-accent);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
}
.reading-progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 8px;
    transition: width 0.1s linear;
}
.reading-label {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-top: 8px;
}

/* Waiting spinner */
.waiting-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-accent);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
