/* =====================================================
   ☕ Kaffeekränzchen — Watch Together (W2G)
   Reuses palette / variables from panel.css.
   Design language: glassmorphism + gold accents.
   ===================================================== */

.w2g-body {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(60, 35, 18, 0.55), transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(30, 20, 10, 0.5), transparent 60%),
        var(--bg);
    min-height: 100vh;
}

/* Toast container (panel.css declares it inside its scope — redeclare cleanly) */
.toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 10px 16px;
    background: rgba(25, 18, 12, 0.96);
    border: 1px solid var(--cream-15);
    border-radius: 10px;
    color: var(--cream);
    font-size: 0.85rem; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transform: translateY(20px); opacity: 0;
    transition: all 0.25s ease;
    pointer-events: auto;
    max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---------- Sub-header (Room-Chip unter dem shared Header) ---------- */
/* Zeigt nur den Raum-Code, wenn man in einem Raum ist. Der User-Name
   liegt schon im shared Header oben rechts — keine Doppelung mehr. */
.w2g-subheader {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--cream-08);
    background: rgba(14, 9, 6, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
/* Sub-Header verstecken, wenn der Room-Chip ausgeblendet ist (z. B. in
   der Lobby) — ansonsten zeigt sich nur ein leerer Streifen. */
.w2g-subheader:empty,
.w2g-subheader:has(> .w2g-room-chip[style*="display:none"]) {
    display: none;
}
@media (max-width: 600px) {
    .w2g-subheader { padding: 8px 14px; justify-content: center; flex-wrap: wrap; }
}

/* ---------- Room chip in nav ---------- */
.w2g-room-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px 4px 12px;
    background: rgba(212, 160, 83, 0.1);
    border: 1px solid rgba(212, 160, 83, 0.3);
    border-radius: 8px;
    font-size: 0.78rem;
}
.w2g-room-label {
    color: var(--cream-50);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
}
.w2g-room-chip code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.82rem;
}
.w2g-chip-btn {
    background: transparent; border: none; color: var(--cream-50);
    cursor: pointer; font-size: 0.85rem;
    padding: 2px 4px; border-radius: 4px;
    transition: all 0.15s ease;
}
.w2g-chip-btn:hover { color: var(--gold); background: rgba(212,160,83,0.1); }

/* ---------- PAGE HERO (kk-hero — Lobby-only Banner) ---------- */
.w2g-page-hero {
    max-width: 1200px;
    margin: 24px auto 0 !important;
    width: calc(100% - 48px);
}
@media (max-width: 640px) {
    .w2g-page-hero { width: calc(100% - 28px); margin: 16px auto 0 !important; }
}

