/* 🎤 Rexoparty – spielspezifische Styles, Basis kommt aus arcade-ui.css */

.small { font-size: 0.8rem; }
.login-hint { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }
.login-hint a { color: var(--gold); }

/* ---------- Kategorien-Auswahl ---------- */
.quiz-cats { grid-template-columns: repeat(5, 1fr); }
.category-btn.maxed:not(.selected) { opacity: 0.4; }

/* ---------- Layout ---------- */
.quiz-layout { grid-template-columns: 1fr 260px; }

/* ---------- Board ---------- */
.board-view { width: 100%; }
.turn-banner { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1.1rem; margin-bottom: 1rem; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--stroke); font-weight: 700; }
.turn-banner.mine { border-color: rgba(255, 210, 63, 0.6); background: linear-gradient(90deg, rgba(255, 210, 63, 0.18), rgba(255, 138, 61, 0.05)); box-shadow: 0 0 24px rgba(255, 210, 63, 0.2); animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 36px rgba(255, 210, 63, 0.4); } }
.turn-avatar { font-size: 1.6rem; }
.turn-left { margin-left: auto; font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.board { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 0.55rem; perspective: 1000px; }
.board-head { display: flex; align-items: center; justify-content: center; text-align: center; gap: 0.3rem; flex-direction: column; min-height: 70px; padding: 0.5rem 0.3rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--cat) 22%, rgba(0,0,0,0.3)); border: 1px solid color-mix(in srgb, var(--cat) 50%, transparent); font-weight: 800; font-size: 0.82rem; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.03em; }
.board-head .cat-icon { font-size: 1.3rem; }
.tile { position: relative; height: clamp(54px, 10vh, 92px); border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--cat) 35%, var(--stroke)); background: linear-gradient(160deg, color-mix(in srgb, var(--cat) 30%, #1b1b3a), #121228); font-size: clamp(1.1rem, 2.6vw, 1.8rem); font-weight: 900; color: var(--gold); text-shadow: 0 2px 10px rgba(255, 210, 63, 0.45); cursor: default; transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s, filter 0.3s; animation: tileIn 0.5s cubic-bezier(.2,.8,.2,1) both; font-variant-numeric: tabular-nums; }
@keyframes tileIn { from { opacity: 0; transform: rotateX(70deg) translateY(10px); } }
.board.can-pick .tile:not(.played) { cursor: pointer; }
.board.can-pick .tile:not(.played):hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 10px 30px color-mix(in srgb, var(--cat) 45%, transparent); filter: brightness(1.15); }
.board:not(.can-pick) .tile:not(.played) { filter: saturate(0.7); }
.tile.played { opacity: 0.18; color: transparent; text-shadow: none; transform: rotateX(180deg); transition: transform 0.6s, opacity 0.6s; }
.tile.picked { animation: pickPulse 0.6s ease; }
@keyframes pickPulse { 50% { transform: scale(1.15); box-shadow: 0 0 40px var(--gold); } }

/* ---------- Frage ---------- */
.question-view { width: 100%; display: flex; flex-direction: column; align-items: center; animation: screenIn 0.35s cubic-bezier(.2,.8,.2,1); }
.stage-head { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.stage-head .category-badge { margin: 0; }
.points-badge { padding: 0.35rem 0.9rem; border-radius: 999px; background: linear-gradient(135deg, var(--gold), var(--orange)); color: #1a1000; font-weight: 900; font-variant-numeric: tabular-nums; box-shadow: 0 6px 18px rgba(255, 138, 61, 0.35); }
.points-badge.dd { background: linear-gradient(135deg, var(--pink), #a855f7); color: #fff; }
.stage { width: 100%; max-width: 100%; height: 250px; min-height: 250px; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 2rem 1.5rem; position: relative; overflow: hidden; margin-bottom: 1rem; }
.stage::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--cat, var(--gold)), transparent); }
.stage .question-text { margin: 0; max-height: 100%; overflow-y: auto; overflow-wrap: anywhere; }
.stage .question-text.typing::after { content: "▍"; color: var(--gold); animation: blink 0.9s infinite; margin-left: 2px; }
.stage-date { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; min-height: 1em; }
.dd-ribbon { position: absolute; top: 14px; right: -38px; transform: rotate(35deg); padding: 0.25rem 2.8rem; background: linear-gradient(135deg, var(--pink), #a855f7); font-weight: 900; font-size: 0.7rem; letter-spacing: 0.12em; }

.answer-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.25rem; }
.answer-btn { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: rgba(0,0,0,0.3); border: 1.5px solid var(--stroke); text-align: left; font-weight: 700; font-size: 0.98rem; cursor: default; transition: transform 0.15s, border-color 0.2s, background 0.2s, opacity 0.3s; animation: rowIn 0.35s ease both; }
.answer-btn .letter { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--glass-strong); color: var(--gold); font-weight: 900; }
.answer-btn .who-picked { margin-left: auto; font-size: 1.2rem; letter-spacing: -0.2em; }
.answer-grid.active .answer-btn:not(:disabled) { cursor: pointer; border-color: rgba(255, 210, 63, 0.45); }
.answer-grid.active .answer-btn:not(:disabled):hover { transform: translateY(-2px); background: rgba(255, 210, 63, 0.1); border-color: var(--gold); }
.answer-btn.chosen { border-color: var(--cyan); background: rgba(61, 224, 255, 0.12); }
.answer-btn.wrong { border-color: var(--red); background: rgba(255, 77, 109, 0.14); opacity: 0.8; }
.answer-btn.wrong .letter { background: var(--red); color: #fff; }
.answer-btn.correct { border-color: var(--green); background: rgba(61, 255, 162, 0.16); box-shadow: 0 0 24px rgba(61, 255, 162, 0.35); animation: correctPop 0.5s cubic-bezier(.3,1.6,.5,1); }
.answer-btn.correct .letter { background: var(--green); color: #032; }
.answer-btn:disabled { color: inherit; }
@keyframes correctPop { 50% { transform: scale(1.04); } }

.buzz-row { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.small-ring { width: 76px; height: 76px; justify-self: end; }
/* Ring-Platz freihalten, sonst springt der Buzzer beim Ein-/Ausblenden */
.buzz-row .small-ring.hidden { display: block !important; visibility: hidden; }
.small-ring .timer { font-size: 1.5rem; }
.buzz-center { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.buzzer { width: 150px; height: 150px; border-radius: 50%; border: none; cursor: pointer; background: radial-gradient(circle at 35% 30%, #ff8fa8, #ff2d55 45%, #b3002d 100%); box-shadow: 0 10px 0 #7a001f, 0 18px 40px rgba(255, 45, 85, 0.45), inset 0 -6px 12px rgba(0,0,0,0.25); transition: transform 0.08s, box-shadow 0.08s, filter 0.3s; }
.buzzer-cap { font-weight: 900; font-size: 1.5rem; letter-spacing: 0.08em; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.buzzer:not(:disabled) { animation: buzzPulse 1.2s ease-in-out infinite; }
@keyframes buzzPulse { 50% { box-shadow: 0 10px 0 #7a001f, 0 18px 60px rgba(255, 45, 85, 0.8), inset 0 -6px 12px rgba(0,0,0,0.25); } }
.buzzer:active:not(:disabled), .buzzer.pressed { transform: translateY(8px); box-shadow: 0 2px 0 #7a001f, 0 8px 20px rgba(255, 45, 85, 0.4), inset 0 -4px 10px rgba(0,0,0,0.3); }
.buzzer:disabled { cursor: not-allowed; filter: grayscale(0.85) brightness(0.55); animation: none; }
.buzz-hint { font-size: 0.75rem; color: var(--muted); }
.status-box { min-height: 3rem; font-weight: 700; font-size: 0.95rem; }
.status-box .answering { display: flex; align-items: center; gap: 0.5rem; color: var(--gold); animation: popIn 0.3s; }
.status-box .answering .big { font-size: 2rem; }
.status-box .locked { font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-top: 0.3rem; }

/* ---------- Effekte ---------- */
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0; }
.flash.good { animation: flashGood 0.6s ease; }
.flash.bad { animation: flashBad 0.6s ease; }
@keyframes flashGood { 20% { opacity: 1; background: radial-gradient(circle, rgba(61,255,162,0.25), transparent 70%); } }
@keyframes flashBad { 20% { opacity: 1; background: radial-gradient(circle, rgba(255,77,109,0.3), transparent 70%); } }
.points-float { position: fixed; z-index: 45; font-size: 2.2rem; font-weight: 900; pointer-events: none; animation: floatUp 1.3s ease-out forwards; text-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.points-float.good { color: var(--green); }
.points-float.bad { color: var(--red); }
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, 10px) scale(0.6); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } to { opacity: 0; transform: translate(-50%, -80px) scale(1); } }

.dd-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(5, 5, 15, 0.75); backdrop-filter: blur(6px); animation: screenIn 0.3s; }
.dd-card { text-align: center; animation: ddZoom 0.8s cubic-bezier(.3,1.5,.5,1); }
.dd-dice { font-size: 5rem; animation: spin 1s cubic-bezier(.2,.8,.2,1); }
.dd-title { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 900; letter-spacing: 0.06em; background: linear-gradient(135deg, var(--gold), var(--pink), #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(255, 77, 141, 0.6)); }
.dd-sub { font-size: 1.1rem; color: #e2e8f0; margin-top: 0.5rem; font-weight: 700; }
@keyframes ddZoom { from { transform: scale(0.3) rotate(-8deg); opacity: 0; } }
@keyframes spin { from { transform: rotate(-540deg) scale(0.2); } }

.stat-line { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; margin-top: 0.1rem; }
.lb-rate { color: var(--green); font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .quiz-layout { grid-template-columns: 1fr; }
    .quiz-cats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .quiz-cats { grid-template-columns: repeat(2, 1fr); }
    .board { gap: 0.3rem; }
    .board-head { font-size: 0.6rem; min-height: 56px; padding: 0.3rem 0.15rem; letter-spacing: 0; }
    .board-head .cat-icon { font-size: 1rem; }
    .tile { font-size: 0.95rem; border-radius: 8px; }
    .answer-grid { grid-template-columns: 1fr; }
    .buzz-row { grid-template-columns: auto 1fr; }
    .buzz-center { grid-column: 1 / -1; grid-row: 2; }
    .buzzer { width: 120px; height: 120px; }
    .small-ring { justify-self: start; width: 64px; height: 64px; }
    .stage { padding: 1.5rem 1rem; min-height: 130px; }
}

@media (max-width: 600px) { .stage { height: 270px; min-height: 270px; padding: 1.5rem 1rem; } }
