/* CSS Variables - Claude Code Branding */
:root {
    /* Brand colors (constant) */
    --claude-coral: #D4836A;
    --claude-coral-light: #E09880;
    --claude-coral-dark: #C4735A;
    --claude-cream: #FAF9F6;
    --accent-green: #4ADE80;
    --accent-red: #F87171;

    /* Theme colors (dark mode default) */
    --bg-primary: #1C1917;
    --bg-secondary: #292524;
    --bg-card: #2D2926;
    --bg-input: #1C1917;
    --text-primary: #FAF9F6;
    --text-secondary: #A8A29E;
    --text-muted: #78716C;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

    /* Legacy aliases */
    --claude-dark: var(--bg-primary);
    --claude-dark-lighter: var(--bg-secondary);
    --claude-dark-card: var(--bg-card);

    /* Typography & Layout */
    --font-display: 'Lora', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode */
[data-theme="light"] {
    --bg-primary: #FAF9F6;
    --bg-secondary: #F5F3EF;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --text-primary: #1C1917;
    --text-secondary: #57534E;
    --text-muted: #A8A29E;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Light Mode - Quiz Overrides */
[data-theme="light"] .active-quiz-container {
    border-bottom-color: rgba(0, 0, 0, 0.1);
    background: var(--bg-secondary);
}

[data-theme="light"] .quiz-card {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .quiz-card.quiz-ended {
    background: rgba(251, 191, 36, 0.12);
}

[data-theme="light"] .quiz-option {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .quiz-option:hover:not(:disabled) {
    background: rgba(212, 131, 106, 0.12);
}

[data-theme="light"] .quiz-option.selected {
    background: rgba(212, 131, 106, 0.15);
}

[data-theme="light"] .quiz-option-letter {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .quiz-timer {
    background: rgba(212, 131, 106, 0.15);
}

[data-theme="light"] .quiz-timer.urgent {
    background: rgba(248, 113, 113, 0.15);
}

[data-theme="light"] .quiz-waiting {
    background: rgba(74, 222, 128, 0.12);
}

[data-theme="light"] .quiz-result-status.correct {
    background: rgba(74, 222, 128, 0.12);
}

[data-theme="light"] .quiz-result-status.incorrect {
    background: rgba(248, 113, 113, 0.12);
}

[data-theme="light"] .quiz-question-image {
    background: rgba(0, 0, 0, 0.05);
}

/* Light Mode - Quiz Lobby Overrides */
[data-theme="light"] .quiz-lobby {
    background: linear-gradient(135deg, #F5F3EF 0%, #FFFFFF 100%);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .quiz-lobby-waiting {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .quiz-lobby-spinner {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--claude-coral);
}

[data-theme="light"] .lobby-bubble {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .lobby-count-number {
    text-shadow: 0 0 30px rgba(212, 131, 106, 0.3);
}

/* Light Mode - Quiz Leaderboard */
[data-theme="light"] .quiz-leaderboard-row {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .quiz-leaderboard-row.current-user {
    background: rgba(212, 131, 106, 0.12);
}

[data-theme="light"] .quiz-leaderboard-row.gold {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.08));
}

[data-theme="light"] .quiz-leaderboard-row.silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.1));
}

[data-theme="light"] .quiz-leaderboard-row.bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.08));
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Container - Fixed Screen */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.claude-icon {
    width: 24px;
    height: 24px;
    color: var(--claude-coral);
}

.session-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sound-toggle,
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.sound-toggle:hover,
.theme-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sound-toggle:active,
.theme-toggle:active {
    transform: scale(0.95);
}

.sound-toggle svg,
.theme-toggle svg {
    width: 16px;
    height: 16px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Screens */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

/* Welcome Screen */
.welcome-screen {
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(180deg, var(--claude-dark) 0%, var(--claude-dark-lighter) 100%);
}

.welcome-content {
    text-align: center;
    max-width: 360px;
}

.welcome-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: rgba(212, 131, 106, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-icon svg {
    width: 36px;
    height: 36px;
    color: var(--claude-coral);
}

.welcome-content h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1rem;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.join-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.join-form input:focus {
    border-color: var(--claude-coral);
}

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

/* Tab Navigation */
.tab-nav {
    display: flex;
    background: var(--claude-dark-lighter);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: relative;
}

/* Sliding tab indicator */
.tab-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: var(--claude-coral);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
    position: relative;
}

.tab-btn:active {
    transform: scale(0.97);
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.tab-btn:hover svg {
    transform: scale(1.1);
}

.tab-btn.active {
    color: var(--claude-coral);
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

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

/* Questions Header */
.questions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.question-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.sort-btn svg {
    width: 14px;
    height: 14px;
}

.sort-btn:hover {
    border-color: var(--claude-coral);
    color: var(--text-primary);
}

/* Questions List */
.questions-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.empty-state span {
    font-size: 0.85rem;
}

/* Question Card */
.question-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--claude-dark-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.question-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.question-card.answered {
    opacity: 0.6;
    border-color: var(--accent-green);
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.vote-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.vote-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vote-btn:hover {
    background: rgba(212, 131, 106, 0.15);
    border-color: var(--claude-coral);
    color: var(--claude-coral);
}

.vote-btn:hover svg {
    transform: translateY(-2px);
}

.vote-btn:active {
    transform: scale(0.9);
}

.vote-btn:active svg {
    transform: translateY(-4px) scale(1.1);
}

.vote-btn.voted {
    background: var(--claude-coral);
    border-color: var(--claude-coral);
    color: var(--claude-dark);
}

.vote-btn.voted svg {
    animation: votePopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Vote pop animation */
@keyframes votePopIn {
    0% { transform: scale(0.5) translateY(0); }
    50% { transform: scale(1.3) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

.vote-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.question-content {
    flex: 1;
    min-width: 0;
}

.question-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.question-author {
    color: var(--text-secondary);
}

.pending-label {
    color: #f0ad4e;
    font-size: 0.7rem;
    background: rgba(240, 173, 78, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.question-card.pending {
    border-color: rgba(240, 173, 78, 0.3);
}

/* Emoji Reactions */
.reactions-bar {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.reaction-btn:active {
    transform: scale(0.95);
}

.reaction-btn.active {
    background: rgba(212, 131, 106, 0.2);
    border-color: var(--claude-coral);
}

.reaction-btn.active .reaction-emoji {
    animation: reactionPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reactionPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.reaction-emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.reaction-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.reaction-btn.active .reaction-count {
    color: var(--claude-coral);
}

/* Ask Form */
.ask-form {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ask-form h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.ask-form > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.ask-form textarea {
    flex: 1;
    min-height: 120px;
    max-height: 200px;
    padding: 16px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: var(--transition);
}

.ask-form textarea:focus {
    border-color: var(--claude-coral);
}

.ask-form textarea::placeholder {
    color: var(--text-muted);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 8px 0;
}

/* Waiting Screen */
.waiting-screen {
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: var(--claude-dark);
}

.waiting-content {
    text-align: center;
}

.pulse-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-icon svg {
    width: 64px;
    height: 64px;
    color: var(--claude-coral);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.waiting-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.waiting-content p {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--claude-coral);
    color: var(--claude-dark);
}

.btn-primary:hover {
    background: var(--claude-coral-light);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #ef4444;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.05rem;
    width: 100%;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.exiting {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
}

.toast.success {
    border-color: var(--accent-green);
}

.toast.error {
    border-color: var(--accent-red);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Keyboard Shortcuts Help */
.shortcuts-help {
    text-align: left;
    min-width: 200px;
}

.shortcuts-help h3 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--claude-coral);
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

kbd {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    min-width: 24px;
    text-align: center;
}

/* =========================
   AUTH GATE
   ========================= */

.auth-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--claude-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-content {
    text-align: center;
    padding: 40px;
    max-width: 360px;
}

.auth-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-icon svg {
    width: 64px;
    height: 64px;
    color: var(--claude-coral);
}

.auth-content h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-content > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.auth-content form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-content input {
    width: 100%;
    padding: 14px 16px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: center;
    outline: none;
    transition: var(--transition);
}

.auth-content input:focus {
    border-color: var(--claude-coral);
}

.auth-error {
    color: var(--accent-red);
    font-size: 0.875rem;
    margin-top: 12px;
    min-height: 20px;
}

/* =========================
   ADMIN STYLES
   ========================= */

.admin-body {
    background: var(--claude-dark);
}

.admin-app {
    background: var(--claude-dark);
}

.admin-header {
    padding: 12px 20px;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.participant-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--claude-dark-card);
    border-radius: var(--radius-sm);
}

/* Admin Toolbar */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--claude-dark-lighter);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 12px;
}

.session-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.control-btn svg {
    width: 16px;
    height: 16px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.control-btn.danger:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.control-btn.active {
    background: var(--claude-coral);
    border-color: var(--claude-coral);
    color: var(--claude-dark);
}

.view-controls {
    display: flex;
    gap: 4px;
    background: var(--claude-dark-card);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.view-btn {
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

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

.view-btn.active {
    background: var(--claude-coral);
    color: var(--claude-dark);
}

/* Admin Content */
.admin-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.admin-view {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.admin-view.active {
    display: flex;
}

/* Admin Questions List */
.admin-questions-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
}

.filter-select {
    padding: 6px 12px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
}

/* Admin Question Card */
.admin-question-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--claude-dark-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.admin-question-card.hidden {
    opacity: 0.5;
    border-style: dashed;
}

.admin-question-card.answered {
    border-color: var(--accent-green);
}

.admin-question-card.featured {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.08);
}

.admin-vote-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.admin-vote-count .count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--claude-coral);
}

.admin-vote-count .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.admin-question-content {
    flex: 1;
    min-width: 0;
}

.admin-question-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.admin-question-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-question-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.action-btn.feature:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
}

.action-btn.feature.active {
    background: var(--claude-coral);
    border-color: var(--claude-coral);
    color: var(--claude-dark);
}

.action-btn.answer:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.action-btn.answer.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--claude-dark);
}

.action-btn.hide:hover {
    border-color: var(--text-muted);
}

.action-btn.hide.active {
    background: var(--text-muted);
    color: var(--claude-dark);
}

.action-btn.delete:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.action-btn.presenter {
    border-color: #9333EA;
    color: #9333EA;
}

.action-btn.presenter:hover {
    background: #9333EA;
    color: #fff;
}

/* Display View */
.display-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    background: var(--claude-dark);
    overflow: hidden;
}

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

.display-header h1 {
    font-size: 2rem;
    color: var(--claude-coral);
}

.display-qr {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder {
    text-align: center;
    color: var(--claude-dark);
    font-size: 0.7rem;
    font-weight: 600;
}

.display-questions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.display-question {
    background: var(--claude-dark-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.display-question.featured {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.1);
}

.display-question .question-text {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 16px;
}

.display-question .question-meta {
    font-size: 1rem;
}

.display-question .vote-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--claude-coral);
    color: var(--claude-dark);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.display-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 1.25rem;
}

.display-queue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.display-queue .display-question {
    padding: 20px;
}

.display-queue .question-text {
    font-size: 1rem;
}

.display-footer {
    padding-top: 20px;
    text-align: center;
}

.display-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--claude-dark-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animate question cards with stagger support */
.question-card {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Stagger animation delays via CSS custom property */
.question-card:nth-child(1) { animation-delay: 0ms; }
.question-card:nth-child(2) { animation-delay: 50ms; }
.question-card:nth-child(3) { animation-delay: 100ms; }
.question-card:nth-child(4) { animation-delay: 150ms; }
.question-card:nth-child(5) { animation-delay: 200ms; }
.question-card:nth-child(6) { animation-delay: 250ms; }
.question-card:nth-child(7) { animation-delay: 300ms; }
.question-card:nth-child(8) { animation-delay: 350ms; }
.question-card:nth-child(n+9) { animation-delay: 400ms; }

/* New question highlight */
.question-card.new-question {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1), newQuestionPulse 0.6s ease-out 0.4s;
}

@keyframes newQuestionPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 131, 106, 0.4); }
    100% { box-shadow: 0 0 0 12px rgba(212, 131, 106, 0); }
}

.admin-question-card {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.admin-question-card:nth-child(1) { animation-delay: 0ms; }
.admin-question-card:nth-child(2) { animation-delay: 40ms; }
.admin-question-card:nth-child(3) { animation-delay: 80ms; }
.admin-question-card:nth-child(4) { animation-delay: 120ms; }
.admin-question-card:nth-child(5) { animation-delay: 160ms; }
.admin-question-card:nth-child(n+6) { animation-delay: 200ms; }

/* Animate screen transitions */
.screen {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.active {
    opacity: 1;
    transform: translateY(0);
}

/* Welcome to questions screen transition */
.screen.slide-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
}

.screen.slide-in {
    animation: screenSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes screenSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animate tab content */
.tab-content.active {
    animation: fadeIn 0.2s ease-out;
}

/* Animate modals */
.modal.active .modal-content {
    animation: scaleIn 0.25s ease-out;
}

/* =========================
   POLL STYLES - AUDIENCE
   ========================= */

.active-poll-container {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--claude-dark-lighter);
    animation: slideDown 0.4s ease-out;
}

.active-poll-container.hiding {
    animation: slideUp 0.3s ease-out reverse forwards;
}

.poll-card {
    background: var(--claude-dark-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 2px solid var(--claude-coral);
}

.poll-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--claude-coral);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.poll-question {
    font-size: 1.1rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    text-align: left;
    width: 100%;
}

.poll-option:hover:not(:disabled) {
    background: rgba(212, 131, 106, 0.15);
    border-color: var(--claude-coral);
}

.poll-option:disabled {
    cursor: default;
}

.poll-option.selected {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.2);
}

.poll-option-text {
    position: relative;
    z-index: 1;
}

.poll-option-percent {
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: var(--claude-coral);
}

.poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(212, 131, 106, 0.2);
    transition: width 0.5s ease-out;
}

.poll-option.selected .poll-option-bar {
    background: rgba(212, 131, 106, 0.3);
}

.poll-total {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* Completed Poll Styles */
.poll-card.completed {
    border-color: var(--accent-green);
}

.poll-card.completed .poll-header {
    color: var(--accent-green);
}

.poll-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-green);
    color: var(--claude-dark);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.poll-completed-badge svg {
    width: 14px;
    height: 14px;
}

/* =========================
   POLL STYLES - ADMIN
   ========================= */

.admin-tabs {
    display: flex;
    background: var(--claude-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.admin-tab:hover {
    color: var(--text-secondary);
}

.admin-tab.active {
    color: var(--claude-coral);
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--claude-coral);
}

.polls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-polls-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
}

.admin-poll-card {
    background: var(--claude-dark-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-poll-card.active {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.08);
}

.admin-poll-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-poll-header h4 {
    font-size: 1.1rem;
    line-height: 1.4;
    flex: 1;
}

.admin-poll-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.admin-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-poll-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.admin-poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(212, 131, 106, 0.2);
    transition: width 0.3s ease-out;
}

.admin-poll-option-text {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
}

.admin-poll-option-votes {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.admin-poll-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.poll-live-badge {
    background: var(--claude-coral);
    color: var(--claude-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.poll-completed-badge-admin {
    background: var(--accent-green);
    color: var(--claude-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.admin-poll-card.completed {
    border-color: var(--accent-green);
    opacity: 0.8;
}

/* Poll Modal */
.poll-modal-content {
    max-width: 480px;
}

.poll-form {
    margin-bottom: 20px;
}

.poll-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-top: 16px;
}

.poll-form label:first-child {
    margin-top: 0;
}

.poll-form input {
    width: 100%;
    padding: 12px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.poll-form input:focus {
    border-color: var(--claude-coral);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.poll-option-input {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-toolbar {
        padding: 12px;
    }

    .session-controls {
        width: 100%;
        justify-content: space-between;
    }

    .control-btn span {
        display: none;
    }

    .control-btn {
        padding: 10px 12px;
    }

    .display-container {
        padding: 20px;
    }

    .display-header h1 {
        font-size: 1.5rem;
    }

    .display-question .question-text {
        font-size: 1.2rem;
    }
}

@media (min-width: 769px) {
    .app:not(.admin-app):not(.homepage-app) {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        border-right: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* =========================
   HOMEPAGE STYLES
   ========================= */

.homepage-app {
    max-width: 600px;
    margin: 0 auto;
}

.homepage-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.homepage-hero {
    text-align: center;
    max-width: 400px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(212, 131, 106, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon svg {
    width: 40px;
    height: 40px;
    color: var(--claude-coral);
}

.homepage-hero h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.homepage-hero > p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.homepage-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.homepage-actions .btn {
    justify-content: center;
}

.homepage-admin-link {
    margin-top: 32px;
}

.homepage-admin-link a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.homepage-admin-link a:hover {
    color: var(--claude-coral);
}

/* Form Group */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--claude-coral);
}

.form-error {
    color: var(--accent-red);
    font-size: 0.85rem;
    margin-bottom: 16px;
    min-height: 20px;
}

/* =========================
   SESSION CODE DISPLAY
   ========================= */

.session-code-display {
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.session-code-display .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.session-code-display .code {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--claude-coral);
    letter-spacing: 4px;
}

/* Session Code Badge in Admin Header */
.session-code-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--claude-dark-card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(212, 131, 106, 0.3);
}

.session-code-badge .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-code-badge .code {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--claude-coral);
    letter-spacing: 2px;
}

/* =========================
   QR CODE MODAL
   ========================= */

.qr-modal-content {
    max-width: 360px;
    text-align: center;
}

.qr-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 20px auto;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-container svg {
    width: 100% !important;
    height: 100% !important;
}

.qr-info {
    margin-bottom: 20px;
}

.qr-session-code {
    margin-bottom: 12px;
}

.qr-session-code .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.qr-session-code .code {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--claude-coral);
    letter-spacing: 4px;
}

.qr-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
    padding: 8px;
    background: var(--claude-dark);
    border-radius: var(--radius-sm);
}

/* =========================
   ERROR/LOADING SCREENS
   ========================= */

.error-screen,
.loading-screen {
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: var(--claude-dark);
}

.error-content,
.loading-content {
    text-align: center;
    max-width: 360px;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(248, 113, 113, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent-red);
}

.error-content h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.error-content .btn {
    text-decoration: none;
}

.loading-content h2 {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Auth back link */
.auth-back-link {
    margin-top: 24px;
}

.auth-back-link a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.auth-back-link a:hover {
    color: var(--claude-coral);
}

/* =========================
   RESPONSIVE UPDATES
   ========================= */

@media (max-width: 768px) {
    .admin-controls {
        gap: 8px;
    }

    .session-code-badge {
        display: none;
    }

    .homepage-hero h1 {
        font-size: 1.5rem;
    }
}

/* =========================
   ANONYMOUS QUESTIONS
   ========================= */

.anonymous-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(120, 113, 108, 0.3);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.real-author {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.anonymous-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.anonymous-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--claude-coral);
    cursor: pointer;
}

.ask-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

/* =========================
   QUESTION MODERATION
   ========================= */

.admin-question-card.pending {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.pending-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f59e0b;
    color: var(--claude-dark);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pending-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #f59e0b;
    color: var(--claude-dark);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

.action-btn.approve:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.action-btn.reject:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* =========================
   POLL TIMER
   ========================= */

.poll-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.poll-timer.urgent {
    background: rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
    animation: pulse-urgent 1s ease-in-out infinite;
}

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

.poll-timer-display {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.poll-timer-display.urgent {
    background: rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
    animation: pulse-urgent 1s ease-in-out infinite;
}

.poll-duration-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
}

.poll-duration-select:focus {
    border-color: var(--claude-coral);
    outline: none;
}

/* =========================
   EXPORT DROPDOWN
   ========================= */

.export-dropdown-wrapper {
    position: relative;
}

.export-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 150px;
}

.export-dropdown.active {
    display: block;
}

.export-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.export-dropdown button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--claude-coral);
}

.export-dropdown button:first-child {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.export-dropdown button:last-child {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* =========================
   QR CODE ENHANCEMENTS
   ========================= */

.display-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.display-session-code {
    display: flex;
    align-items: center;
    gap: 8px;
}

.display-session-code .code {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--claude-coral);
    letter-spacing: 3px;
}

.copy-code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.copy-code-btn:hover {
    background: var(--claude-coral);
    border-color: var(--claude-coral);
    color: var(--claude-dark);
}

/* =========================
   DISPLAY/PRESENTER MODE
   ========================= */

.display-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.display-controls {
    display: flex;
    gap: 8px;
}

.display-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.display-control-btn:hover {
    background: var(--claude-coral);
    border-color: var(--claude-coral);
    color: var(--claude-dark);
}

.display-main {
    flex: 1;
    display: flex;
    gap: 24px;
    overflow: hidden;
}

.display-questions {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.display-poll-section {
    flex: 1;
    min-width: 300px;
}

.display-poll-card {
    background: var(--claude-dark-card);
    border: 2px solid var(--claude-coral);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.display-poll-card.completed {
    border-color: var(--accent-green);
}

.display-poll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.display-poll-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--claude-coral);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.display-poll-card.completed .display-poll-label {
    color: var(--accent-green);
}

.display-poll-timer {
    padding: 4px 12px;
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.display-poll-question {
    font-size: 1.25rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.display-poll-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.display-poll-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.display-poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(212, 131, 106, 0.25);
    transition: width 0.5s ease-out;
}

.display-poll-option-text {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: 500;
}

.display-poll-option-percent {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--claude-coral);
}

.display-poll-total {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Fullscreen mode */
#displayView:fullscreen {
    background: var(--claude-dark);
}

#displayView:fullscreen .display-container {
    max-width: 1600px;
    margin: 0 auto;
}

#displayView:fullscreen .display-header h1 {
    font-size: 2.5rem;
}

#displayView:fullscreen .display-question .question-text {
    font-size: 2rem;
}

#displayView:fullscreen .display-question.featured .question-text {
    font-size: 2.5rem;
}

#displayView:fullscreen .display-qr {
    width: 150px;
    height: 150px;
}

#displayView:fullscreen .display-session-code .code {
    font-size: 2rem;
}

#displayView:fullscreen .display-poll-question {
    font-size: 1.5rem;
}