/* ---------- LOBBY ---------- */
.w2g-lobby {
    min-height: calc(100vh - 220px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 32px 20px 60px;
}
.w2g-lobby-card {
    max-width: 460px; width: 100%;
    background: linear-gradient(145deg, rgba(40, 25, 15, 0.9), rgba(25, 15, 8, 0.9));
    border: 1px solid var(--cream-15);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(212, 160, 83, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeInUp 0.4s ease;
}
.w2g-lobby-logo {
    width: 56px; height: 56px; border-radius: 14px;
    display: block; margin: 0 auto 14px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.w2g-lobby-card h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem; font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}
.w2g-lobby-sub {
    text-align: center; color: var(--cream-50);
    font-size: 0.88rem; margin-bottom: 26px;
}

.w2g-lobby-section { margin-bottom: 18px; }
.w2g-lobby-label {
    display: block;
    font-size: 0.72rem; color: var(--cream-50);
    text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 8px;
}
.w2g-lobby-card input[type="text"] {
    width: 100%;
    background: rgba(15, 10, 5, 0.7);
    border: 1px solid var(--cream-15);
    color: var(--cream);
    padding: 11px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.w2g-lobby-card input[type="text"]:focus { border-color: var(--gold); }
.w2g-lobby-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.72rem; color: var(--cream-30);
}
.w2g-lobby-hint a { color: var(--gold-light); text-decoration: none; }
.w2g-lobby-hint a:hover { text-decoration: underline; }

.w2g-lobby-actions { display: flex; flex-direction: column; gap: 14px; }
.w2g-big-btn {
    width: 100%; padding: 13px 20px !important; font-size: 0.95rem !important;
}
.w2g-lobby-divider {
    display: flex; align-items: center; gap: 10px;
    color: var(--cream-30);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.w2g-lobby-divider::before,
.w2g-lobby-divider::after {
    content: ''; flex: 1; height: 1px;
    background: var(--cream-15);
}
.w2g-lobby-join-row {
    display: flex; gap: 8px;
}
.w2g-lobby-join-row input { flex: 1; }

.w2g-lobby-footer { margin-top: 22px; text-align: center; }
.w2g-support { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.w2g-support-pill {
    padding: 4px 10px;
    background: var(--cream-08);
    border: 1px solid var(--cream-15);
    border-radius: 20px;
    font-size: 0.72rem;
    color: var(--cream-50);
    font-weight: 600;
}

/* ---------- ROOM ---------- */
.w2g-room {
    max-width: 1500px;
    margin: 0 auto;
    padding: 18px 20px 30px;
}
.w2g-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}
@media (max-width: 960px) {
    .w2g-layout { grid-template-columns: 1fr; }
}

.w2g-player-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.w2g-side-col {
    display: flex; flex-direction: column;
    background: linear-gradient(145deg, rgba(40, 25, 15, 0.85), rgba(25, 15, 8, 0.85));
    border: 1px solid var(--cream-15);
    border-radius: 16px;
    overflow: hidden;
    height: calc(100vh - 120px);
    max-height: 800px;
    min-height: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
@media (max-width: 960px) {
    .w2g-side-col { height: 560px; max-height: none; }
}

/* Player card */
.w2g-player-card { padding: 0 !important; overflow: hidden; }
.w2g-player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-bottom: 1px solid var(--cream-15);
    overflow: hidden;
}
.w2g-player-iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: none;
}
.w2g-player-iframe.active { display: block; }
.w2g-player-iframe iframe {
    width: 100%; height: 100%; border: 0;
}
.w2g-player-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 20px;
    background:
        radial-gradient(ellipse at center, rgba(212, 160, 83, 0.08), transparent 60%),
        linear-gradient(145deg, #1a1410, #0a0706);
}
.w2g-placeholder-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.w2g-placeholder-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem; font-weight: 700;
    color: var(--cream); margin-bottom: 4px;
}
.w2g-placeholder-sub { color: var(--cream-30); font-size: 0.85rem; max-width: 320px; }

.w2g-player-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(15, 10, 5, 0.5);
    flex-wrap: wrap;
}
.w2g-np-info { flex: 1; min-width: 200px; overflow: hidden; }
.w2g-np-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    color: var(--cream);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.w2g-np-meta {
    font-size: 0.75rem; color: var(--cream-30);
    margin-top: 2px;
}
.w2g-player-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.w2g-vote-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: rgba(212, 160, 83, 0.15);
    color: var(--gold-light);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* Add card */
.w2g-add-card { padding: 18px 22px !important; }

/* ---------- SIDEBAR ---------- */
.w2g-side-tabs {
    display: flex;
    background: rgba(15, 10, 5, 0.4);
    border-bottom: 1px solid var(--cream-15);
    flex-shrink: 0;
}
.w2g-side-tab {
    flex: 1;
    padding: 11px 8px;
    background: transparent;
    border: none; border-bottom: 2px solid transparent;
    color: var(--cream-50);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all 0.18s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.w2g-side-tab:hover { color: var(--cream); background: var(--cream-08); }
.w2g-side-tab.active {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
    background: var(--cream-08);
}
.w2g-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 18px;
    padding: 0 5px;
    background: rgba(212, 160, 83, 0.15);
    border: 1px solid rgba(212, 160, 83, 0.25);
    color: var(--gold-light);
    border-radius: 9px;
    font-size: 0.68rem; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.w2g-side-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}
