
.livemap-page { padding: 6.5rem 0 3rem; }
.livemap-container { max-width: 1200px; }
.livemap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.livemap-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary, #f1f5f9); margin: 0; }
.livemap-sub { color: var(--text-secondary, #94a3b8); font-size: 0.9rem; margin: 0.3rem 0 0; }

.livemap-tabs { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.livemap-tabs::-webkit-scrollbar { height: 6px; }
.livemap-tabs::-webkit-scrollbar-track { background: transparent; }
.livemap-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 999px; }
.livemap-tabs::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }
body.light-mode .livemap-tabs { scrollbar-color: rgba(15,23,42,0.22) transparent; }
body.light-mode .livemap-tabs::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.2); }
body.light-mode .livemap-tabs::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,0.32); }
.map-tab { flex: 0 0 auto; min-width: 132px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: var(--text-secondary, #cbd5e1); border-radius: 10px; padding: 0.55rem 0.7rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.15s; line-height: 1.2; text-align: left; }
.map-tab small { display: block; font-size: 0.64rem; font-weight: 500; opacity: 0.7; margin-top: 2px; }
.map-tab .tab-name { display: block; white-space: nowrap; }
.map-tab:hover { background: rgba(255,255,255,0.06); color: #fff; }
.map-tab.active { background: rgba(34,197,94,0.14); border-color: rgba(34,197,94,0.5); color: #4ade80; }
.map-tab.is-event { border-color: rgba(245,158,11,0.45); }
.map-tab.is-event.active { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.6); color: #fbbf24; }
.tabs-loading { font-size: 0.8rem; color: var(--text-muted, #64748b); padding: 0.55rem 0.2rem; }

.livemap-search { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.search-box { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-icon { position: absolute; left: 0.75rem; color: #64748b; pointer-events: none; flex-shrink: 0; }
.search-box input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #e2e8f0; font-size: 0.82rem; padding: 0.6rem 0.8rem 0.6rem 2.4rem; outline: none; }
.search-box input:focus { border-color: rgba(34,197,94,0.55); background: rgba(255,255,255,0.06); }
.search-box input::placeholder { color: #64748b; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 600; background: #12141c; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,0.5); max-height: 280px; overflow-y: auto; }
.sr-item { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.05); color: #e2e8f0; font-size: 0.8rem; padding: 0.55rem 0.8rem; cursor: pointer; text-align: left; }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: rgba(34,197,94,0.1); }
.sr-name { font-weight: 700; word-break: break-word; }
.sr-sub { font-size: 0.68rem; color: #64748b; flex-shrink: 0; }
.sr-global { color: #4ade80; font-weight: 700; }
.sr-empty { padding: 0.7rem 0.9rem; font-size: 0.78rem; color: #94a3b8; }

.livemap-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.livemap-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stat-pill { font-size: 0.75rem; font-weight: 600; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); padding: 0.3rem 0.65rem; border-radius: 999px; color: var(--text-secondary, #cbd5e1); }
.stat-muted { opacity: 0.75; }
.livemap-actions { display: flex; gap: 0.5rem; align-items: center; }
.btn-ghost { font-size: 0.76rem; font-weight: 600; background: transparent; border: 1px solid rgba(255,255,255,0.1); color: #cbd5e1; border-radius: 999px; padding: 0.4rem 0.8rem; cursor: pointer; }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.follow-bar { display: flex; align-items: center; gap: 0.6rem; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.45); color: #4ade80; font-size: 0.8rem; font-weight: 700; border-radius: 10px; padding: 0.5rem 0.8rem; margin-bottom: 0.8rem; }
.follow-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.2); flex-shrink: 0; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(34,197,94,0.08); } }
.btn-unfollow { margin-left: auto; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.45); color: #fca5a5; font-size: 0.72rem; font-weight: 700; border-radius: 8px; padding: 0.3rem 0.7rem; cursor: pointer; }
.btn-unfollow:hover { background: rgba(239,68,68,0.2); }

.livemap-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); background: #1a2030; }
#live-map { height: 68vh; min-height: 480px; width: 100%; background: #484E66; z-index: 1; }
.map-loading { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; background: rgba(10,12,18,0.85); color: #e2e8f0; font-size: 0.78rem; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 0.5rem; }
.map-error { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 500; background: rgba(127,29,29,0.92); color: #fecaca; font-size: 0.76rem; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 8px; max-width: 90%; text-align: center; }
.hidden { display: none !important; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); border-top-color: #22c55e; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.player-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.player-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
.player-modal-card { position: relative; width: 100%; max-width: 520px; background: #12141c; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 1.3rem 1.4rem; color: #e2e8f0; box-shadow: 0 24px 64px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto; }
.player-modal-close { position: absolute; top: 0.6rem; right: 0.8rem; background: transparent; border: none; color: #94a3b8; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.player-modal-close:hover { color: #fff; }
.pm-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.pm-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(34,197,94,0.5); background: #1e293b; flex-shrink: 0; }
.pm-head-text { flex: 1; min-width: 0; }
.pm-head-text h3 { margin: 0; font-size: 1.15rem; font-weight: 800; word-break: break-word; }
.follow-state { font-size: 0.68rem; font-weight: 700; color: #4ade80; }
.btn-follow { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.5); color: #4ade80; font-size: 0.74rem; font-weight: 800; border-radius: 8px; padding: 0.45rem 0.8rem; cursor: pointer; flex-shrink: 0; }
.btn-follow:hover { background: rgba(34,197,94,0.22); }
.btn-follow.following { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.5); color: #fca5a5; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.pm-label { display: block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; margin-bottom: 0.15rem; }
.pm-val { font-size: 0.85rem; font-weight: 600; word-break: break-word; }
.pm-val a { color: #7cc4ff; }

.livemap-footer { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; padding: 0.7rem 1rem; font-size: 0.76rem; color: var(--text-muted, #64748b); background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; }
.lf-brand strong { background: linear-gradient(90deg, #f39621, #22c55e); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.lf-sep { opacity: 0.4; }
.lf-live { display: inline-flex; align-items: center; gap: 0.4rem; color: #4ade80; font-weight: 700; }
.lf-pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); animation: pulse 1.6s ease-in-out infinite; }
.lf-muted { opacity: 0.8; }

body.light-mode .livemap-title { color: #0f172a; }
body.light-mode .livemap-sub { color: #64748b; }
body.light-mode .map-tab { background: #fff; border-color: rgba(0,0,0,0.08); color: #475569; }
body.light-mode .map-tab.active { background: rgba(34,197,94,0.12); color: #15803d; }
body.light-mode .search-box input { background: #fff; border-color: rgba(0,0,0,0.1); color: #0f172a; }
body.light-mode .livemap-wrap { border-color: rgba(0,0,0,0.08); }
body.light-mode .player-modal-card { background: #fff; color: #0f172a; }
body.light-mode .pm-head-text h3, body.light-mode .pm-val { color: #0f172a; }
body.light-mode .search-results { background: #fff; border-color: rgba(0,0,0,0.1); }
body.light-mode .sr-item { color: #0f172a; }

@media (max-width: 640px) {
  #live-map { height: 62vh; min-height: 380px; }
  .pm-grid { grid-template-columns: 1fr; }
  .livemap-head { align-items: flex-start; flex-direction: column; }
}
