/* ========================================
   QUIZ BATTLE - STYLE SHEET
   ======================================== */

html, body {
    background: #0a0a0f;
    height: 100%;
}

:root {
    --bg-dark: #0a0a0f;
    --bg-panel: #12121a;
    --bg-card: #1a1a25;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --accent-cyan: #06b6d4;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: #2d2d3a;
    --glow-primary: rgba(99, 102, 241, 0.4);
    --glow-success: rgba(16, 185, 129, 0.4);
    --glow-danger: rgba(239, 68, 68, 0.4);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100%;
    min-height: 100dvh;
}

.hidden { display: none !important; }

/* ========================================
   SCREENS
   ======================================== */
.screen {
    display: none;
    min-height: 100%;
    min-height: 100dvh;
    width: 100%;
}
.screen.active {
    display: flex;
}

/* ========================================
   BUTTONS
   ======================================== */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-primary);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-panel);
    border-color: var(--accent-primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-success), #059669);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
}
.btn-success:hover {
    box-shadow: 0 8px 25px var(--glow-success);
}

.btn-danger-small {
    background: var(--accent-danger);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-action {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
}

/* ========================================
   PLAYER PAGE
   ======================================== */
.player-body {
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    margin: auto;
}

.logo-area {
    text-align: center;
    margin-bottom: 20px;
}
.logo-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.logo-area h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-form {
    background: var(--bg-panel);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 14px;
}
.input-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: border-color 0.2s;
}
.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.input-group input::placeholder {
    color: var(--text-muted);
}

.login-form .btn-primary {
    width: 100%;
    margin-top: 10px;
}

.error-msg {
    margin-top: 15px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    border-radius: 8px;
    color: var(--accent-danger);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.error-msg.show { opacity: 1; }

.waiting-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* PLAYER GAME SCREEN */
#game-screen {
    flex-direction: column;
}

.player-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.header-stats {
    display: flex;
    gap: 10px;
    align-items: center;
}

.team-name-display {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.rank-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-warning);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 60px;
    text-align: center;
}

.leave-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 1rem;
    opacity: 0.6;
    transition: all 0.2s;
}
.leave-btn:hover {
    opacity: 1;
    border-color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    max-height: calc(100dvh - 60px);
}

.game-mode {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 0;
}

/* Input Mode Container - für Estimate, Sort, Open */
.input-mode-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.mode-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* Big Input Fields */
.big-input {
    width: 100%;
    padding: 20px 24px;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.big-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--glow-primary);
}

.big-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Big Textarea */
.big-textarea {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    font-size: 1.2rem;
    line-height: 1.5;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}

.big-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--glow-primary);
}

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

/* Big Submit Button */
.btn-submit-big {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-success), #059669);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit-big:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-success);
}

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

.buzzer-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.buzzer {
    width: 70vw;
    height: 70vw;
    max-width: 320px;
    max-height: 320px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ef4444, #dc2626);
    border: none;
    box-shadow: 
        0 10px 40px rgba(239, 68, 68, 0.4),
        inset 0 -8px 20px rgba(0,0,0,0.3),
        inset 0 8px 20px rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}
.buzzer::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 30%;
    height: 20%;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    filter: blur(5px);
}
.buzzer-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.buzzer:active, .buzzer.pressed {
    transform: scale(0.95);
    box-shadow: 
        0 5px 20px rgba(239, 68, 68, 0.3),
        inset 0 -4px 10px rgba(0,0,0,0.3);
}