#displayView:fullscreen .display-poll-option-text {
    font-size: 1.25rem;
}

#displayView:fullscreen .display-poll-option-percent {
    font-size: 1.5rem;
}

/* =========================
   NEW CONTENT INDICATORS
   ========================= */

/* Subtle pulse when new content arrives */
.questions-list.has-new-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--claude-coral), transparent);
    animation: newContentPulse 1.5s ease-out forwards;
    z-index: 10;
}

@keyframes newContentPulse {
    0% { opacity: 0; transform: scaleX(0); }
    20% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1); }
}

/* Update indicator badge */
.update-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(212, 131, 106, 0.15);
    border: 1px solid var(--claude-coral);
    border-radius: 20px;
    color: var(--claude-coral);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    animation: updateBadgePulse 2s ease-in-out infinite;
    transition: transform 0.2s ease, background 0.2s ease;
}

.update-indicator:hover {
    background: rgba(212, 131, 106, 0.25);
    transform: scale(1.05);
}

@keyframes updateBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 131, 106, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(212, 131, 106, 0); }
}

/* Vote count change animation */
.vote-count.changed {
    animation: countChange 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--claude-coral); }
    100% { transform: scale(1); }
}

/* =========================
   ENHANCED BUTTON FEEDBACK
   ========================= */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Submit button success state */