.w2g-side-panel.active { display: flex; }

/* Chat */
.w2g-chat-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.w2g-chat-empty {
    color: var(--cream-30);
    text-align: center;
    padding: 30px 16px;
    font-size: 0.88rem;
}
.w2g-chat-msg {
    display: flex; gap: 9px;
    animation: w2gFadeIn 0.18s ease;
}
.w2g-chat-avatar {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--cream-08);
    border: 1px solid var(--cream-15);
    overflow: hidden;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1rem;
}
.w2g-chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w2g-chat-body { flex: 1; min-width: 0; }
.w2g-chat-head {
    display: flex; gap: 8px; align-items: baseline;
    margin-bottom: 1px;
}
.w2g-chat-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cream);
}
.w2g-chat-name.host { color: var(--gold-light); }
.w2g-chat-time {
    font-size: 0.68rem;
    color: var(--cream-30);
    font-family: 'JetBrains Mono', monospace;
}
.w2g-chat-text {
    color: var(--cream);
    font-size: 0.87rem;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.w2g-chat-sys {
    align-self: center;
    padding: 3px 12px;
    background: rgba(212, 160, 83, 0.08);
    border: 1px solid rgba(212, 160, 83, 0.18);
    color: var(--cream-50);
    font-size: 0.75rem;
    border-radius: 16px;
    text-align: center;
    animation: w2gFadeIn 0.18s ease;
}

.w2g-chat-input-row {
    display: flex; gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--cream-15);
    background: rgba(15, 10, 5, 0.4);
    flex-shrink: 0;
}
.w2g-chat-input-row input {
    flex: 1;
    background: rgba(15, 10, 5, 0.7);
    border: 1px solid var(--cream-15);
    color: var(--cream);
    padding: 9px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 0;
}
.w2g-chat-input-row input:focus { border-color: var(--gold); }
.w2g-chat-input-row .radio-btn { padding: 8px 14px; }

/* User list */
.w2g-user-list {
    padding: 8px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.w2g-user-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.15s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}
.w2g-user-row:hover { background: var(--cream-08); border-color: var(--cream-15); }
.w2g-user-row.is-me {
    background: rgba(212, 160, 83, 0.08);
    border-color: rgba(212, 160, 83, 0.2);
}
.w2g-user-avatar {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--cream-08);
    border: 1px solid var(--cream-15);
    overflow: hidden;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.w2g-user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w2g-user-info { flex: 1; min-width: 0; }
.w2g-user-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem; font-weight: 700;
    color: var(--cream);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.w2g-user-meta { font-size: 0.7rem; color: var(--cream-30); }