.buzzer.locked {
    background: linear-gradient(145deg, #4b5563, #374151);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.buzzer.active-winner {
    background: linear-gradient(145deg, var(--accent-success), #059669);
    box-shadow: 0 10px 50px var(--glow-success);
    animation: winner-pulse 0.5s ease infinite;
}
@keyframes winner-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.buzzer.blocked {
    background: linear-gradient(145deg, #374151, #1f2937);
    box-shadow: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Queue States */
.buzzer.late {
    background: linear-gradient(145deg, var(--accent-warning), #d97706);
    box-shadow: 0 5px 25px rgba(245, 158, 11, 0.3);
    animation: pulse-late 2s infinite;
}
@keyframes pulse-late {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.buzzer.queue {
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 5px 25px var(--glow-primary);
}

/* Feedback-Animationen */
.buzzer.feedback-correct {
    background: linear-gradient(145deg, var(--accent-success), #059669) !important;
    box-shadow: 0 0 60px var(--glow-success) !important;
    animation: correctPulse 0.6s ease;
}
@keyframes correctPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.buzzer.feedback-wrong {
    animation: wrongShake 0.5s ease;
}
@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-15px); }
    40% { transform: translateX(15px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

.status-text {
    margin-top: 15px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    min-height: 1.5em;
}

/* VOTING */
.vote-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    padding: 10px;
}
.vote-btn {
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 15px;
    border: 3px solid transparent;
    transition: all 0.2s;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    min-height: 60px;
}
.vote-letter {
    font-size: 1.8rem;
    font-weight: 800;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    flex-shrink: 0;
}
.vote-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.3;
    word-break: break-word;
}
.vote-a { background: linear-gradient(135deg, #ef4444, #dc2626); }
.vote-b { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.vote-c { background: linear-gradient(135deg, #f59e0b, #d97706); }
.vote-d { background: linear-gradient(135deg, #10b981, #059669); }

.vote-btn:active { transform: scale(0.98); }
.vote-btn.selected { 
    border-color: white;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
    transform: scale(1.01);
}
.vote-btn.disabled { opacity: 0.4; pointer-events: none; }

/* Tablet/Desktop: larger vote buttons */
@media (min-width: 600px) {
    .vote-btn {
        padding: 20px 25px;
        font-size: 1.1rem;
        min-height: 70px;
    }
    .vote-letter {
        font-size: 2rem;
        min-width: 55px;
        height: 55px;
    }
    .vote-text {
        font-size: 1.1rem;
    }
    .big-textarea {
        min-height: 200px;
    }
}

/* OVERLAYS */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.overlay-content {
    text-align: center;
    padding: 40px;
}
.overlay-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* ========================================
   HOST PAGE
   ======================================== */
.host-body {
    background: var(--bg-dark);
}

.setup-container {
    width: 100%;
    max-width: 500px;
    padding: 40px;
    margin: auto;
    text-align: center;
}

.game-info {
    margin-top: 30px;
    text-align: left;
}
.info-card {
    background: var(--bg-panel);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}
.info-card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.code-display {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: var(--accent-cyan);
    text-align: center;
}
.url-display {
    font-family: monospace;
    font-size: 0.85rem;
    background: var(--bg-dark);
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
    margin-bottom: 12px;
}
.info-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* HOST CONTROL */
.host-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
}
.header-left {
    display: flex;
    gap: 20px;
}
.game-code-small, .team-count {
    color: var(--text-secondary);
}
.game-code-small strong {
    color: var(--accent-cyan);
}

.host-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    padding: 15px;
    height: calc(100vh - 60px);
}

.panel {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    overflow-y: auto;
}
.panel h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.panel h4 {
    margin: 15px 0 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.panel hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* MODE TABS */
.mode-tabs {
    display: flex;
    gap: 8px;
}
.mode-tab {
    flex: 1;
    padding: 12px;
    background: var(--bg-dark);
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
}
.mode-tab.active {
    background: var(--accent-primary);
    color: white;
}

.active-team-display {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}
#active-team-label {
    color: var(--text-muted);
}
#active-team-label.has-team {
    color: var(--text-primary);
}
.active-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-success);
}
.queue-list {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.points-config {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}
.points-config input {
    width: 80px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    text-align: center;
}

/* VOTING CONTROLS */
.vote-counter {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}
#vote-count { color: var(--accent-cyan); font-weight: 700; }

.correct-select {
    margin-bottom: 20px;
}
.option-btns {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.opt-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-dark);
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 600;
}
.opt-btn.active {
    background: var(--accent-success);
    color: white;
}

/* TEAM LIST */
#team-list {
    list-style: none;
}
.team-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 10px;
    margin-bottom: 8px;
}
.team-name {
    flex: 1;
    font-weight: 500;
}
.team-score {
    font-weight: 700;
    color: var(--accent-cyan);
    margin-right: 15px;
}
.team-actions {
    display: flex;
    gap: 5px;
}
.team-actions button {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 1rem;
}
.team-actions .kick-btn {
    background: var(--accent-danger);
    border: none;
    color: white;
}

/* MEDIA PANEL */
.media-upload {
    margin-bottom: 15px;
}
.media-upload input[type="file"] {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border-radius: 8px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.media-controls {
    display: flex;
    gap: 10px;
}
.reveal-config {
    display: flex;
    align-items: center;
    gap: 10px;
}
.reveal-config input {
    width: 60px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    text-align: center;
}

/* ========================================
   BEAMER PAGE
   ======================================== */
.beamer-body {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 100%);
    overflow: hidden;
}

.beamer-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.stage {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#media-container {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}
#media-container img,
#media-container video,
#media-container canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#game-overlay {
    text-align: center;
    z-index: 10;
}

.mode-badge {
    display: inline-block;
    padding: 10px 30px;
    background: var(--accent-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 40px;
}

.display-content {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.waiting-icon {
    font-size: 8rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

#waiting-display h1 {
    font-size: 3rem;
    color: var(--text-secondary);
}

.winner-label {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    letter-spacing: 5px;
}
.winner-name {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-success), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: winner-appear 0.5s ease;
}
@keyframes winner-appear {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#voting-display h2 {
    font-size: 3rem;
    margin-bottom: 30px;
}
#vote-progress {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* VOTING CHART */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 40px;
    height: 50vh;
}
.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.bar-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.bar {
    width: 80px;
    background: var(--bg-card);
    border-radius: 10px 10px 0 0;
    transition: height 1s ease;
    min-height: 10px;
}
.bar-correct {
    background: linear-gradient(180deg, var(--accent-success), #059669);
    box-shadow: 0 0 30px var(--glow-success);
}
.bar-label {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 15px;
    color: var(--text-secondary);
}
.label-correct {
    color: var(--accent-success);
}

/* SCOREBOARD */
.scoreboard {
    background: var(--bg-panel);
    padding: 15px 30px;
    border-top: 2px solid var(--accent-primary);
}
#scores-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 5px 0;
}
.score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-dark);
    padding: 10px 20px;
    border-radius: 30px;
    white-space: nowrap;
}
.score-item.leader {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}
.score-item .rank {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.score-item.leader .rank { color: rgba(255,255,255,0.7); }
.score-item .name {
    font-weight: 600;
}
.score-item .points {
    font-weight: 700;
    color: var(--accent-cyan);
}
.score-item.leader .points { color: white; }

/* EFFECTS */
.fullscreen-effect {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: effect-flash 1s ease forwards;
}
@keyframes effect-flash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}
.correct-effect {
    background: rgba(16, 185, 129, 0.3);
}
.wrong-effect {
    background: rgba(239, 68, 68, 0.3);
}
.effect-icon {
    font-size: 20rem;
    animation: effect-pop 0.5s ease;
}
@keyframes effect-pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}
.correct-effect .effect-icon { color: var(--accent-success); }
.wrong-effect .effect-icon { color: var(--accent-danger); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .host-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .panel {
        max-height: 400px;
    }
}

/* ========================================
   PLAYER NEW INPUT MODES
   ======================================== */

/* SORT MODE (Player) */
#sort-mode .sort-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.sort-item-player {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s;
    touch-action: none;
}

.sort-item-player:active {
    cursor: grabbing;
}

.sort-item-player.dragging {
    opacity: 0.6;
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
    transform: scale(1.02);
}

.sort-handle {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.sort-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Sort Result Feedback */
.sort-item-player.result {
    cursor: default;
    padding: 14px 18px;
}
.sort-item-player.result.correct {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.15);
}
.sort-item-player.result.wrong {
    border-color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}
.sort-pos-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.sort-item-player.correct .sort-pos-indicator {
    background: var(--accent-success);
    color: #000;
}
.sort-item-player.wrong .sort-pos-indicator {
    background: var(--accent-danger);
    color: white;
}
.sort-correct-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* WAITING MODE */
#waiting-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.waiting-icon {
    font-size: 5rem;
    animation: pulse 2s ease-in-out infinite;
}

.waiting-text {
    margin-top: 20px;
    font-size: 1.3rem;
    color: var(--text-secondary);
}

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

/* TEXT ANSWER EVALUATION */
#text-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.text-answer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.text-answer-item .info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.text-answer-item .name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.text-answer-item .answer {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.text-answer-item .actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.text-answer-item.status-correct {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.1);
}

.text-answer-item.status-wrong {
    border-color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}

.text-answer-item .btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text-muted);
    transition: all 0.2s;
}

.text-answer-item .btn-icon:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.text-answer-item .btn-icon.active {
    color: white;
    border-color: transparent;
}

.text-answer-item .btn-icon:first-child.active {
    background: var(--accent-success);
    box-shadow: 0 0 10px var(--glow-success);
}

.text-answer-item .btn-icon:last-child.active {
    background: var(--accent-danger);
    box-shadow: 0 0 10px var(--glow-danger);
}