.btn.success {
    background: var(--accent-green) !important;
    animation: submitSuccess 0.5s ease;
}

@keyframes submitSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =========================
   SMOOTH SCROLL BEHAVIOR
   ========================= */

.questions-list {
    position: relative;
    scroll-behavior: smooth;
}

/* Responsive display adjustments */
@media (max-width: 1024px) {
    .display-main {
        flex-direction: column;
    }

    .display-poll-section {
        min-width: 100%;
    }
}

/* =========================
   QUIZ STYLES - USER SIDE
   ========================= */

.active-quiz-container {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--claude-dark-lighter);
    animation: slideDown 0.4s ease-out;
}

/* Mobile Quiz Takeover - Fullscreen overlay during active quiz */
.quiz-takeover {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.quiz-takeover-content {
    min-height: 100%;
    padding: 16px;
    padding-top: env(safe-area-inset-top, 16px);
    padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 20px);
    display: flex;
    flex-direction: column;
}

.quiz-takeover .quiz-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.quiz-takeover .quiz-question-text {
    font-size: 1.3rem;
    line-height: 1.4;
}

.quiz-takeover .quiz-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.quiz-takeover .quiz-option {
    padding: 16px 20px;
    font-size: 1.1rem;
}

.quiz-takeover .quiz-timer {
    font-size: 1.2rem;
    padding: 8px 16px;
}

/* Hide takeover on desktop */
@media (min-width: 768px) {
    .quiz-takeover {
        display: none !important;
    }
}