.w2g-user-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.w2g-badge-host {
    padding: 2px 7px;
    background: linear-gradient(135deg, rgba(212,160,83,0.25), rgba(232,200,126,0.15));
    border: 1px solid rgba(212,160,83,0.4);
    color: var(--gold-light);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.w2g-badge-guest {
    padding: 2px 7px;
    background: var(--cream-08);
    border: 1px solid var(--cream-15);
    color: var(--cream-50);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.w2g-badge-voted {
    padding: 2px 7px;
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #a5c9fb;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Queue */
.w2g-queue-list {
    flex: 1; overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.w2g-queue-row {
    display: flex; gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cream-08);
    border-radius: 10px;
    transition: all 0.15s ease;
}
.w2g-queue-row:hover { background: var(--cream-08); border-color: var(--cream-15); }
.w2g-queue-thumb {
    flex-shrink: 0;
    width: 72px; height: 42px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--cream-30);
}
.w2g-queue-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w2g-queue-src {
    position: absolute;
    bottom: 2px; right: 2px;
    font-size: 0.6rem; font-weight: 700;
    padding: 1px 4px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--cream);
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.w2g-queue-info { flex: 1; min-width: 0; }
.w2g-queue-title {
    font-size: 0.82rem; font-weight: 700;
    color: var(--cream);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.w2g-queue-meta {
    font-size: 0.7rem;
    color: var(--cream-30);
    margin-top: 3px;
}
.w2g-queue-actions {
    display: flex; flex-direction: column; gap: 3px;
    flex-shrink: 0;
}
.w2g-queue-actions button {
    padding: 3px 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--cream-15);
    color: var(--cream-50);
    border-radius: 5px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.w2g-queue-actions button:hover {
    background: var(--cream-08);
    color: var(--cream);
    border-color: var(--gold);
}
.w2g-queue-actions button.danger:hover { border-color: var(--red); color: #fca5a5; }

/* Connection pill */
.w2g-conn {
    position: fixed;
    bottom: 16px; left: 16px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(25, 18, 12, 0.95);
    border: 1px solid var(--cream-15);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--cream-50);
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.w2g-conn-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cream-30);
    transition: all 0.2s ease;
}
.w2g-conn-dot.connected {
    background: var(--green);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}
.w2g-conn-dot.connecting {
    background: var(--gold);
    animation: radioPulse 1.2s infinite;
}
.w2g-conn-dot.disconnected {
    background: var(--red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

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

/* ---------- THEATER MODE ---------- */
/* Theater button */
.w2g-theater-btn {
    background: linear-gradient(135deg, rgba(120, 80, 200, 0.2), rgba(80, 60, 160, 0.15)) !important;
    border-color: rgba(120, 80, 200, 0.4) !important;
    color: #c4b5fd !important;
    transition: all 0.2s ease !important;
}
.w2g-theater-btn:hover {
    background: linear-gradient(135deg, rgba(120, 80, 200, 0.35), rgba(80, 60, 160, 0.25)) !important;
    border-color: rgba(140, 100, 220, 0.6) !important;
    color: #ddd6fe !important;
    box-shadow: 0 0 12px rgba(120, 80, 200, 0.2) !important;
}

/* Theater mode: full-viewport layout with Twitch-style sidebar */
.w2g-theater .w2g-subheader { display: none; }
.w2g-theater #kkHeader { display: none; }

.w2g-theater .w2g-room {
    max-width: none;
    padding: 0;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #000;
}

.w2g-theater .w2g-layout {
    height: 100vh;
    grid-template-columns: 1fr 380px;
    gap: 0;
    align-items: stretch;
}

.w2g-theater .w2g-player-col {
    gap: 0;
    height: 100vh;
    justify-content: stretch;
}

.w2g-theater .w2g-player-card {
    flex: 1;
    border-radius: 0 !important;
    border: none !important;
    background: #000 !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
}

.w2g-theater .w2g-player-wrap {
    flex: 1;
    aspect-ratio: unset;
}

.w2g-theater .w2g-player-bar {
    background: rgba(10, 6, 3, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* Hide the add-card below the player in theater mode */
.w2g-theater .w2g-add-card { display: none; }

/* Sidebar in theater mode: full height, no rounded corners */
.w2g-theater .w2g-side-col {
    height: 100vh;
    max-height: none;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(20, 14, 8, 0.98), rgba(12, 8, 4, 0.98));
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}

/* Theater mode: connection pill adjusts */
.w2g-theater .w2g-conn {
    bottom: 8px;
    left: 8px;
    z-index: 600;
}

/* Theater mode responsive: sidebar overlays on mobile */
@media (max-width: 960px) {
    .w2g-theater .w2g-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    .w2g-theater .w2g-side-col {
        height: 45vh;
        min-height: 200px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* Smooth transitions for theater mode toggle */
.w2g-room,
.w2g-layout,
.w2g-player-col,
.w2g-player-card,
.w2g-side-col,
.w2g-player-wrap {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sync indicator pulse animation for auto-sync feedback */
@keyframes w2gSyncPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.3); }
    50% { box-shadow: 0 0 8px 2px rgba(74, 222, 128, 0.15); }
}

/* =====================================================
   W2G PANEL TAB (inside panel.html)
   ===================================================== */
.w2g-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 880px) {
    .w2g-panel-grid { grid-template-columns: 1fr; }
}
.w2g-panel-hero {
    text-align: center;
    padding: 28px 22px !important;
}
.w2g-panel-hero-icon {
    font-size: 2.4rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(212, 160, 83, 0.3));
}
.w2g-panel-hero h3 {
    font-size: 1.25rem !important;
    margin-bottom: 10px !important;
}
.w2g-panel-hero .w2g-big-btn { max-width: 280px; margin: 12px auto 0; }

.w2g-panel-list-card { grid-column: span 2; }
@media (max-width: 880px) {
    .w2g-panel-list-card { grid-column: span 1; }
}
.w2g-panel-list-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.w2g-panel-list-header h3 { margin: 0 !important; }
.w2g-panel-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.w2g-panel-room-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cream-15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.w2g-panel-room-card:hover {
    background: var(--cream-08);
    border-color: var(--gold);
    transform: translateY(-1px);
}
.w2g-panel-room-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem; font-weight: 700;
    color: var(--gold-light);
}
.w2g-panel-room-title {
    font-size: 0.82rem; color: var(--cream);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.w2g-panel-room-users {
    font-size: 0.72rem; color: var(--cream-30);
}
.radio-queue-empty {
    text-align: center;
    color: var(--cream-30);
    padding: 20px 10px;
    font-size: 0.85rem;
}

.w2g-info-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.w2g-info-list li {
    color: var(--cream-50);
    font-size: 0.85rem;
    padding-left: 18px;
    position: relative;
}
.w2g-info-list li::before {
    content: '•';
    position: absolute; left: 4px; top: 0;
    color: var(--gold);
    font-weight: 700;
}
.w2g-info-list li b { color: var(--cream); font-weight: 700; }

/* =====================================================
   ☕ MEIN HUB UNIFICATION LAYER
   Aligns Watch Together visuals with the Mein-Hub
   surface tokens (var(--surface), var(--border), gold
   accents, hub-section radii). Keeps existing layout/JS
   hooks intact — only restyles backgrounds, borders,
   inputs, buttons.
   ===================================================== */

/* --- Body background: keep warm but match hub muted tone --- */
.w2g-body {
    background:
        radial-gradient(ellipse at 15% 0%, rgba(212, 160, 83, 0.06), transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(212, 160, 83, 0.04), transparent 60%),
        var(--bg);
}

/* --- Sub-header: match hub-section ambient tone --- */
.w2g-subheader {
    background: rgba(15, 10, 6, 0.55);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.w2g-room-chip {
    background: rgba(212, 160, 83, 0.08);
    border: 1px solid rgba(212, 160, 83, 0.28);
    border-radius: 10px;
    padding: 5px 12px 5px 14px;
}

/* --- LOBBY: turn the brown gradient card into a hub-style card --- */
.w2g-lobby {
    padding: 28px 20px 60px;
}
.w2g-lobby-card {
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 30px;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(212, 160, 83, 0.04) inset;
    position: relative;
    overflow: hidden;
}
.w2g-lobby-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(212, 160, 83, 0.05), transparent 45%);
    pointer-events: none;
    border-radius: inherit;
}
.w2g-lobby-card > * { position: relative; z-index: 1; }

.w2g-lobby-logo {
    width: 60px; height: 60px;
    border-radius: 16px;
    margin: 0 auto 16px;
    filter: drop-shadow(0 6px 18px rgba(212, 160, 83, 0.25));
}
.w2g-lobby-card h1 {
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}
.w2g-lobby-sub {
    font-size: 0.9rem;
    color: var(--cream-50);
    margin-bottom: 28px;
}

.w2g-lobby-section { margin-bottom: 20px; }
.w2g-lobby-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cream-50);
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

/* Inputs match hub-action-input / radio inputs */
.w2g-lobby-card input[type="text"] {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--cream);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.w2g-lobby-card input[type="text"]:focus {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(212, 160, 83, 0.12);
}

.w2g-lobby-divider {
    color: var(--cream-30);
    font-size: 0.7rem;
    margin: 4px 0;
}
.w2g-lobby-divider::before,
.w2g-lobby-divider::after {
    background: var(--border);
}
.w2g-lobby-join-row { gap: 10px; }

.w2g-lobby-footer { margin-top: 24px; }
.w2g-support-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--cream-50);
    border-radius: 999px;
    padding: 5px 12px;
}

