/* ==========================================================================
   GAMES HUB & QWIXX PWA STYLESHEET
   ========================================================================== */

:root {
    --bg-main: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --glow-color: rgba(59, 130, 246, 0.4);

    --color-green: #10b981;
    --color-orange: #f59e0b;
    --color-red: #ef4444;
    --color-blue: #3b82f6;

    --qwixx-red: #dc2626;
    --qwixx-yellow: #ca8a04;
    --qwixx-green: #16a34a;
    --qwixx-blue: #2563eb;

    --border-radius: 12px;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

button, input, select, textarea {
    font-family: inherit;
}

body.games-hub-body {
    padding: 1.25rem 0.75rem;
    min-height: 100vh;
}

.hub-container {
    max-width: 640px;
    margin: 0 auto;
}

.hub-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hub-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.hub-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 12px var(--glow-color);
}

.btn-primary { background-color: var(--accent); }
.btn-success { background-color: var(--color-green); }
.btn-success:hover { background-color: #059669; }
.btn-danger { background-color: var(--color-red); }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--bg-surface-hover);
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: var(--bg-surface-hover);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1.1rem;
    width: 100%;
}

.btn-whatsapp {
    background-color: #25d366;
    color: #ffffff;
}
.btn-whatsapp:hover {
    background-color: #128c7e;
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.5);
}

/* Kachel Grid */
.games-kachel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.game-kachel {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-kachel:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--glow-color);
}

.game-kachel-icon {
    font-size: 3rem;
    line-height: 1;
}

.game-kachel-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.game-kachel-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.game-kachel-badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}

/* Card Boxen */
.card-box {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.card-box h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

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

.form-control {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--bg-surface-hover);
    color: var(--text-main);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--glow-color);
}

.room-code-input {
    letter-spacing: 0.3em;
    font-weight: 800;
    text-align: center;
    font-size: 1.4rem;
    text-transform: uppercase;
}

/* Join & Quick Bar */
.hub-join-bar {
    display: flex;
    gap: 0.5rem;
}

.hub-join-bar .form-control {
    flex: 1;
}

/* ==========================================================================
   QWIXX SPIELFELD & DIGITALER SPIELZETTEL
   ========================================================================== */

.qwixx-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.qwixx-room-pill {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: 0.08em;
}

.qwixx-players-scroll {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.qwixx-player-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    min-width: 115px;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.qwixx-player-card.is-active-turn {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--glow-color);
}

.qwixx-player-card.is-me {
    background: rgba(59, 130, 246, 0.12);
}

.qwixx-player-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 0.2rem;
}

.qwixx-player-kpis {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.qwixx-badge-active {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
}

.qwixx-badge-ready {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
}

.qwixx-badge-waiting {
    background: rgba(245, 158, 11, 0.2);
    color: #fde047;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
}

.btn-action-waiting {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px dashed rgba(255, 255, 255, 0.35);
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-waiting:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Würfelbereich */
.qwixx-dice-stage {
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.qwixx-dice-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    min-height: 64px;
}

.qwixx-dice-row.is-rolling .qwixx-die:not(.is-closed) {
    animation: die-shake 0.15s infinite alternate ease-in-out;
}

@keyframes die-shake {
    0% { transform: rotate(-8deg) scale(0.95); }
    100% { transform: rotate(8deg) scale(1.05); }
}

.qwixx-die {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 6px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    user-select: none;
    transition: transform 0.15s ease;
}

.qwixx-die.die-white {
    background: #f8fafc;
}
.qwixx-die.die-white .die-pip {
    background-color: #0f172a;
}

.qwixx-die.die-red {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4), inset 0 -2px 0 rgba(127, 29, 29, 0.4);
}
.qwixx-die.die-red .die-pip {
    background-color: #ffffff;
}

.qwixx-die.die-yellow {
    background: linear-gradient(145deg, #fde047, #eab308);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35), inset 0 -2px 0 rgba(161, 98, 7, 0.3);
}
.qwixx-die.die-yellow .die-pip {
    background-color: #0f172a;
}

.qwixx-die.die-green {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4), inset 0 -2px 0 rgba(20, 83, 45, 0.4);
}
.qwixx-die.die-green .die-pip {
    background-color: #ffffff;
}

.qwixx-die.die-blue {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), inset 0 -2px 0 rgba(30, 58, 138, 0.4);
}
.qwixx-die.die-blue .die-pip {
    background-color: #ffffff;
}

