/* ====================================================
   SNAKE PRO MAX — Glassmorphism Design System
   ==================================================== */

/* --- BASE --- */
body {
    margin: 0; padding: 0;
    background-color: #050b14;
    overflow: hidden; color: white;
    font-family: 'Segoe UI', sans-serif;
    touch-action: none; height: 100dvh; width: 100vw;
    position: fixed; inset: 0; user-select: none;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(6, 182, 212, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(59, 130, 246, 0.04) 0%, transparent 45%);
}

/* --- LOBBY SCREEN --- */
#lobby-screen {
    position: absolute; inset: 0; z-index: 2000;
    background: rgba(5, 11, 20, 0.92);
    backdrop-filter: blur(2px);
    display: flex; flex-direction: column;
    align-items: center; padding: 15px;
}

.lobby-header {
    width: 100%; max-width: 1000px;
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    padding-bottom: 10px; gap: 5px;
}

.header-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }

.lobby-title {
    font-size: 24px; font-weight: 900;
    color: #06b6d4; text-transform: uppercase; letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.8), 0 0 40px rgba(6, 182, 212, 0.3);
}

.lobby-subtitle {
    font-size: 16px; color: #94a3b8; font-weight: bold;
    text-transform: uppercase; letter-spacing: 1px; margin-top: 5px;
}

#secret-log-btn { cursor: pointer; }
#secret-log-btn:hover { color: #ef4444; }