/* --- ROOM layout: hub-style side panels --- */
.w2g-room { padding: 20px 20px 40px; }
.w2g-layout { gap: 20px; }

.w2g-side-col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.w2g-player-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.w2g-player-wrap {
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}
.w2g-player-bar {
    background: rgba(0, 0, 0, 0.25);
    padding: 14px 18px;
}
.w2g-np-title { font-size: 0.98rem; }

.w2g-add-card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 20px 22px !important;
}

/* --- Sidebar: match hub-section internal aesthetic --- */
.w2g-side-tabs {
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
}
.w2g-side-tab {
    padding: 13px 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--cream-50);
}
.w2g-side-tab:hover {
    color: var(--cream);
    background: rgba(212, 160, 83, 0.06);
}
.w2g-side-tab.active {
    color: var(--gold-light);
    background: linear-gradient(180deg, rgba(212, 160, 83, 0.12), rgba(212, 160, 83, 0.04));
    border-bottom-color: var(--gold);
}
.w2g-badge {
    background: rgba(212, 160, 83, 0.16);
    border: 1px solid rgba(212, 160, 83, 0.32);
    color: var(--gold-light);
}

/* Chat */
.w2g-chat-scroll { padding: 14px 16px; gap: 10px; }
.w2g-chat-empty {
    color: var(--cream-30);
    padding: 36px 18px;
    font-size: 0.9rem;
}
.w2g-chat-avatar {
    background: rgba(212, 160, 83, 0.08);
    border: 1px solid var(--border);
}
.w2g-chat-input-row {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
    padding: 12px;
    gap: 8px;
}
.w2g-chat-input-row input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
}
.w2g-chat-input-row input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 83, 0.12);
}