.qwixx-die .die-pip {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    align-self: center;
    justify-self: center;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}

/* Raster-Positionen der Augen */
.pip-top-left { grid-column: 1; grid-row: 1; }
.pip-top-right { grid-column: 3; grid-row: 1; }
.pip-mid-left { grid-column: 1; grid-row: 2; }
.pip-center { grid-column: 2; grid-row: 2; }
.pip-mid-right { grid-column: 3; grid-row: 2; }
.pip-bottom-left { grid-column: 1; grid-row: 3; }
.pip-bottom-right { grid-column: 3; grid-row: 3; }

.qwixx-die.is-closed {
    opacity: 0.35;
    filter: grayscale(0.85);
}
.qwixx-die.is-closed::after {
    content: "🔒";
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.85rem;
    background: #ca8a04;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.qwixx-white-sum-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
}

.qwixx-stage-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.qwixx-white-actions-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-action-roll {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    cursor: pointer;
    animation: pulse-roll 1.8s infinite ease-in-out;
}
.btn-action-roll:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

@keyframes pulse-roll {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.04); box-shadow: 0 6px 22px rgba(16, 185, 129, 0.65); }
}

.btn-action-next {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0.6rem 1.35rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-next:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.65);
}

.btn-action-finish {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.55);
    cursor: pointer;
    animation: pulse-finish 1.6s infinite ease-in-out;
}
.btn-action-finish:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.75);
}

@keyframes pulse-finish {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5); }
    50% { transform: scale(1.04); box-shadow: 0 6px 24px rgba(245, 158, 11, 0.75); }
}

.btn-action-pass {
    background: rgba(245, 158, 11, 0.2);
    border: 1.5px solid #f59e0b;
    color: #fef08a;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-pass:hover {
    background: #f59e0b;
    color: #0f172a;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
}

/* Farbkombinationen-Pills für den aktiven Spieler */
.qwixx-combos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.qwixx-combo-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.qwixx-combo-pill.is-locked {
    opacity: 0.4;
    text-decoration: line-through;
}