.lobby-input {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #fff; padding: 5px 10px; border-radius: 6px;
    font-size: 14px; width: 200px; text-align: center;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lobby-input:focus {
    outline: none;
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

#lobby-main {
    display: flex; width: 100%; max-width: 1000px;
    height: 100%; gap: 15px; overflow: hidden;
}

#lobby-rooms { flex: 2; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 5px; }
#room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

/* --- ROOM CARDS (GLASS) --- */
.room-card {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px; padding: 10px;
    cursor: pointer; display: flex; flex-direction: column;
    align-items: center; height: 90px; justify-content: center;
    position: relative; transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.room-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.18), 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.room-card:active { transform: scale(0.97); }

.rc-name { font-weight: bold; font-size: 13px; color: #fff; text-align: center; }
.rc-players { font-size: 11px; color: #94a3b8; }
.rc-status {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    margin-top: 4px; font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.st-lobby { background: rgba(6, 182, 212, 0.85); color: #000; }
.st-run { background: rgba(239, 68, 68, 0.85); color: #fff; }

.room-pin { position: absolute; top: 5px; right: 5px; font-size: 16px; cursor: pointer; z-index: 10; opacity: 0.5; }
.room-pin.active { opacity: 1; color: #fbbf24; text-shadow: 0 0 5px #fbbf24; }

/* NEW ROOM CARD */
.new-room-card {
    border: 1px dashed rgba(6, 182, 212, 0.5);
    color: #06b6d4; font-size: 30px;
    background: rgba(6, 182, 212, 0.04);
}
.new-room-card:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.7);
}

/* PLANNER TILE */
.rc-planner {
    border: 1px dashed rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.06);
}
.rc-planner-icon { font-size: 24px; margin-bottom: 5px; }
.rc-planner-text { font-size: 12px; font-weight: 900; color: #ef4444; text-transform: uppercase; text-align: center; }

/* INVITE TILE */
.rc-invite {
    border: 1px solid rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.06);
    border-left: 3px solid rgba(251, 191, 36, 0.7);
}
.rc-inv-time { font-size: 16px; font-weight: 900; color: #fbbf24; }
.rc-inv-host { font-size: 11px; color: #cbd5e1; }
.rc-inv-count { font-size: 10px; color: #4ade80; font-weight: bold; margin-top: 4px; }

/* --- CHAT PANEL (GLASS) --- */
#lobby-social {
    flex: 1;
    display: flex; flex-direction: column;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px; overflow: hidden;
    min-width: 250px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#local-cam-container {
    width: 100%; height: 0; background: #000;
    transition: height 0.3s; position: relative;
    overflow: hidden; border-bottom: 1px solid rgba(255,255,255,0.07); display: none;
}
#local-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.chat-header {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(30, 41, 59, 0.4); flex-shrink: 0;
}
.chat-header-title { font-size: 12px; font-weight: bold; color: #06b6d4; }
.chat-info { font-size: 10px; color: #64748b; font-weight: normal; margin-left: 5px; }
.chat-lock { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0; color: #ef4444; transition: color 0.2s; }
.chat-lock:hover { color: #fff; }
.chat-lock.unlocked { color: #4ade80; cursor: default; }

#chat-messages {
    flex: 1; padding: 10px; overflow-y: auto;
    font-size: 12px; display: flex; flex-direction: column; gap: 4px;
}
.chat-msg { word-wrap: break-word; }
.chat-name { font-weight: bold; color: #06b6d4; margin-right: 5px; }
.chat-text { color: #cbd5e1; }

#chat-input-area {
    display: flex; padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(30, 41, 59, 0.4); gap: 5px;
}
#chat-input {
    flex: 1; background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: #fff; padding: 5px; border-radius: 4px; font-size: 12px;
}
.icon-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: #94a3b8; padding: 0 5px; }
.icon-btn:hover { color: #fff; }
.icon-btn.active { color: #ef4444; }

#online-list {
    height: 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 5px; overflow-y: auto;
    background: rgba(15, 23, 42, 0.3);
    font-size: 11px; color: #64748b;
}
.online-p {
    display: inline-block;
    background: rgba(30, 41, 59, 0.7);
    padding: 2px 6px; border-radius: 4px; margin: 2px; color: #cbd5e1;
}

/* --- HUD (PLAYER CARDS - GLASS) --- */
#left-ui {
    position: absolute;
    top: max(5px, env(safe-area-inset-top));
    left: max(5px, env(safe-area-inset-left));
    z-index: 10; display: flex; flex-direction: column;
    align-items: flex-start; pointer-events: none;
    width: 160px; transition: all 0.3s ease;
}

#ping-display {
    font-size: 10px; color: #94a3b8; font-family: monospace;
    margin-bottom: 2px; margin-left: 2px;
    text-shadow: 1px 1px 0 #000;
    transition: color 0.3s;
}

.player-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    padding: 6px 10px; margin-bottom: 4px;
    border-radius: 0 8px 8px 0;
    border-left: 3px solid rgba(71, 85, 105, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    width: 100%; box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    display: flex; flex-direction: column; box-sizing: border-box;
    transition: box-shadow 0.2s;
}
.player-card.is-me {
    background: rgba(6, 182, 212, 0.08);
    border-left: 3px solid #06b6d4;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.18), 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(6,182,212,0.1);
    transform: scale(1.02); margin-left: 2px;
}

.pc-name { font-size: 11px; color: #cbd5e1; font-weight: bold; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pc-score { font-size: 14px; font-weight: 800; color: #fff; }
.pc-lives { font-size: 10px; margin-top: 1px; }
.pc-effects { margin-top: 2px; font-size: 9px; color: #fbbf24; font-weight: bold; }

#action-log { display: flex; flex-direction: column; gap: 1px; margin-top: 5px; width: 100%; }
.log-entry {
    background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
    padding: 1px 4px; border-radius: 2px;
    font-size: 9px; color: #e2e8f0;
    animation: fadeOut 3s forwards; text-shadow: 1px 1px 0 #000;
}

#notification-area {
    position: absolute; top: max(40px, env(safe-area-inset-top));
    left: 50%; transform: translateX(-50%);
    z-index: 5; display: none; flex-direction: column;
    align-items: center; width: 80%; pointer-events: none;
}
.notif-msg {
    font-size: 10px; color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 2px #000; font-family: monospace;
    margin-bottom: 2px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    padding: 3px 8px; border-radius: 4px;
    animation: fadeOut 3s forwards;
}

@keyframes fadeOut { 0% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* --- LEADERBOARD (GLASS) --- */
#leaderboard {
    position: absolute;
    top: max(5px, env(safe-area-inset-top));
    right: max(5px, env(safe-area-inset-right));
    width: 130px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    padding: 4px; border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    pointer-events: none; font-size: 9px;
}
.lb-title { font-weight: bold; color: #fbbf24; border-bottom: 1px solid rgba(251,191,36,0.2); padding-bottom: 1px; margin-bottom: 1px; text-align: center; text-shadow: 0 0 8px rgba(251,191,36,0.5); }
.lb-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.lb-name { color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px; font-weight: bold; }
.lb-right { display: flex; gap: 5px; font-family: monospace; }
.lb-date { color: #64748b; font-size: 8px; }
.lb-score { color: #fff; }

/* --- MENU (GLASS) --- */
#menu-container {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(10px, env(safe-area-inset-right));
    z-index: 2100; display: flex;
    flex-direction: column-reverse; align-items: flex-end; gap: 8px;
}

.round-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2), 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.1s, box-shadow 0.2s; position: relative;
}
.round-btn:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35), 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.round-btn:active { transform: scale(0.9); }
.round-btn.has-new::after { content: ''; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: #ef4444; border-radius: 50%; border: 2px solid #0f172a; }

#menu-content {
    display: none;
    background: rgba(10, 18, 36, 0.85);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 12px; margin-bottom: 5px; width: 280px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07);
    flex-direction: column;
}
#menu-content.open { display: flex; }

.tabs { display: flex; background: rgba(15, 23, 42, 0.6); border-bottom: 1px solid rgba(255,255,255,0.06); border-radius: 12px 12px 0 0; }
.tab-btn { flex: 1; background: none; border: none; color: #64748b; padding: 10px; cursor: pointer; font-size: 11px; font-weight: bold; text-transform: uppercase; transition: color 0.2s; }
.tab-btn.active { color: #38bdf8; border-bottom: 2px solid #38bdf8; background: rgba(30, 41, 59, 0.4); }
.tab-content { padding: 10px; display: none; max-height: 200px; overflow-y: auto; font-size: 11px; line-height: 1.4; color: #cbd5e1; }
.tab-content.active { display: block; }

.mode-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: #cbd5e1; padding: 6px; margin-bottom: 4px;
    border-radius: 4px; cursor: pointer; font-size: 11px;
    text-align: center; width: 100%; display: block;
    transition: background 0.2s;
}
.mode-btn.active { background: rgba(6, 182, 212, 0.2); border-color: #06b6d4; color: #06b6d4; font-weight: bold; }
.test-switch {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(51, 65, 85, 0.4); padding: 6px; border-radius: 6px;
    margin-top: 5px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- CONTROLS (GLASS) --- */
#controls {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    display: flex; flex-direction: column; gap: 10px; z-index: 20;
}
.ctrl-btn {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(71, 85, 105, 0.4);
    color: white; width: 45px; height: 45px; border-radius: 10px;
    font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
    transition: transform 0.1s;
}
.ctrl-btn:active { transform: scale(0.9); background: rgba(51, 65, 85, 0.6); }
.btn-blue { border-color: rgba(59, 130, 246, 0.4); color: #3b82f6; }
.btn-red { border-color: rgba(239, 68, 68, 0.4); color: #ef4444; }
.btn-yellow { border-color: rgba(234, 179, 8, 0.4); color: #eab308; }

/* --- OVERLAYS --- */
#pause-overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px) saturate(0.8);
    -webkit-backdrop-filter: blur(6px) saturate(0.8);
    display: none; align-items: center; justify-content: center;
    z-index: 99; flex-direction: column;
}
.pause-text {
    font-size: 40px; font-weight: 900; color: #fff;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.9), 0 0 60px rgba(6, 182, 212, 0.4);
    letter-spacing: 4px;
}
.resume-btn {
    margin-top: 15px; padding: 10px 30px; font-size: 18px;
    background: rgba(6, 182, 212, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(6, 182, 212, 0.5);
    border-radius: 30px; font-weight: bold; cursor: pointer; color: #000;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

#warning-overlay {
    position: absolute; top: 30%; left: 50%;
    transform: translateX(-50%);
    color: #ef4444; font-size: 30px; font-weight: 900;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.9);
    display: none; z-index: 90; text-transform: uppercase;
    animation: pulse 0.5s infinite; pointer-events: none; white-space: nowrap;
}
@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1); }
}

/* --- MODALS (GLASS) --- */
#suggestion-modal, #log-screen, #scheduler-modal, #invite-details-modal {
    position: absolute; inset: 0; z-index: 3500;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px) saturate(0.8);
    -webkit-backdrop-filter: blur(8px) saturate(0.8);
    display: none; align-items: center; justify-content: center;
}

.suggestion-box {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 14px; width: 90%; max-width: 500px; max-height: 80%;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07);
}
.sb-header {
    padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(15, 23, 42, 0.5); border-radius: 14px 14px 0 0;
}
.sb-title { font-weight: bold; color: #fff; text-transform: uppercase; }
.sb-close { cursor: pointer; color: #94a3b8; font-size: 20px; }
.sb-content { padding: 15px; overflow-y: auto; flex: 1; }
.sb-list { display: flex; flex-direction: column; gap: 8px; }
.sb-item {
    background: rgba(15, 23, 42, 0.6); padding: 10px; border-radius: 6px;
    font-size: 12px; color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.06);
}
.sb-name { font-weight: bold; color: #06b6d4; margin-bottom: 2px; display: block; }
.sb-footer {
    padding: 15px; border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(15, 23, 42, 0.5); border-radius: 0 0 14px 14px;
}
.sb-input-group { display: flex; gap: 10px; }
.sb-input {
    flex: 1; background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(71, 85, 105, 0.5); padding: 8px;
    color: #fff; border-radius: 6px;
}
.sb-btn {
    background: rgba(6, 182, 212, 0.85); color: #000;
    border: none; padding: 8px 15px; border-radius: 6px;
    font-weight: bold; cursor: pointer;
}
.sb-lock { margin-left: auto; cursor: pointer; font-size: 18px; color: #ef4444; }
.sb-lock.unlocked { color: #4ade80; }

#log-screen { flex-direction: column; padding: 20px; overflow: hidden; background: rgba(5, 11, 20, 0.97); }
.ls-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; border-bottom: 1px solid rgba(6,182,212,0.2);
    padding-bottom: 10px; width: 100%; max-width: 600px; flex-shrink: 0;
}
.ls-title { font-size: 24px; font-weight: bold; color: #06b6d4; text-shadow: 0 0 15px rgba(6,182,212,0.5); }
.ls-close { cursor: pointer; font-size: 24px; color: #fff; background: #ef4444; border: none; border-radius: 4px; padding: 5px 10px; }
#log-list { width: 100%; max-width: 600px; overflow-y: auto; flex: 1; }
.log-row { display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px solid rgba(30,41,59,0.5); color: #cbd5e1; font-family: monospace; }
.log-row:first-child { border-top: 1px solid rgba(30,41,59,0.5); }
.lr-name { font-weight: bold; color: #fff; }
.lr-time { color: #64748b; }

.scheduler-box {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 14px; padding: 10px; width: 90%; max-width: 250px;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2), 0 16px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07);
}
.sch-title { color: #ef4444; font-weight: 900; font-size: 16px; text-transform: uppercase; text-shadow: 0 0 10px rgba(239,68,68,0.5); }
.sch-row { display: flex; gap: 5px; align-items: center; }
.sch-select { background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(71,85,105,0.5); color: #fff; padding: 5px; border-radius: 4px; font-size: 14px; font-weight: bold; }
.sch-btn-group { display: flex; gap: 5px; width: 100%; margin-top: 5px; }
.sch-btn { flex: 1; padding: 8px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 12px; }
.sch-cancel { background: rgba(71, 85, 105, 0.6); color: #fff; }
.sch-submit { background: rgba(239, 68, 68, 0.85); color: #fff; }

.invite-details-box {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 14px; padding: 15px; width: 90%; max-width: 300px;
    display: flex; flex-direction: column; gap: 10px;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.1), 0 20px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07);
}
.idb-header { font-size: 18px; font-weight: 900; color: #fbbf24; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.07); padding-bottom: 10px; text-shadow: 0 0 12px rgba(251,191,36,0.5); }
.idb-info { font-size: 12px; color: #cbd5e1; text-align: center; }
.idb-participants { background: rgba(15, 23, 42, 0.6); padding: 10px; border-radius: 6px; font-size: 12px; color: #4ade80; text-align: center; border: 1px solid rgba(74, 222, 128, 0.2); }
.idb-buttons { display: flex; gap: 8px; margin-top: 10px; }
.idb-btn { flex: 1; padding: 10px; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 12px; text-transform: uppercase; }
.idb-join { background: rgba(74, 222, 128, 0.85); color: #000; }
.idb-join.joined { background: rgba(34, 197, 94, 0.85); color: #fff; }
.idb-new { background: rgba(6, 182, 212, 0.85); color: #000; }
.idb-delete { background: rgba(239, 68, 68, 0.85); color: #fff; flex: 0.3; }
.idb-close { background: rgba(71, 85, 105, 0.6); color: #fff; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    #lobby-main { flex-direction: column; }
    #lobby-rooms { flex: 1; max-height: 50%; }
    #lobby-social { flex: 1; }
    #notification-area { display: flex; }
    #action-log { display: none; }
    #left-ui { width: 100px; top: 40px; }
    .player-card {
        background: rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-left-width: 2px; padding: 2px 5px;
        margin-bottom: 2px; border-top: 1px solid rgba(255,255,255,0.08);
    }
    .player-card.is-me {
        background: rgba(6, 182, 212, 0.12) !important;
        border-left: 2px solid #06b6d4;
    }
    .pc-lives { display: none; }
}
@media (max-width: 900px) and (orientation: landscape) {
    #notification-area { display: none; }
    #action-log { display: flex; }
    #left-ui { width: 120px; top: 10px; }
    .player-card {
        background: rgba(0, 0, 0, 0.25) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 3px 6px;
    }
}