/* User list */
.w2g-user-list { padding: 10px; gap: 6px; }
.w2g-user-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 9px 12px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.w2g-user-row:hover {
    background: rgba(212, 160, 83, 0.06);
    border-color: rgba(212, 160, 83, 0.18);
    transform: translateX(2px);
}
.w2g-user-row.is-me {
    background: rgba(212, 160, 83, 0.1);
    border-color: rgba(212, 160, 83, 0.28);
}
.w2g-user-avatar {
    background: rgba(212, 160, 83, 0.08);
    border: 1px solid var(--border);
}

/* Queue */
.w2g-queue-list { padding: 10px; gap: 8px; }
.w2g-queue-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.w2g-queue-row:hover {
    background: rgba(212, 160, 83, 0.05);
    border-color: rgba(212, 160, 83, 0.22);
    transform: translateY(-1px);
}
.w2g-queue-thumb {
    background: var(--bg);
    border-radius: 8px;
    width: 80px; height: 46px;
}
.w2g-queue-title { font-size: 0.84rem; }

.w2g-queue-actions button {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    color: var(--cream-50);
    border-radius: 8px;
    padding: 4px 9px;
    font-size: 0.72rem;
    transition: all 0.18s ease;
}
.w2g-queue-actions button:hover {
    background: rgba(212, 160, 83, 0.1);
    color: var(--gold-light);
    border-color: var(--gold);
}
.w2g-queue-actions button.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
}

/* Connection pill */
.w2g-conn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* --- Panel-tab cards (inside panel.html) keep hub-action style --- */
.w2g-panel-room-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.w2g-panel-room-card:hover {
    background: rgba(212, 160, 83, 0.06);
    border-color: rgba(212, 160, 83, 0.32);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

/* Theater-mode side col stays full-bleed */
.w2g-theater .w2g-side-col {
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
    background: var(--surface);
}
.w2g-theater .w2g-player-card {
    border-radius: 0 !important;
    border: none !important;
}