.qwixx-combo-pill.pill-red { background: rgba(220, 38, 38, 0.8); }
.qwixx-combo-pill.pill-green { background: rgba(22, 163, 74, 0.8); }
.qwixx-combo-pill.pill-yellow { background: rgba(202, 138, 4, 0.9); color: #0f172a; }
.qwixx-combo-pill.pill-blue { background: rgba(37, 99, 235, 0.8); }

.qwixx-combo-sums {
    font-size: 1.05rem;
    font-weight: 800;
}

/* Qwixx Farbreihen (Der Spielblock) */
.qwixx-sheet {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.qwixx-row {
    display: flex;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 10px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.qwixx-row-red { background: linear-gradient(90deg, rgba(220, 38, 38, 0.25), rgba(220, 38, 38, 0.1)); border: 1px solid rgba(220, 38, 38, 0.4); }
.qwixx-row-yellow { background: linear-gradient(90deg, rgba(202, 138, 4, 0.25), rgba(202, 138, 4, 0.1)); border: 1px solid rgba(202, 138, 4, 0.4); }
.qwixx-row-green { background: linear-gradient(90deg, rgba(22, 163, 74, 0.25), rgba(22, 163, 74, 0.1)); border: 1px solid rgba(22, 163, 74, 0.4); }
.qwixx-row-blue { background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.1)); border: 1px solid rgba(37, 99, 235, 0.4); }

.qwixx-cell {
    flex: 1;
    min-width: 34px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.15s ease;
}

.qwixx-row-red .qwixx-cell { color: #f87171; }
.qwixx-row-yellow .qwixx-cell { color: #fde047; }
.qwixx-row-green .qwixx-cell { color: #4ade80; }
.qwixx-row-blue .qwixx-cell { color: #60a5fa; }

.qwixx-cell:hover:not(.is-disabled):not(.is-crossed) {
    transform: scale(1.08);
    border-color: #fff;
}

.qwixx-cell.is-crossed {
    background: #ffffff !important;
    color: #0f172a !important;
    transform: scale(0.96);
}
.qwixx-cell.is-crossed::after {
    content: "✕";
    font-size: 1.6rem;
    font-weight: 900;
    color: #0f172a;
    position: absolute;
}

/* Visuelle Hervorhebung möglicher Würfelzüge */
.qwixx-cell.is-possible-move {
    box-shadow: 0 0 0 2px #ffffff, 0 0 12px rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.04);
    z-index: 2;
    animation: cell-pulse 1.8s infinite ease-in-out;
}

.qwixx-cell.is-possible-white {
    border-color: #f8fafc !important;
    box-shadow: 0 0 0 2px #f8fafc, 0 0 10px rgba(248, 250, 252, 0.5);
}

.qwixx-cell.is-possible-color {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 2px #fbbf24, 0 0 12px rgba(251, 191, 36, 0.6);
}

@keyframes cell-pulse {
    0%, 100% { transform: translateY(-2px) scale(1.04); }
    50% { transform: translateY(-2px) scale(1.08); }
}

.qwixx-cell.is-disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.3);
}

.qwixx-cell-lock {
    min-width: 38px;
    background: rgba(0, 0, 0, 0.4);
    border-style: dashed;
}

/* Fehlwürfe */
.qwixx-missed-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.qwixx-missed-slots {
    display: flex;
    gap: 0.5rem;
}

.qwixx-missed-box {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px dashed rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-red);
    cursor: pointer;
}
.qwixx-missed-box.is-checked {
    background: var(--color-red);
    color: #fff;
    border-style: solid;
}

/* Punkte-Zusammenfassung */
.qwixx-score-summary {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
    background: var(--bg-surface);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    text-align: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.qwixx-score-col-red { color: #f87171; }
.qwixx-score-col-yellow { color: #fde047; }
.qwixx-score-col-green { color: #4ade80; }
.qwixx-score-col-blue { color: #60a5fa; }
.qwixx-score-col-missed { color: var(--color-red); }
.qwixx-score-col-total { color: #ffffff; font-size: 1.1rem; font-weight: 800; }

/* Modals & Overlays */
.hub-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.hub-modal {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.hub-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.hub-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.hub-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ==========================================================================
   KNIFFEL (YAHTZEE) PWA STYLESHEET & AUSFÜLLHILFE
   ========================================================================== */

.kniffel-dice-stage {
    background: rgba(15, 23, 42, 0.7);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.kniffel-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    padding: 0 0.25rem;
}

.kniffel-roll-pill {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}
.kniffel-roll-pill.pill-roll-1 { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.kniffel-roll-pill.pill-roll-2 { background: rgba(245, 158, 11, 0.25); color: #fde047; }
.kniffel-roll-pill.pill-roll-3 { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }

.kniffel-dice-row {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    min-height: 70px;
    padding: 0.35rem 0;
}

.kniffel-die {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.kniffel-die.is-clickable {
    cursor: pointer;
}
.kniffel-die.is-clickable:hover {
    transform: translateY(-3px);
}

.kniffel-die.is-held {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.55), 0 0 0 2.5px #f59e0b;
}

.kniffel-die-lock {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 0.82rem;
    background: #f59e0b;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    animation: lock-pop 0.2s ease;
}

@keyframes lock-pop {
    0% { transform: scale(0.5); }
    100% { transform: scale(1); }
}

.kniffel-instruction-bar {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

/* Kniffel Sheet (Block) */
.kniffel-sheet {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kniffel-section {
    padding: 1.15rem;
}

.kniffel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
    min-height: 36px;
    box-sizing: border-box;
}

.kniffel-section-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.kniffel-bonus-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fde047;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}
.kniffel-bonus-badge.badge-bonus-achieved {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #86efac;
}

.kniffel-rows-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.kniffel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.kniffel-row.can-score {
    cursor: pointer;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.35);
}
.kniffel-row.can-score:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: var(--accent);
    transform: translateX(2px);
}

.kniffel-row.is-filled {
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.02);
}

.kniffel-cat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kniffel-cat-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.kniffel-cat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kniffel-cat-score {
    font-size: 1.15rem;
    font-weight: 800;
    min-width: 44px;
    text-align: right;
    color: #ffffff;
}
.kniffel-cat-score.is-zero {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.65;
}

/* Ausfüllhilfe Preview Badges */
.kniffel-cat-preview {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-left: 0.75rem;
    animation: preview-pulse 2s infinite ease-in-out;
}

.kniffel-cat-preview.preview-positive {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid #22c55e;
    color: #86efac;
}

.kniffel-cat-preview.preview-zero {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    animation: none;
    font-size: 0.75rem;
}

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

.kniffel-subtotal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kniffel-grand-total-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 800;
}
.kniffel-grand-total-card strong {
    font-size: 1.45rem;
    color: #ffffff;
}

/* Querformat & Tablet Optimierung (Landscape Mode) */
@media (min-width: 680px), (orientation: landscape) and (min-height: 480px) and (min-width: 620px) {
    .hub-container {
        max-width: 860px;
    }

    .kniffel-sheet {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.15rem;
        align-items: start;
    }

    .kniffel-grand-total-card {
        grid-column: 1 / -1;
    }
}

/* ==========================================================================
   QUARXL LIVE REAKTIONS-SYSTEM (Smilies & Spam-Schutz)
   ========================================================================== */

.quarxl-btn-react {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

/* Reaktions-Tray (Popover / Bar) */
.quarxl-reaction-tray {
    position: fixed;
    z-index: 10000;
    width: 320px;
    max-width: calc(100vw - 20px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.25);
    padding: 0.85rem;
    animation: quarxl-tray-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.quarxl-reaction-tray.hidden {
    display: none !important;
}

@keyframes quarxl-tray-pop {
    0% { transform: translateY(-8px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.quarxl-tray-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quarxl-tray-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quarxl-tray-tools {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.quarxl-btn-sound,
.quarxl-tray-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s ease, transform 0.1s ease;
}

.quarxl-btn-sound:hover,
.quarxl-tray-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.05);
}

.quarxl-tray-close {
    font-size: 1.25rem;
    line-height: 1;
}

/* Emoji Kachel-Raster (garantiert identische Button-Größen) */
.quarxl-emojis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
    box-sizing: border-box;
}

.quarxl-emoji-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 62px;
    box-sizing: border-box;
    padding: 0.35rem 0.15rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.quarxl-emoji-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.08);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.quarxl-emoji-btn:active:not(:disabled) {
    transform: scale(0.92);
}

.quarxl-emoji-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    filter: grayscale(40%);
}

.quarxl-emoji-char {
    font-size: 1.65rem;
    line-height: 1.1;
    margin-bottom: 0.15rem;
    display: block;
}

.quarxl-emoji-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
    display: block;
    line-height: 1.1;
}

/* Cooldown Banner */
.quarxl-cooldown-banner {
    margin-top: 0.65rem;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    animation: modal-in 0.18s ease;
}

/* Fliegende Reaktionen Zone */
.quarxl-floating-reactions-zone {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99990;
    overflow: hidden;
}

/* Reaktions-Toast Bubble */
.quarxl-reaction-toast {
    position: absolute;
    bottom: 80px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 0.45rem 1rem 0.45rem 0.6rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(99, 102, 241, 0.35);
    pointer-events: none;
    animation: quarxlToastFloat 3.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: calc(100vw - 40px);
}

.quarxl-reaction-toast.is-own {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(99, 102, 241, 0.55);
}

.quarxl-toast-emoji-badge {
    font-size: 2.1rem;
    line-height: 1;
    animation: quarxlEmojiBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.3);
}

.quarxl-toast-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quarxl-toast-sender {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
}

.quarxl-toast-caption {
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.2;
}

@keyframes quarxlToastFloat {
    0% { transform: translateY(35px) scale(0.85); opacity: 0; }
    12% { transform: translateY(0) scale(1.06); opacity: 1; }
    22% { transform: translateY(0) scale(1); opacity: 1; }
    75% { transform: translateY(-10px) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(0.88); opacity: 0; }
}

@keyframes quarxlEmojiBounce {
    0% { transform: scale(0.3) rotate(-20deg); }
    60% { transform: scale(1.35) rotate(12deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Aufsteigende Emoji-Partikel */
.quarxl-floating-particle {
    position: absolute;
    bottom: 50px;
    font-size: 2.3rem;
    pointer-events: none;
    line-height: 1;
    animation: quarxlParticleFly 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes quarxlParticleFly {
    0% { transform: translateY(0) translateX(0) scale(0.5); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateY(-420px) translateX(var(--sway-x, 25px)) scale(1.4); opacity: 0; }
}



/* Radio-Auswahl im Raum-Erstellen-Modal (z. B. Labyrinth) */
.hub-radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.hub-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