.quiz-card {
    background: var(--claude-dark-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 2px solid var(--claude-coral);
}

.quiz-card.answered {
    border-color: var(--accent-green);
}

.quiz-card.quiz-ended {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

.quiz-card.quiz-results {
    border-color: var(--text-muted);
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--claude-coral);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.quiz-header .quiz-trophy {
    font-size: 1.2rem;
}

.quiz-header .quiz-target {
    font-size: 1rem;
}

.quiz-progress {
    margin-left: auto;
    color: var(--text-muted);
    text-transform: none;
    font-weight: 500;
}

.quiz-timer {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.quiz-timer.urgent {
    background: rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
    animation: pulse-urgent 1s ease-in-out infinite;
}

/* Quiz Question Image (participant view) */
.quiz-question-image {
    width: 100%;
    max-height: 250px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.quiz-question-image img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.quiz-question-text {
    font-size: 1.1rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.quiz-option:hover:not(:disabled) {
    background: rgba(212, 131, 106, 0.15);
    border-color: var(--claude-coral);
    transform: translateX(4px);
}

.quiz-option:disabled {
    cursor: default;
}

.quiz-option.selected {
    background: rgba(212, 131, 106, 0.2);
    border-color: var(--claude-coral);
}

.quiz-option.disabled {
    opacity: 0.7;
}

.quiz-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.quiz-option.selected .quiz-option-letter {
    background: var(--claude-coral);
    color: var(--claude-dark);
}

.quiz-option-text {
    flex: 1;
}

.quiz-waiting {
    text-align: center;
    color: var(--accent-green);
    font-size: 0.9rem;
    margin-top: 12px;
    padding: 8px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-sm);
}

.quiz-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* Quiz Results */
.quiz-result-status {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
}

.quiz-result-status.correct {
    background: rgba(74, 222, 128, 0.15);
    color: var(--accent-green);
}

.quiz-result-status.incorrect {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-red);
}

.points-earned {
    display: block;
    font-size: 1rem;
    margin-top: 4px;
    animation: pointsEarned 0.5s ease-out;
}

@keyframes pointsEarned {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.quiz-correct-answer {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.quiz-your-answer {
    text-align: center;
    font-size: 0.85rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.quiz-your-answer.correct {
    background: rgba(74, 222, 128, 0.1);
    color: var(--accent-green);
}

.quiz-your-answer.incorrect {
    background: rgba(248, 113, 113, 0.1);
    color: var(--accent-red);
}

/* Leaderboard */
.quiz-leaderboard,
.quiz-final-leaderboard,
.quiz-mini-leaderboard {
    margin-top: 12px;
}

.quiz-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
}

.quiz-leaderboard-row.gold {
    background: rgba(251, 191, 36, 0.15);
}

.quiz-leaderboard-row.silver {
    background: rgba(156, 163, 175, 0.15);
}

.quiz-leaderboard-row.bronze {
    background: rgba(180, 83, 9, 0.15);
}

.quiz-leaderboard-row.current-user {
    border: 1px solid var(--claude-coral);
}

.quiz-rank {
    font-size: 1rem;
    min-width: 24px;
    text-align: center;
}

.quiz-name {
    flex: 1;
    font-weight: 500;
}

.quiz-points {
    font-weight: 700;
    color: var(--claude-coral);
}

.quiz-user-standing,
.quiz-user-result {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 12px;
    padding: 8px;
    background: rgba(212, 131, 106, 0.1);
    border-radius: var(--radius-sm);
}

.quiz-no-participants {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 12px;
}

/* =========================
   QUIZ STYLES - ADMIN SIDE
   ========================= */

.quizzes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-quizzes-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
}

.admin-quiz-card {
    background: var(--claude-dark-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-quiz-card.active {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.08);
}

.admin-quiz-card.ended {
    border-color: var(--accent-green);
    opacity: 0.85;
}

.admin-quiz-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.admin-quiz-info h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.admin-quiz-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.admin-quiz-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-start;
}

.quiz-active-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.quiz-live-badge {
    background: var(--claude-coral);
    color: var(--claude-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.quiz-ended-badge {
    background: var(--accent-green);
    color: var(--claude-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.quiz-lobby-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quiz-lobby-badge {
    background: linear-gradient(135deg, #9333EA, #7C3AED);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    animation: lobby-pulse 1.5s ease-in-out infinite;
}

@keyframes lobby-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.quiz-lobby-count-badge {
    background: rgba(147, 51, 234, 0.2);
    color: #A78BFA;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.quiz-showing-results {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.quiz-timer-display {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.quiz-timer-display.urgent {
    background: rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
    animation: pulse-urgent 1s ease-in-out infinite;
}

.quiz-leaderboard-preview {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.quiz-leaderboard-preview h5 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-leaderboard-more {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 6px;
}

/* Quiz Modal */
.quiz-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.quiz-modal-content > h3 {
    flex-shrink: 0;
    margin-bottom: 16px;
}

.quiz-modal-content .quiz-form {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 12px;
    margin-right: -4px;
}

/* Custom scrollbar for quiz form */
.quiz-modal-content .quiz-form::-webkit-scrollbar {
    width: 6px;
}

.quiz-modal-content .quiz-form::-webkit-scrollbar-track {
    background: transparent;
}

.quiz-modal-content .quiz-form::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.quiz-modal-content .quiz-form::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.quiz-modal-content .modal-actions {
    flex-shrink: 0;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-top: 20px;
}

.quiz-form > label:first-child {
    margin-top: 0;
}

.quiz-form input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.quiz-form input[type="text"]:focus {
    border-color: var(--claude-coral);
}

.quiz-settings {
    margin: 20px 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-setting-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quiz-setting-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--claude-coral);
    cursor: pointer;
    flex-shrink: 0;
}

.quiz-questions-builder {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

/* Add Question button styling */
.quiz-form #addQuestionBtn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.quiz-form #addQuestionBtn:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.05);
}

.quiz-question-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
}

.quiz-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-question-number {
    font-weight: 700;
    color: var(--claude-coral);
    font-size: 0.9rem;
}

.quiz-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-remove-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.quiz-question-text {
    width: 100%;
    margin-bottom: 12px;
}

/* Quiz Image Section */
.quiz-image-section {
    margin-bottom: 12px;
}

.quiz-image-preview {
    width: 100%;
    max-height: 200px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.quiz-image-preview img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.quiz-image-buttons {
    display: flex;
    gap: 8px;
}

.quiz-add-image-btn,
.quiz-remove-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-add-image-btn:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.1);
}

.quiz-remove-image-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(244, 66, 53, 0.1);
}

.quiz-question-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.quiz-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-option-row input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-green);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.quiz-option-row input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    min-width: 0;
}

.quiz-question-settings {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-question-settings label {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.quiz-time-limit {
    padding: 8px 12px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 120px;
}

.quiz-time-limit:focus {
    border-color: var(--claude-coral);
    outline: none;
}

/* =========================
   QUIZ LOBBY
   Animated waiting room
   ========================= */

.quiz-lobby {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--claude-dark) 0%, var(--claude-dark-card) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.quiz-lobby-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    z-index: 2;
}

.quiz-lobby-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0;
}

.quiz-trophy-pulse {
    font-size: 2.5rem;
    animation: trophy-pulse 2s ease-in-out infinite;
}

@keyframes trophy-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.quiz-lobby-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    z-index: 2;
}

.quiz-lobby-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.lobby-bubble {
    position: absolute;
    width: var(--size, 50px);
    height: var(--size, 50px);
    left: var(--left, 50%);
    bottom: -60px;
    background: linear-gradient(135deg,
        hsl(var(--hue, 200), 70%, 60%) 0%,
        hsl(var(--hue, 200), 70%, 40%) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bubble-float 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lobby-bubble-initial {
    font-size: calc(var(--size, 50px) * 0.4);
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes bubble-float {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        transform: translateY(-50px) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateY(-350px) scale(1) rotate(10deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-400px) scale(0.8) rotate(20deg);
        opacity: 0;
    }
}

.quiz-lobby-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 32px 0;
    z-index: 2;
}

.lobby-count-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--claude-coral);
    line-height: 1;
    text-shadow: 0 0 30px rgba(212, 131, 106, 0.5);
    animation: count-pulse 1.5s ease-in-out infinite;
}

@keyframes count-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.lobby-count-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.quiz-join-btn {
    z-index: 2;
    padding: 16px 48px !important;
    font-size: 1.2rem !important;
    gap: 12px;
    animation: join-btn-glow 2s ease-in-out infinite;
}

@keyframes join-btn-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 131, 106, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 131, 106, 0.6); }
}

.quiz-lobby-waiting {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    z-index: 2;
}

.quiz-lobby-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--claude-coral);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* General spinner */
.spinner {
    animation: spin 1s linear infinite;
}

/* Mobile optimizations for lobby */
@media (max-width: 768px) {
    .quiz-lobby {
        min-height: 80vh;
        padding: 24px 16px;
        margin: -12px;
        border-radius: 0;
    }

    .quiz-lobby-header h2 {
        font-size: 1.4rem;
    }

    .quiz-trophy-pulse {
        font-size: 2rem;
    }

    .lobby-count-number {
        font-size: 5rem;
    }

    .lobby-bubble {
        animation-duration: 5s;
    }
}

/* =========================
   QUIZ - MOBILE EXPERIENCE
   Mentimeter-style animations
   ========================= */

/* Make quiz full-screen feel on mobile */
@media (max-width: 768px) {
    .active-quiz-container {
        padding: 0;
        background: var(--claude-dark);
    }

    .quiz-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        min-height: calc(100vh - 200px);
        display: flex;
        flex-direction: column;
    }

    .quiz-header {
        padding: 16px;
        background: rgba(0, 0, 0, 0.3);
        margin: -16px -16px 16px -16px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .quiz-timer {
        font-size: 1.5rem;
        padding: 12px 24px;
        border-radius: 50px;
        min-width: 100px;
        text-align: center;
        animation: timer-pulse 1s ease-in-out infinite;
    }

    .quiz-timer.urgent {
        animation: timer-shake 0.5s ease-in-out infinite;
    }

    .quiz-question-text {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 24px;
    }

    .quiz-options-list {
        gap: 12px;
        flex: 1;
    }

    .quiz-option {
        padding: 20px;
        font-size: 1.1rem;
        border-radius: var(--radius-md);
        transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .quiz-option:active:not(:disabled) {
        transform: scale(0.95);
    }

    .quiz-option-letter {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* Result screens */
    .quiz-result-status {
        font-size: 2rem;
        padding: 32px;
        margin: 20px -16px;
    }

    .points-earned {
        font-size: 1.3rem;
        display: block;
        margin-top: 8px;
    }

    .quiz-leaderboard-row {
        padding: 14px 16px;
        font-size: 1rem;
    }
}

/* Quiz timer animations */
@keyframes timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes timer-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Big countdown overlay for quiz */
.quiz-countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.quiz-countdown-number {
    font-size: 15rem;
    font-weight: 700;
    color: var(--claude-coral);
    animation: countdown-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 0 60px rgba(212, 131, 106, 0.5);
}

@keyframes countdown-pop {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Option selection animation */
.quiz-option.selecting {
    animation: option-select 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes option-select {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Correct/incorrect reveal animations */
.quiz-result-status.correct {
    animation: result-correct 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-result-status.incorrect {
    animation: result-incorrect 0.5s ease-out;
}

@keyframes result-correct {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes result-incorrect {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* Leaderboard entry animations */
.quiz-leaderboard-row {
    animation: leaderboard-slide 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.quiz-leaderboard-row:nth-child(1) { animation-delay: 0ms; }
.quiz-leaderboard-row:nth-child(2) { animation-delay: 80ms; }
.quiz-leaderboard-row:nth-child(3) { animation-delay: 160ms; }
.quiz-leaderboard-row:nth-child(4) { animation-delay: 240ms; }
.quiz-leaderboard-row:nth-child(5) { animation-delay: 320ms; }
.quiz-leaderboard-row:nth-child(n+6) { animation-delay: 400ms; }

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

/* Gold/Silver/Bronze special animations */
.quiz-leaderboard-row.gold {
    animation: gold-shine 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.quiz-leaderboard-row.silver {
    animation: leaderboard-slide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 100ms backwards;
}

.quiz-leaderboard-row.bronze {
    animation: leaderboard-slide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 200ms backwards;
}

@keyframes gold-shine {
    0% {
        opacity: 0;
        transform: scale(0.8);
        box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    }
}

/* Points animation */
.points-earned {
    animation: points-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

@keyframes points-pop {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Quiz waiting state pulse */
.quiz-waiting {
    animation: waiting-pulse 2s ease-in-out infinite;
}

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

/* Quiz ended celebration */
.quiz-card.quiz-ended .quiz-header {
    animation: celebration 0.6s ease-out;
}

@keyframes celebration {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Trophy bounce for final results */
.quiz-card.quiz-ended .quiz-trophy {
    display: inline-block;
    animation: trophy-bounce 1s ease-in-out infinite;
}

@keyframes trophy-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

/* =========================
   QUIZ PRESENTER MODE
   Mentimeter-style fullscreen presentation
   ========================= */

.presenter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    z-index: 10000;
    overflow: hidden;
}

.presenter-overlay.active {
    display: flex;
}

.presenter-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Presenter Header */
.presenter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 24px;
}

.presenter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.presenter-controls {
    display: flex;
    gap: 12px;
}

.presenter-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.presenter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.presenter-btn.close:hover {
    background: rgba(248, 113, 113, 0.3);
}

/* Presenter Content */
.presenter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Lobby View */
.presenter-lobby {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.presenter-lobby-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    animation: presenter-pulse 2s ease-in-out infinite;
}

@keyframes presenter-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.presenter-lobby h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 40px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.presenter-join-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 48px;
}

.presenter-code-label {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.presenter-url {
    font-size: 1.5rem;
    color: var(--claude-coral);
    font-weight: 600;
}

.presenter-code {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 12px;
    background: linear-gradient(135deg, var(--claude-coral) 0%, #E09880 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.presenter-player-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.presenter-count-number {
    font-size: 6rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    animation: count-glow 2s ease-in-out infinite;
}

@keyframes count-glow {
    0%, 100% { text-shadow: 0 0 30px rgba(212, 131, 106, 0.5); }
    50% { text-shadow: 0 0 60px rgba(212, 131, 106, 0.8); }
}

.presenter-count-label {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.presenter-player-bubbles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 600px;
    margin: 24px auto;
    min-height: 60px;
}

.presenter-player-bubble {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    animation: bubble-pop 0.4s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@keyframes bubble-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.presenter-start-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--claude-coral) 0%, #C4735A 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(212, 131, 106, 0.4);
}

.presenter-start-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(212, 131, 106, 0.5);
}

.presenter-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Question View */
.presenter-question {
    width: 100%;
    max-width: 1000px;
    animation: slideUp 0.5s ease;
}

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

.presenter-progress {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.presenter-progress span:first-child {
    color: #fff;
    font-weight: 600;
}

.presenter-timer {
    text-align: center;
    font-size: 8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.presenter-timer.urgent {
    color: var(--accent-red);
    animation: timer-shake 0.5s ease-in-out infinite;
}

@keyframes timer-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.presenter-timer-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 40px;
}

.presenter-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--claude-coral) 0%, var(--accent-green) 100%);
    border-radius: 6px;
    transition: width 1s linear;
}

.presenter-timer-fill.urgent {
    background: linear-gradient(90deg, var(--accent-red) 0%, #ff6b6b 100%);
}

.presenter-question-image {
    max-height: 250px;
    margin: 0 auto 24px;
    text-align: center;
}

.presenter-question-image img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.presenter-question-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.presenter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.presenter-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.presenter-option-letter {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.presenter-option:nth-child(1) .presenter-option-letter { background: #E53935; }
.presenter-option:nth-child(2) .presenter-option-letter { background: #1E88E5; }
.presenter-option:nth-child(3) .presenter-option-letter { background: #FDD835; color: #000; }
.presenter-option:nth-child(4) .presenter-option-letter { background: #43A047; }

.presenter-option-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.presenter-option-count {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    min-width: 60px;
    text-align: right;
}

.presenter-response-count {
    text-align: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.presenter-response-count span {
    font-weight: 800;
    color: #fff;
    font-size: 2rem;
}

/* Results View */
.presenter-results {
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.presenter-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.presenter-results-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.presenter-correct-answer {
    font-size: 1.5rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.presenter-correct-answer::before {
    content: '✓';
    font-size: 2rem;
}

.presenter-answer-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.presenter-answer-stat {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.presenter-answer-stat.correct {
    border: 2px solid var(--accent-green);
    background: rgba(74, 222, 128, 0.1);
}

.presenter-answer-stat-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    opacity: 0.2;
    transition: width 0.5s ease;
}

.presenter-answer-stat:nth-child(1) .presenter-answer-stat-bar { background: #E53935; }
.presenter-answer-stat:nth-child(2) .presenter-answer-stat-bar { background: #1E88E5; }
.presenter-answer-stat:nth-child(3) .presenter-answer-stat-bar { background: #FDD835; }
.presenter-answer-stat:nth-child(4) .presenter-answer-stat-bar { background: #43A047; }

.presenter-answer-stat-letter {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    z-index: 1;
}

.presenter-answer-stat:nth-child(1) .presenter-answer-stat-letter { background: #E53935; }
.presenter-answer-stat:nth-child(2) .presenter-answer-stat-letter { background: #1E88E5; }
.presenter-answer-stat:nth-child(3) .presenter-answer-stat-letter { background: #FDD835; color: #000; }
.presenter-answer-stat:nth-child(4) .presenter-answer-stat-letter { background: #43A047; }

.presenter-answer-stat-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    z-index: 1;
}

.presenter-answer-stat-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    z-index: 1;
}

.presenter-answer-stat-percent {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    z-index: 1;
}

.presenter-next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--claude-coral) 0%, #C4735A 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(212, 131, 106, 0.4);
}

.presenter-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 131, 106, 0.5);
}

/* Leaderboard View */
.presenter-leaderboard,
.presenter-final {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 800px;
}

.presenter-trophy {
    font-size: 5rem;
    margin-bottom: 16px;
    animation: trophy-float 2s ease-in-out infinite;
}

.presenter-trophy.final {
    font-size: 8rem;
}

@keyframes trophy-float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.presenter-leaderboard h2,
.presenter-final h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 32px;
}

.presenter-final h1 {
    font-size: 3.5rem;
}

.presenter-leaderboard-list,
.presenter-final-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.presenter-leaderboard-row {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    animation: slide-in-row 0.4s ease-out;
}

.presenter-leaderboard-row:nth-child(1) { animation-delay: 0ms; }
.presenter-leaderboard-row:nth-child(2) { animation-delay: 100ms; }
.presenter-leaderboard-row:nth-child(3) { animation-delay: 200ms; }
.presenter-leaderboard-row:nth-child(4) { animation-delay: 300ms; }
.presenter-leaderboard-row:nth-child(5) { animation-delay: 400ms; }

@keyframes slide-in-row {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.presenter-leaderboard-row.gold {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.presenter-leaderboard-row.silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.05));
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.presenter-leaderboard-row.bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
    border: 1px solid rgba(205, 127, 50, 0.3);
}

.presenter-rank {
    font-size: 2rem;
    width: 60px;
    text-align: center;
}

.presenter-leaderboard-name {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
}

.presenter-leaderboard-points {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--claude-coral);
}

/* Podium for final results */
.presenter-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 40px 0;
    min-height: 200px;
}

.presenter-podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: podium-rise 0.8s ease-out;
}

.presenter-podium-place:nth-child(1) { animation-delay: 0.4s; }
.presenter-podium-place:nth-child(2) { animation-delay: 0s; }
.presenter-podium-place:nth-child(3) { animation-delay: 0.2s; }

@keyframes podium-rise {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.presenter-podium-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.presenter-podium-place:nth-child(2) .presenter-podium-avatar {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

.presenter-podium-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presenter-podium-points {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.presenter-podium-stand {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px 8px 0 0;
}

.presenter-podium-place:nth-child(1) .presenter-podium-stand {
    background: linear-gradient(180deg, #C0C0C0 0%, #A0A0A0 100%);
    height: 80px;
}

.presenter-podium-place:nth-child(2) .presenter-podium-stand {
    background: linear-gradient(180deg, #FFD700 0%, #DAA520 100%);
    height: 120px;
    width: 120px;
}

.presenter-podium-place:nth-child(3) .presenter-podium-stand {
    background: linear-gradient(180deg, #CD7F32 0%, #A0522D 100%);
    height: 60px;
}

.presenter-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-body);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.presenter-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile adjustments for presenter */
@media (max-width: 768px) {
    .presenter-container {
        padding: 12px;
    }

    .presenter-header {
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .presenter-title {
        font-size: 1.1rem;
    }

    .presenter-btn {
        width: 40px;
        height: 40px;
    }

    .presenter-lobby h1 {
        font-size: 2.5rem;
    }

    .presenter-code {
        font-size: 2.5rem;
        letter-spacing: 8px;
    }

    .presenter-count-number {
        font-size: 4rem;
    }

    .presenter-timer {
        font-size: 5rem;
    }

    .presenter-question-text {
        font-size: 1.5rem;
    }

    .presenter-options {
        grid-template-columns: 1fr;
    }

    .presenter-option {
        padding: 16px;
    }

    .presenter-option-text {
        font-size: 1.1rem;
    }

    .presenter-answer-stats {
        grid-template-columns: 1fr;
    }

    .presenter-podium {
        flex-wrap: wrap;
    }
}

/* =====================================================
   PRESENTER MODE ENHANCEMENTS - New Question Types
   ===================================================== */

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confetti-fall 4s ease-out forwards;
}

.confetti-piece:nth-child(odd) {
    border-radius: 50%;
}

.confetti-piece:nth-child(even) {
    border-radius: 2px;
    transform: rotate(45deg);
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg) scale(0.5);
    }
}

/* Quiz Builder - Item Type Selector */
.quiz-add-item-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.quiz-item-type-select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-item-type-select:hover {
    border-color: var(--claude-coral);
}

.quiz-item-type-select:focus {
    outline: none;
    border-color: var(--claude-coral);
    box-shadow: 0 0 0 3px rgba(212, 131, 106, 0.15);
}

/* Quiz Item Badges */
.quiz-item-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.quiz-slide-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.quiz-scale-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.quiz-ranking-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.quiz-openended-badge {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

.quiz-mc-badge {
    background: linear-gradient(135deg, var(--claude-coral) 0%, #C4735A 100%);
    color: #fff;
}

/* Quiz Slide Item Styling */
.quiz-slide-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.quiz-slide-item .quiz-question-header {
    border-bottom-color: rgba(102, 126, 234, 0.2);
}

/* Scale Question Config */
.quiz-scale-config {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
    padding: 16px;
    background: rgba(240, 147, 251, 0.05);
    border-radius: 8px;
}

.quiz-scale-config label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quiz-scale-config input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

.quiz-scale-preview {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}

.quiz-scale-preview-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(240, 147, 251, 0.1);
    border: 2px solid rgba(240, 147, 251, 0.3);
    color: #f093fb;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Ranking Items Builder */
.quiz-ranking-items-builder {
    margin-top: 12px;
    padding: 16px;
    background: rgba(79, 172, 254, 0.05);
    border-radius: 8px;
}

.quiz-ranking-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.quiz-ranking-builder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.quiz-ranking-builder-item .drag-handle {
    color: var(--text-muted);
    cursor: grab;
}

.quiz-ranking-builder-item input {
    flex: 1;
    border: none;
    font-size: 0.95rem;
    padding: 4px;
}

.quiz-ranking-builder-item input:focus {
    outline: none;
}

.quiz-ranking-builder-item .remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quiz-ranking-builder-item .remove-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #e74c3c;
}

.add-ranking-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: rgba(79, 172, 254, 0.1);
    border: 1px dashed rgba(79, 172, 254, 0.4);
    border-radius: 8px;
    color: #4facfe;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-ranking-item-btn:hover {
    background: rgba(79, 172, 254, 0.15);
    border-color: #4facfe;
}

/* Open-Ended Question Config */
.quiz-open-ended-config {
    margin-top: 12px;
    padding: 16px;
    background: rgba(67, 233, 123, 0.05);
    border-radius: 8px;
}

.quiz-open-ended-config label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quiz-open-ended-config input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Item Move Buttons */
.quiz-item-move-buttons {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.quiz-item-move-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-item-move-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.quiz-item-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =====================================================
   PRESENTER - Slide Views
   ===================================================== */

.presenter-slide {
    text-align: center;
    animation: slideEnter 0.6s ease-out;
    width: 100%;
    max-width: 900px;
}

@keyframes slideEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideExit {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
}

.presenter-slide.exiting {
    animation: slideExit 0.4s ease-in forwards;
}

/* Title Slide */
.presenter-title-slide {
    padding: 60px 40px;
}

.presenter-slide-title {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.presenter-slide-subtitle {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Content Slide */
.presenter-content-slide {
    padding: 40px;
    text-align: left;
}

.presenter-slide-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 32px;
    text-align: center;
}

.presenter-slide-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.presenter-slide-bullets li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.presenter-slide-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 12px;
    height: 12px;
    background: var(--claude-coral);
    border-radius: 50%;
}

.presenter-slide-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    margin-top: 24px;
}

/* =====================================================
   PRESENTER - Scale Question Views
   ===================================================== */

.presenter-scale-question {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 800px;
}

.presenter-scale-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.presenter-scale-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: default;
    transition: all 0.3s ease;
}

.presenter-scale-labels {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.presenter-scale-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Scale Results */
.presenter-scale-results {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 800px;
}

.presenter-scale-average {
    margin: 40px 0;
}

.presenter-scale-avg-number {
    font-size: 8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    animation: averagePop 0.6s ease-out;
}

@keyframes averagePop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.presenter-scale-avg-label {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

.presenter-scale-distribution {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 0 20px;
    margin-bottom: 16px;
}

.scale-dist-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 60px;
}

.scale-dist-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--claude-coral) 0%, #C4735A 100%);
    border-radius: 8px 8px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
    animation: barGrow 0.6s ease-out;
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
        transform-origin: bottom;
    }
    to {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

.scale-dist-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
}

.scale-dist-value {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-top: 4px;
}

/* =====================================================
   PRESENTER - Ranking Question Views
   ===================================================== */

.presenter-ranking-question {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 700px;
}

.presenter-ranking-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 40px 0;
}

.presenter-ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    animation: itemSlideIn 0.4s ease-out;
}

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

.presenter-ranking-item:nth-child(1) { animation-delay: 0ms; }
.presenter-ranking-item:nth-child(2) { animation-delay: 100ms; }
.presenter-ranking-item:nth-child(3) { animation-delay: 200ms; }
.presenter-ranking-item:nth-child(4) { animation-delay: 300ms; }
.presenter-ranking-item:nth-child(5) { animation-delay: 400ms; }

.presenter-ranking-item-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.presenter-ranking-item-text {
    flex: 1;
    text-align: left;
    font-size: 1.3rem;
    color: #fff;
}

/* Ranking Results */
.presenter-ranking-results {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 700px;
}

.presenter-ranking-aggregate {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 40px 0;
}

.presenter-ranking-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    animation: rankResultSlide 0.5s ease-out;
}

.presenter-ranking-result-item:nth-child(1) {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.presenter-ranking-result-item:nth-child(2) {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.05) 100%);
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.presenter-ranking-result-item:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.05) 100%);
    border: 1px solid rgba(205, 127, 50, 0.3);
}

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

.presenter-ranking-result-rank {
    font-size: 2rem;
    width: 50px;
}

.presenter-ranking-result-text {
    flex: 1;
    text-align: left;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.presenter-ranking-result-score {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================
   PRESENTER - Open-Ended Question Views
   ===================================================== */

.presenter-openended-question {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 700px;
}

.presenter-openended-prompt {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.presenter-openended-prompt-text {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Open-Ended Results */
.presenter-openended-results {
    text-align: center;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 900px;
}

.presenter-word-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    min-height: 300px;
    align-items: center;
}

.word-cloud-response {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: #fff;
    font-size: 1.1rem;
    animation: wordAppear 0.4s ease-out;
    max-width: 300px;
    word-wrap: break-word;
}

@keyframes wordAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.word-cloud-response:nth-child(odd) {
    background: rgba(212, 131, 106, 0.2);
}

.word-cloud-response:nth-child(3n) {
    background: rgba(79, 172, 254, 0.2);
}

.word-cloud-response:nth-child(4n) {
    background: rgba(67, 233, 123, 0.2);
}

.presenter-responses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.presenter-response-item {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-align: left;
    color: #fff;
    font-size: 1.1rem;
    animation: responseSlide 0.4s ease-out;
}

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

/* =====================================================
   PARTICIPANT - Scale Question UI
   ===================================================== */

.quiz-scale-container {
    margin: 24px 0;
}

.quiz-scale-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.scale-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scale-btn:hover {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.1);
}

.scale-btn.selected {
    background: var(--claude-coral);
    border-color: var(--claude-coral);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(212, 131, 106, 0.4);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
}

.scale-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.scale-submit-btn {
    margin-top: 20px;
    padding: 14px 32px;
    background: var(--claude-coral);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scale-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scale-submit-btn:not(:disabled):hover {
    background: #C4735A;
    transform: translateY(-2px);
}

/* =====================================================
   PARTICIPANT - Ranking Question UI
   ===================================================== */

.quiz-ranking-container {
    margin: 24px 0;
}

.ranking-instruction {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: center;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.ranking-item:hover {
    border-color: var(--claude-coral);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ranking-item.dragging {
    opacity: 0.8;
    border-color: var(--claude-coral);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
    cursor: grabbing;
}

.ranking-item.drag-over {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.05);
}

.ranking-handle {
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: grab;
}

.ranking-position {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--claude-coral);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
}

.ranking-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
}

.ranking-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--claude-coral);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ranking-submit-btn:hover {
    background: #C4735A;
    transform: translateY(-2px);
}

/* =====================================================
   PARTICIPANT - Open-Ended Question UI
   ===================================================== */

.quiz-openended-container {
    margin: 24px 0;
}

.open-ended-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    resize: vertical;
    transition: all 0.2s ease;
}

.open-ended-input:focus {
    outline: none;
    border-color: var(--claude-coral);
    box-shadow: 0 0 0 3px rgba(212, 131, 106, 0.15);
}

.open-ended-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.open-ended-counter.limit-near {
    color: #f39c12;
}

.open-ended-counter.limit-reached {
    color: #e74c3c;
}

.open-ended-submit-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: var(--claude-coral);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.open-ended-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.open-ended-submit-btn:not(:disabled):hover {
    background: #C4735A;
    transform: translateY(-2px);
}

.open-ended-submitted {
    text-align: center;
    padding: 24px;
    background: rgba(67, 233, 123, 0.1);
    border-radius: 12px;
    color: #27ae60;
}

.open-ended-submitted-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.open-ended-submitted-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* =====================================================
   PARTICIPANT - Slide Waiting State
   ===================================================== */

.quiz-slide-waiting {
    text-align: center;
    padding: 40px 20px;
}

.slide-waiting-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

.slide-waiting-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.slide-waiting-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* =====================================================
   PARTICIPANT - Results Displays
   ===================================================== */

.quiz-scale-result {
    text-align: center;
    padding: 24px;
    background: rgba(212, 131, 106, 0.05);
    border-radius: 12px;
}

.quiz-scale-result-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--claude-coral);
}

.quiz-scale-result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.quiz-ranking-result {
    padding: 24px;
    background: rgba(79, 172, 254, 0.05);
    border-radius: 12px;
}

.quiz-ranking-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.quiz-ranking-result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-ranking-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 8px;
}

.quiz-ranking-result-position {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--claude-coral);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
}

.quiz-openended-result {
    text-align: center;
    padding: 24px;
    background: rgba(67, 233, 123, 0.05);
    border-radius: 12px;
}

.quiz-openended-result-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.quiz-openended-result-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* =====================================================
   Mobile Adjustments for New Question Types
   ===================================================== */

@media (max-width: 768px) {
    /* Admin builder */
    .quiz-add-item-row {
        flex-direction: column;
    }

    .quiz-item-type-select {
        width: 100%;
    }

    .quiz-scale-config {
        grid-template-columns: 1fr;
    }

    /* Presenter slides */
    .presenter-slide-title {
        font-size: 2.5rem;
    }

    .presenter-slide-subtitle {
        font-size: 1.2rem;
    }

    .presenter-slide-heading {
        font-size: 1.8rem;
    }

    .presenter-slide-bullets li {
        font-size: 1.1rem;
    }

    /* Presenter scale */
    .presenter-scale-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .presenter-scale-avg-number {
        font-size: 5rem;
    }

    .scale-dist-item {
        max-width: 40px;
    }

    /* Presenter ranking */
    .presenter-ranking-item {
        padding: 12px 16px;
    }

    .presenter-ranking-item-text {
        font-size: 1.1rem;
    }

    /* Participant scale */
    .scale-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Participant ranking - touch improvements */
    .ranking-item {
        padding: 16px;
        touch-action: none;
    }

    .ranking-handle {
        font-size: 1.4rem;
        padding: 8px;
    }
}

/* =========================
   QUIZ BUILDER
   Full-page canvas-based builder
   ========================= */

.quiz-builder {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--claude-dark);
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.quiz-builder.active {
    display: flex;
}

/* Quiz Builder Header */
.quiz-builder-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    background: var(--claude-dark-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.builder-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.builder-back-btn:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
}

.builder-title-input {
    flex: 1;
    max-width: 400px;
    padding: 10px 16px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
}

.builder-title-input:focus {
    border-color: var(--claude-coral);
}

.builder-title-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.builder-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.builder-speed-bonus {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.builder-speed-bonus input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--claude-coral);
    cursor: pointer;
}

/* Quiz Builder Body */
.quiz-builder-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Quiz Builder Sidebar */
.quiz-builder-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--claude-dark-card);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.builder-sidebar-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.builder-sidebar-items::-webkit-scrollbar {
    width: 6px;
}

.builder-sidebar-items::-webkit-scrollbar-track {
    background: transparent;
}

.builder-sidebar-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.builder-sidebar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Sidebar Thumbnail Cards */
.builder-thumbnail {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.builder-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.builder-thumbnail.selected {
    border-color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.1);
}

.builder-thumbnail.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.builder-thumbnail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.builder-thumbnail-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
}

.builder-thumbnail-badge.slide-title {
    background: rgba(124, 77, 255, 0.2);
    color: #a78bfa;
}

.builder-thumbnail-badge.slide-content {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.builder-thumbnail-badge.question-mc {
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
}

.builder-thumbnail-badge.question-scale {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.builder-thumbnail-badge.question-ranking {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.builder-thumbnail-badge.question-open {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.builder-thumbnail-number {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.builder-thumbnail-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.builder-thumbnail-title.empty {
    color: var(--text-muted);
    font-style: italic;
}

.builder-thumbnail-preview {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.builder-thumbnail-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.builder-thumbnail:hover .builder-thumbnail-delete {
    opacity: 1;
}

.builder-thumbnail-delete:hover {
    background: var(--accent-red);
    color: white;
}

/* Add Item Section */
.builder-add-item {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.builder-item-type-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
}

.builder-item-type-select:focus {
    border-color: var(--claude-coral);
    outline: none;
}

.builder-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.builder-add-btn:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
    background: rgba(212, 131, 106, 0.05);
}

/* Quiz Builder Canvas */
.quiz-builder-canvas {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 24px;
    background: var(--claude-dark);
}

/* When showing slide canvas, prevent double scrollbars */
.quiz-builder-canvas:has(.slide-canvas-container) {
    overflow-y: hidden;
}

.quiz-builder-canvas:has(.slide-canvas-container) .builder-editor {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.quiz-builder-canvas:has(.slide-canvas-container) .slide-canvas-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.builder-canvas-content {
    max-width: 900px;
    margin: 0 auto;
}

.quiz-builder-canvas:has(.slide-canvas-container) .builder-canvas-content {
    max-width: none;
    height: 100%;
}

.builder-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: var(--text-muted);
}

.builder-empty-state svg {
    margin-bottom: 24px;
    opacity: 0.3;
}

.builder-empty-state h3 {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.builder-empty-state p {
    font-size: 0.95rem;
    max-width: 300px;
}

/* Canvas Editor Styles */
.builder-editor {
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
}

/* Slide Canvas - PowerPoint-style editor */
.slide-canvas-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slide-canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.canvas-tool-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.canvas-tool-group:last-child {
    border-right: none;
    padding-right: 0;
}

.canvas-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.canvas-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.canvas-tool-btn.active {
    background: var(--claude-coral);
    color: white;
    border-color: var(--claude-coral);
}

.canvas-tool-btn svg {
    width: 18px;
    height: 18px;
}

.canvas-tool-select {
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.canvas-tool-select:focus {
    border-color: var(--claude-coral);
    outline: none;
}

.canvas-color-picker {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.canvas-color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.canvas-color-picker::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}

/* The slide canvas itself */
.slide-canvas-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 0 auto; /* Center if width-constrained */
}

.slide-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.slide-canvas.has-bg-image {
    background-size: cover;
    background-position: center;
}

/* Canvas elements (text boxes, images) */
.canvas-element {
    position: absolute;
    cursor: move;
    user-select: none;
    transition: box-shadow 0.15s ease;
}

.canvas-element:hover {
    box-shadow: 0 0 0 2px rgba(212, 131, 106, 0.5);
}

.canvas-element.selected {
    box-shadow: 0 0 0 2px var(--claude-coral);
}

.canvas-element.dragging {
    opacity: 0.8;
    z-index: 1000;
}

/* Resize handles */
.canvas-element .resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--claude-coral);
    border: 2px solid white;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.canvas-element.selected .resize-handle {
    opacity: 1;
}

.canvas-element .resize-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.canvas-element .resize-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.canvas-element .resize-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.canvas-element .resize-handle.e { top: 50%; right: -5px; transform: translateY(-50%); cursor: e-resize; }
.canvas-element .resize-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }
.canvas-element .resize-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.canvas-element .resize-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.canvas-element .resize-handle.w { top: 50%; left: -5px; transform: translateY(-50%); cursor: w-resize; }

/* Text element */
.canvas-text-element {
    min-width: 50px;
    min-height: 30px;
    padding: 8px 12px;
    color: white;
    word-wrap: break-word;
    overflow: hidden;
}

.canvas-text-element.editing {
    cursor: text;
    outline: 2px dashed var(--claude-coral);
    background: rgba(0, 0, 0, 0.3);
}

.canvas-text-element .text-content {
    width: 100%;
    height: 100%;
    outline: none;
    white-space: pre-wrap;
}

.canvas-text-element .text-content:empty::before {
    content: 'Click to edit text...';
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Image element */
.canvas-image-element {
    min-width: 50px;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-image-element.has-image {
    border: none;
    background: transparent;
}

.canvas-image-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.canvas-image-element .image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.canvas-image-element .image-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

/* Element action buttons */
.canvas-element-actions {
    position: absolute;
    top: -40px;
    right: 0;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.canvas-element.selected .canvas-element-actions {
    opacity: 1;
}

.canvas-element-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--claude-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.canvas-element-action:hover {
    background: var(--claude-coral);
    color: white;
    border-color: var(--claude-coral);
}

.canvas-element-action.delete:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

/* Canvas zoom/info bar */
.slide-canvas-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.canvas-hint {
    font-style: italic;
}

/* Background image controls */
.slide-bg-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
}

.slide-bg-controls label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.builder-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.builder-editor-type {
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.builder-editor-badge.slide-title {
    background: rgba(124, 77, 255, 0.2);
    color: #a78bfa;
}

.builder-editor-badge.slide-content {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.builder-editor-badge.question-mc {
    background: rgba(212, 131, 106, 0.2);
    color: var(--claude-coral);
}

.builder-editor-badge.question-scale {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.builder-editor-badge.question-ranking {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.builder-editor-badge.question-open {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.builder-editor-number {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.builder-editor-nav {
    display: flex;
    gap: 8px;
}

.builder-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.builder-nav-btn:hover:not(:disabled) {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
}

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

/* Editor Form Fields */
.builder-field {
    margin-bottom: 24px;
}

.builder-field-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.builder-field-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.builder-field-input:focus {
    border-color: var(--claude-coral);
}

.builder-field-input.large {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

.builder-field-input.medium {
    font-size: 1.1rem;
}

.builder-field-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    outline: none;
    transition: var(--transition);
}

.builder-field-textarea:focus {
    border-color: var(--claude-coral);
}

/* Image Upload Section */
.builder-image-section {
    margin-bottom: 24px;
}

.builder-image-preview {
    width: 100%;
    max-height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    display: none;
}

.builder-image-preview.has-image {
    display: block;
}

.builder-image-preview img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.builder-image-buttons {
    display: flex;
    gap: 12px;
}

.builder-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.builder-image-btn:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
}

.builder-image-btn.remove:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Multiple Choice Options Grid */
.builder-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.builder-option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.builder-option-item:has(input[type="radio"]:checked) {
    border-color: var(--accent-green);
    background: rgba(46, 204, 113, 0.05);
}

.builder-option-radio {
    width: 24px;
    height: 24px;
    accent-color: var(--accent-green);
    cursor: pointer;
    flex-shrink: 0;
}

.builder-option-input {
    flex: 1;
    padding: 12px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}

.builder-option-input:focus {
    border-color: var(--claude-coral);
}

.builder-option-label {
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Scale Question Editor */
.builder-scale-config {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.builder-scale-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.builder-scale-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.builder-scale-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.builder-scale-input {
    width: 80px;
    padding: 10px 12px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    outline: none;
}

.builder-scale-input:focus {
    border-color: var(--claude-coral);
}

.builder-scale-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.builder-scale-preview-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 100px;
    text-align: center;
}

.builder-scale-preview-buttons {
    display: flex;
    gap: 8px;
}

.builder-scale-preview-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: #34d399;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Ranking Items Editor */
.builder-ranking-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.builder-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
}

.builder-ranking-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    cursor: grab;
}

.builder-ranking-handle:active {
    cursor: grabbing;
}

.builder-ranking-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fbbf24;
}

.builder-ranking-input {
    flex: 1;
    padding: 12px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}

.builder-ranking-input:focus {
    border-color: var(--claude-coral);
}

.builder-ranking-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.builder-ranking-remove:hover {
    color: var(--accent-red);
    background: rgba(244, 66, 53, 0.1);
}

.builder-add-ranking-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.builder-add-ranking-btn:hover {
    border-color: var(--claude-coral);
    color: var(--claude-coral);
}

/* Time Limit Selector */
.builder-settings-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.builder-settings-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.builder-time-select {
    padding: 10px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 140px;
}

.builder-time-select:focus {
    border-color: var(--claude-coral);
    outline: none;
}

/* Open-ended Config */
.builder-open-config {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.builder-char-limit-select {
    padding: 10px 14px;
    background: var(--claude-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Quiz Builder Footer */
.quiz-builder-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--claude-dark-card);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.builder-footer-left,
.builder-footer-right {
    flex: 1;
}

.builder-footer-center {
    flex: 2;
    text-align: center;
}

.builder-item-indicator {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.builder-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.builder-autosave {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.builder-autosave.saving {
    color: var(--accent-orange);
}

.builder-autosave.saving .save-status::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent-orange);
    border-top-color: transparent;
    border-radius: 50%;
    margin-right: 6px;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

.builder-autosave.unsaved {
    color: var(--accent-orange);
}

.builder-autosave.saved {
    color: var(--accent-green);
}

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

/* Quiz Builder Responsive */
@media (max-width: 900px) {
    .quiz-builder-body {
        flex-direction: column;
    }

    .quiz-builder-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .builder-sidebar-items {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 12px;
        gap: 8px;
    }

    .builder-thumbnail {
        min-width: 150px;
        flex-shrink: 0;
    }

    .builder-add-item {
        flex-direction: row;
        padding: 12px;
    }

    .builder-item-type-select {
        flex: 1;
    }

    .builder-add-btn {
        white-space: nowrap;
    }

    .quiz-builder-canvas {
        padding: 20px;
    }

    .builder-options-grid {
        grid-template-columns: 1fr;
    }

    .builder-scale-config {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .quiz-builder-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .builder-back-btn {
        order: -1;
    }

    .builder-title-input {
        order: 1;
        flex: 1 1 100%;
        max-width: none;
    }

    .builder-header-actions {
        order: 0;
        margin-left: 0;
    }

    .builder-speed-bonus span {
        display: none;
    }

    .builder-editor {
        padding: 20px;
    }

    .builder-footer-center {
        display: none;
    }
}
