* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0d0d0d;
  --surface: #0f0f1a;
  --surface2: #151520;
  --surface3: #1c1c28;
  --card: #13131e;
  --edge: rgba(255,255,255,0.08);
  --text: #f0ece6;
  --muted: rgba(255,255,255,0.5);
  --faint: rgba(255,255,255,0.25);
  --accent: #7c6ef5;
  --green: #34c77b;
  --gold: #f5a623;
  --red: #ef5350;
  --radius: 22px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}
[data-theme="light"] {
  --bg: #f5f5f0;
  --surface: #ffffff;
  --surface2: #f0f0eb;
  --surface3: #e8e8e0;
  --card: #ffffff;
  --edge: rgba(0,0,0,0.1);
  --text: #1a1a18;
  --muted: rgba(0,0,0,0.5);
  --faint: rgba(0,0,0,0.25);
  --accent: #7c6ef5;
  --green: #2ecc71;
  --gold: #e67e22;
  --red: #e74c3c;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
}
[data-theme="light"] .topbar { background: rgba(255,255,255,0.9); }
[data-theme="light"] .ttab { color: rgba(0,0,0,0.5); }
[data-theme="light"] .ttab:hover { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.7); }
[data-theme="light"] .ttab.active { color: #fff; }
html, body { height: 100%; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; background: var(--bg); color: var(--text); overflow: hidden; -webkit-tap-highlight-color: transparent; }
input, button, textarea { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
#app { height: 100%; display: flex; flex-direction: column; }
#loading-screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); z-index: 99999; }
#loading-screen p { font-size: 2.2rem; font-weight: 900; letter-spacing: 2px; }
.loader { width: 36px; height: 36px; border: 3px solid rgba(124,110,245,0.2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SPLASH ─── */
.splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0d0a1a; z-index: 99998; transition: opacity .6s ease; }
.splash-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(200,40,0,0.12) 0%, rgba(140,0,80,0.08) 40%, transparent 70%); }
.splash-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
@keyframes splashFloat { 0% { transform: translateY(0) scale(1); opacity: 0; } 10% { opacity: 0.8; } 90% { opacity: 0.3; } 100% { transform: translateY(-100vh) scale(0.1); opacity: 0; } }
.splash-content { display: flex; flex-direction: column; align-items: center; z-index: 10; animation: splashFadeIn 1s ease forwards; }
@keyframes splashFadeIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.splash-icon-wrap { width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; position: relative; }
.splash-ring { position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,69,0,0.3); animation: splashRing 2.4s ease infinite; }
@keyframes splashRing { 0% { transform: scale(0.85); opacity: 0.45; } 50% { transform: scale(1.15); opacity: 0; } 100% { transform: scale(0.85); opacity: 0.45; } }
.splash-glow { position: absolute; width: 170px; height: 170px; border-radius: 44px; box-shadow: 0 0 30px rgba(255,80,0,0.5); }
.splash-icon { width: 160px; height: 160px; border-radius: 40px; animation: splashIconIn .8s ease forwards; }
@keyframes splashIconIn { from { opacity: 0; transform: scale(0.15); } to { opacity: 1; transform: scale(1); } }
.splash-brand { margin-top: 30px; font-size: 58px; font-weight: 900; color: #ff4500; letter-spacing: -2.5px; text-shadow: 0 0 20px rgba(255,80,0,0.4); animation: splashBrandIn .8s ease .5s both; }
@keyframes splashBrandIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.splash-tagline { margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: 2px; color: rgba(255,255,255,0.28); animation: splashTagIn .6s ease .8s both; text-transform: none; }
@keyframes splashTagIn { from { opacity: 0; } to { opacity: 1; } }
.splash-dots { display: flex; gap: 8px; margin-top: 52px; }
.splash-dot { width: 7px; height: 7px; border-radius: 50%; animation: splashDot 1.3s ease infinite; }
.splash-dot:nth-child(1) { background: rgba(255,140,0,0.55); animation-delay: 0s; }
.splash-dot:nth-child(2) { background: rgba(255,80,0,0.6); animation-delay: .2s; }
.splash-dot:nth-child(3) { background: rgba(255,45,120,0.55); animation-delay: .4s; }
@keyframes splashDot { 0%, 100% { opacity: 0.3; transform: scale(0.55); } 40% { opacity: 1; transform: scale(1.4); } }
.splash-track { margin-top: 18px; width: 150px; height: 2px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.splash-fill { height: 100%; width: 0%; background: #ff8c00; border-radius: 2px; }
.splash-ver { position: absolute; bottom: 28px; font-size: 11px; color: rgba(255,255,255,0.1); letter-spacing: 1px; z-index: 10; }

/* ─── AGE GATE ─── */
.age-gate { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0a0a0a; z-index: 99999; padding: 32px; text-align: center; }
.age-gate h1 { font-size: 3.5rem; font-weight: 900; background: linear-gradient(135deg,#7c6ef5,#34c77b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.age-gate .warn { color: var(--red); font-size: 3rem; margin: 16px 0 8px; }
.age-gate p { color: var(--muted); font-size: .95rem; line-height: 1.6; max-width: 320px; margin: 8px 0; }
.age-gate .age-btns { display: flex; gap: 16px; margin-top: 24px; }
.age-btn { padding: 14px 36px; border-radius: 999px; border: none; font-size: 1rem; font-weight: 700; cursor: pointer; }
.age-btn-yes { background: linear-gradient(135deg,#7c6ef5,#34c77b); color: #fff; }
.age-btn-no { background: rgba(255,255,255,0.08); color: var(--muted); border: 1px solid var(--edge); }

/* ─── HAMBURGER ─── */
.hamburger { position: fixed; top: 52px; left: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.55); border: none; color: #fff; font-size: 20px; z-index: 1000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.floating-nav { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 999; display: flex; align-items: center; justify-content: center; }
.floating-nav-inner { background: var(--surface); border-radius: 28px; padding: 8px; width: 260px; border: 1px solid var(--edge); }
.fnav-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; cursor: pointer; color: var(--text); font-weight: 600; font-size: .95rem; }
.fnav-item:hover { background: rgba(255,255,255,0.05); }
.fnav-item .fnav-icon { font-size: 1.3rem; width: 28px; text-align: center; }
.fnav-item.fnav-active { background: rgba(124,110,245,0.12); color: var(--accent); }

/* ─── AUTH ─── */
.auth-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 100; padding: 24px; }
.auth-box { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--radius); padding: 32px 24px; border: 1px solid var(--edge); }
.auth-box h2 { margin-bottom: 20px; font-size: 1.4rem; text-align: center; font-weight: 800; }
.auth-tab-bar { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--edge); }
.auth-tab { flex: 1; text-align: center; padding: 12px; cursor: pointer; color: var(--faint); font-weight: 700; font-size: .9rem; }
.auth-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.form-group input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--surface2); color: var(--text); font-size: .9rem; }
.form-group input:focus { border-color: var(--accent); }
.feed-back-btn { position:fixed; top:18px; left:14px; z-index:100; padding:10px 22px; border-radius:12px; border:none; background:rgba(0,0,0,0.6); color:#fff; font-weight:800; font-size:16px; cursor:pointer; backdrop-filter:blur(8px); }
.pwd-wrap input { padding-right:44px !important; }
.pwd-toggle { position:absolute; right:12px; cursor:pointer; font-size:18px; user-select:none; line-height:1; padding:4px; }
.tc-check input[type="checkbox"] { width:18px;height:18px;accent-color:var(--accent);cursor:pointer;flex-shrink:0; }
.btn-block { width: 100%; padding: 14px; font-size: 1rem; border-radius: 12px; border: none; font-weight: 700; cursor: pointer; margin-top: 8px; background: var(--accent); color: #fff; }
.btn-block:hover { opacity: .9; }
.auth-err { color: var(--red); font-size: .85rem; text-align: center; margin-top: 10px; display: none; }
.auth-ok { color: var(--green); font-size: .85rem; text-align: center; margin-top: 10px; display: none; }

/* ─── SCROLL CONTAINER ─── */
.scroll-screen { position: fixed; inset: 0; top: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 120px; z-index: 1; }
.scroll-screen::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 52px; background: linear-gradient(180deg,rgba(0,0,0,.6),transparent); z-index: 50; pointer-events: none; }
.scroll-inner { padding: 0 12px; padding-top: 64px; display: flex; flex-direction: column; gap: 14px; max-width: 600px; margin: 0 auto; }

/* ─── DASHBOARD CARDS ─── */
.card { border-radius: 22px; padding: 22px; border: 1px solid var(--edge); background: var(--surface); overflow: hidden; position: relative; }
.card-gradient { border-radius: 22px; border: 1px solid var(--edge); overflow: hidden; }
.gradient-content { padding: 22px; }

/* ─── BREAK BANNER ─── */
.break-banner { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--red); background: rgba(255,77,77,0.12); }
.break-icon { font-size: 28px; }
.break-title { color: var(--red); font-weight: 900; font-size: 14px; letter-spacing: .5px; }
.break-desc { color: rgba(255,255,255,.7); font-size: 12px; line-height: 17px; margin-top: 3px; }

/* ─── DAILY MASTER ─── */
.daily-quest { position: relative; }
.quest-glow { position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(239,83,80,0.15); pointer-events: none; }
.quest-badge { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.quest-badge-icon { font-size: 14px; }
.quest-badge-text { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--red); }
.quest-title { font-size: 26px; font-weight: 800; line-height: 30px; margin-bottom: 4px; }
.quest-sub { font-size: 12px; margin-bottom: 18px; line-height: 16px; color: var(--muted); }
.quest-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.quest-bar-bg { flex: 1; height: 10px; border-radius: 5px; background: rgba(255,255,255,0.06); overflow: hidden; }
.quest-bar-fill { height: 100%; border-radius: 5px; background: var(--red); transition: width .5s ease; }
.quest-bar-label { font-size: 13px; font-weight: 800; }
.quest-reward { border: 1px solid rgba(239,83,80,0.25); border-radius: 10px; padding: 10px; background: rgba(239,83,80,0.12); }
.quest-reward-text { font-size: 11px; line-height: 15px; }
.quest-reward-highlight { font-weight: 700; color: var(--gold); }
.quest-complete { border-radius: 10px; padding: 10px; text-align: center; background: rgba(52,199,123,0.12); }
.quest-complete-text { font-weight: 800; font-size: 13px; color: var(--green); }

/* ─── STATS ROW ─── */
.stats-row { display: flex; border-radius: 20px; border: 1px solid var(--edge); overflow: hidden; background: var(--surface); }
.stat-half { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 18px 8px; gap: 4px; border-right: 1px solid var(--edge); }
.stat-half:last-child { border-right: none; }
.stat-icon { font-size: 18px; }
.stat-value { font-size: 28px; font-weight: 900; }
.stat-label { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.stat-tag { margin-top: 6px; padding: 3px 10px; border-radius: 20px; font-size: 9px; font-weight: 700; }

/* ─── XP CARD ─── */
.xp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.level-badge { display: flex; align-items: center; gap: 12px; }
.level-circle { width: 46px; height: 46px; border-radius: 50%; border: 2.5px solid var(--green); display: flex; align-items: center; justify-content: center; }
.level-circle-text { font-size: 20px; font-weight: 800; color: var(--accent); }
.level-info { display: flex; flex-direction: column; gap: 2px; }
.level-name { font-size: 14px; font-weight: 700; }
.level-rank { font-size: 11px; font-weight: 500; color: var(--muted); }
.xp-next { text-align: right; }
.xp-next-val { font-size: 14px; font-weight: 700; }
.xp-next-lbl { font-size: 11px; color: var(--muted); }
.xp-bar { height: 12px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.xp-bar-fill { height: 100%; border-radius: 6px; background: var(--accent); transition: width .5s ease; }
.xp-labels { display: flex; justify-content: space-between; }
.xp-label { font-size: 11px; font-weight: 500; color: var(--muted); }

/* ─── BADGES ─── */
.badges-header { display: flex; justify-content: space-between; align-items: center; }
.badges-title { font-size: 15px; font-weight: 900; letter-spacing: .3px; }
.badges-view-link { font-size: 12px; font-weight: 700; color: var(--accent); cursor: pointer; }
.badges-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: calc(25% - 9px); }
.badge-ring { width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.badge-ring.locked { opacity: .35; border-color: rgba(255,255,255,0.05); }
.badge-name { font-size: 10px; font-weight: 600; text-align: center; line-height: 12px; }
.badge-category { margin-bottom: 20px; }
.badge-cat-title { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--accent); margin-bottom: 10px; padding-bottom: 4px; border-bottom: 1px solid var(--edge); }
.badge-cond { font-size: 9px; color: var(--muted); text-align: center; line-height: 11px; }

/* ─── METRICS ─── */
.metrics-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--edge); }
.metrics-tabs { display: flex; gap: 6px; }
.metrics-tab { padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--muted); }
.metrics-tab.active { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: var(--text); }
.metrics-body { padding: 20px; }
.metrics-row { display: flex; gap: 16px; margin-bottom: 12px; }
.metric-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.metric-val { font-size: 26px; font-weight: 800; }
.metric-lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.chart-wrap { margin-top: 4px; }

/* ─── HEATMAP ─── */

.intel-panel { margin-top: 16px; padding: 16px; border-radius: 16px; border: 1px dashed var(--accent); background: rgba(124,110,245,0.06); }
.intel-title { font-size: 12px; font-weight: 800; margin-bottom: 14px; letter-spacing: .5px; color: var(--accent); }
.intel-row { display: flex; justify-content: space-around; align-items: center; }
.intel-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.intel-val { font-size: 18px; font-weight: 800; }
.intel-label { font-size: 10px; font-weight: 600; color: var(--muted); }
.intel-divider { width: 1px; height: 30px; background: var(--edge); }
.intel-empty { font-size: 11px; text-align: center; margin-top: 10px; color: var(--faint); }

/* ─── PROFILE ─── */
.hero-card { border-radius: 22px; border: 1px solid var(--edge); overflow: hidden; padding: 20px; background: linear-gradient(135deg,#1a1a2e,#16213e,#0f3460,#1a1a2e); }
[data-theme="light"] .hero-card { background: var(--surface2); }
.gradient-box { border-radius: 20px; border: 1px solid var(--edge); overflow: hidden; padding: 6px; background: linear-gradient(135deg,#302b26,#2a2540,#3d2525,#2a3a25); }
[data-theme="light"] .gradient-box { background: var(--surface2); }
.profile-main { padding: 0; }
.avatar { width: 90px; height: 90px; border-radius: 50%; border: 2.5px solid var(--surface); display: flex; align-items: center; justify-content: center; font-size: 38px; overflow: hidden; cursor: pointer; flex-shrink: 0; }
.name-row { display: flex; align-items: center; gap: 4px; }
.profile-name { font-size: 24px; font-weight: 800; }
.profile-username { font-size: 14px; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title { font-size: 15px; font-weight: 900; letter-spacing: .3px; }
.collection-grid { display: flex; gap: 8px; padding: 6px; }
.collection-card { flex: 1; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; background: rgba(255,255,255,0.04); }
[data-theme="light"] .collection-card { background: rgba(0,0,0,0.04); }
.collection-card .coll-icon { font-size: 22px; }
.collection-card .coll-name { font-size: 13px; font-weight: 700; }
.sec-tiles { padding: 6px; }
.sec-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; cursor: pointer; margin-bottom: 4px; }
.sec-tile-icon { font-size: 24px; width: 36px; text-align: center; }
.sec-tile-title { font-size: 14px; font-weight: 700; }
.sec-tile-count { font-size: 11px; color: var(--accent); }

/* ─── COLLECTION LIST ─── */
.collection-panel { position: fixed; inset: 0; background: var(--bg); z-index: 200; overflow-y: auto; }
.collection-header { display: flex; align-items: center; gap: 12px; padding: 52px 16px 12px; background: var(--surface); border-bottom: 1px solid var(--edge); position: sticky; top: 0; z-index: 10; }
.col-back { font-size: 22px; color: var(--accent); cursor: pointer; padding: 4px; }
.col-title { font-size: 16px; font-weight: 800; flex: 1; }
.col-tabs { display: flex; flex: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--edge); }
.col-tab { flex: 1; padding: 8px; text-align: center; font-size: 14px; font-weight: 700; cursor: pointer; }
.col-tab.active { background: var(--accent); color: #fff; }
.col-list { padding: 12px; }
.col-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; margin-bottom: 8px; background: rgba(255,255,255,0.03); }
.col-thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.col-thumb img { width: 100%; height: 100%; object-fit: cover; }
.col-info { flex: 1; min-width: 0; }
.col-item-title { font-size: 13px; font-weight: 600; }
.col-item-date { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ─── MODAL ─── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 500; display: flex; align-items: flex-end; justify-content: center; }
.modal-content { width: 100%; max-width: 500px; border-radius: 28px 28px 0 0; padding: 20px; padding-bottom: 40px; max-height: 85vh; overflow-y: auto; border: 1px solid var(--edge); border-bottom: none; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-title { font-size: 18px; font-weight: 800; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--surface3); color: var(--muted); font-size: 14px; font-weight: 700; border: none; }
.modal-sub { font-size: 12px; font-weight: 600; margin-bottom: 16px; color: var(--muted); }
.modal-badge-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.modal-badge-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: calc(25% - 11px); cursor: pointer; }
.modal-badge-ring { width: 62px; height: 62px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 22px; position: relative; }
.modal-badge-ring.locked { opacity: .35; }
.modal-badge-name { font-size: 10px; font-weight: 600; text-align: center; line-height: 12px; }
.modal-condition { font-size: 8px; font-weight: 600; text-align: center; line-height: 10px; margin-top: 2px; color: var(--muted); }
.modal-input { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--surface2); color: var(--text); font-size: 15px; margin-bottom: 10px; }
.modal-option-btn { padding: 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--surface2); text-align: center; font-weight: 700; cursor: pointer; }
.modal-save-btn { padding: 14px; border-radius: 12px; border: none; background: var(--accent); color: #fff; font-weight: 700; text-align: center; cursor: pointer; }
.setting-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--edge); background: var(--surface2); }
.setting-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.setting-body { flex: 1; min-width: 0; }
.setting-label { font-size: 11px; color: var(--muted); font-weight: 600; }
.setting-value { font-size: 13px; font-weight: 700; }
.setting-edit-btn { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--edge); font-size: 12px; font-weight: 700; cursor: pointer; color: var(--accent); background: transparent; }

.loading-banner { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--edge); background: rgba(245,166,35,0.12); }
.loading-banner .lb-icon { font-size: 24px; }
.loading-banner .lb-title { color: var(--gold); font-weight: 900; font-size: 14px; }
.loading-banner .lb-desc { color: rgba(255,255,255,.7); font-size: 12px; }

/* ─── MISC ─── */
.ad-placeholder { min-height: 50px; background: rgba(255,255,255,0.02); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--faint); }
.category-title { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; margin: 14px 0 8px; color: var(--faint); }
.feed-empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ─── LEADERBOARD MODAL ─── */
.lb-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--edge); }
.lb-pos { width: 28px; text-align: center; font-weight: 700; color: var(--faint); font-size: 14px; }
.lb-name { flex: 1; font-weight: 600; font-size: 14px; }
.lb-pts { color: var(--accent); font-weight: 700; font-size: 13px; }
.lb-rank { text-align: center; padding: 16px; font-size: 14px; color: var(--muted); }

/* ─── AVATAR PICKER ─── */
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.avatar-option { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--edge); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--surface2); }
.avatar-option.selected { border-color: var(--accent); }

/* ─── NAME EDITOR ─── */
.name-editor { display: flex; gap: 8px; align-items: center; }
.name-editor input { flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--edge); background: var(--surface2); color: var(--text); font-size: 14px; }
.name-editor .save { padding: 8px 16px; border-radius: 8px; border: none; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }

/* ─── TOPBAR (website style) ─── */
.topbar { flex-shrink: 0; background: rgba(5,6,15,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--edge); display: flex; justify-content: center; position: relative; z-index: 10000; }
.topbar-inner { max-width: 1200px; width: 100%; padding: 8px 16px; display: flex; align-items: center; gap: 12px; }
.topbar-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-logo { width: 32px; height: 32px; border-radius: 8px; }
.topbar-brand { font-size: 1.2rem; font-weight: 900; background: linear-gradient(135deg,#ff4500,#ff8c00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.03em; }
.topbar-tabs { display: flex; gap: 4px; flex: 1; justify-content: center; }
.ttab { padding: 6px 14px; border-radius: 999px; border: none; background: transparent; color: rgba(255,255,255,0.45); font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s; }
.ttab:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }
.ttab.active { background: var(--accent); color: #fff; will-change: background; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tb-btn { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--edge); background: transparent; color: var(--text); font-size: .8rem; font-weight: 600; cursor: pointer; }
.tb-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── SCREEN AREA ─── */
#screen-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }

/* ─── STATS & PROFILE SCROLL ─── */
.sp-scroll { flex: 1; overflow-y: auto; }
.fade-in { animation: fadeUp 0.4s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.sp-scroll::-webkit-scrollbar { width: 6px; }
.sp-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
.sp-inner { padding: 16px; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

/* ─── TWO-COLUMN LAYOUT ─── */
.sp-two-col { display: flex; gap: 14px; }
.sp-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sp-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sp-two-col .card { height: 100%; }

.badges-clickable { cursor: pointer; transition: background .2s; }
.badges-clickable:hover { background: rgba(255,255,255,0.05); }
.sp-profile-section { display: flex; flex-direction: column; gap: 14px; }

@media(max-width:640px) {
  .sp-two-col { flex-direction: column; }
  .sp-inner { padding: 12px; }
}

/* ─── FEED ─── */
.feed-scroll { flex: 1; overflow-y: auto; scroll-snap-type: y mandatory; display: flex; flex-direction: column; }
.feed-scroll::-webkit-scrollbar { width: 0; }
.feed-video-wrap { position: relative; flex: 1 0 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; min-height: 0; }
.feed-video-wrap video { width: 100%; height: 100%; object-fit: contain; }

/* ─── FEED TAP OVERLAY (play/pause) ─── */
.feed-tap-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.feed-pause-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; font-size: 32px; pointer-events: none; }

/* ─── FEED ACTIONS (right side) ─── */
.feed-actions { position: absolute; right: 12px; bottom: 80px; display: flex; flex-direction: column; gap: 14px; z-index: 10; pointer-events: auto; }
.feed-action-btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s; }
.feed-action-btn:hover { transform: scale(1.1); }
.feed-action-label { text-align: center; font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.feed-action-group { display: flex; flex-direction: column; align-items: center; }

/* ─── FEED BOTTOM / DRAWER ─── */
.feed-bottom { position: absolute; bottom: 0; left: 0; right: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; }
.feed-arrow-btn { width: 48px; height: 28px; background: rgba(0,0,0,0.7); border: none; border-radius: 14px 14px 0 0; color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; padding: 0; margin-bottom: 0; z-index: 1; }

.fd-timeline-outer { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 12px 4px; }
.feed-drawer { background: linear-gradient(0deg, rgba(0,0,0,0.92), rgba(0,0,0,0.7)); padding: 12px 16px 16px; width: 100%; display: none; flex-direction: column; gap: 10px; }
.feed-drawer.open { display: flex; }

.fd-title { font-size: 14px; font-weight: 600; color: #eee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fd-timeline { display: flex; align-items: center; gap: 8px; }
.fd-time { font-size: 11px; color: rgba(255,255,255,0.6); min-width: 36px; }
.fd-seek { flex: 1; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,0.2); border-radius: 2px; outline: none; cursor: pointer; }
.fd-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #ff6b6b; border: 2px solid #fff; cursor: pointer; }
.fd-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #ff6b6b; border: 2px solid #fff; cursor: pointer; }

.fd-options { display: flex; justify-content: space-around; gap: 8px; }
.fd-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(255,255,255,0.08); border: none; border-radius: 10px; padding: 8px 4px; color: #ddd; font-size: 10px; cursor: pointer; transition: background .15s; }
.fd-opt:hover { background: rgba(255,255,255,0.15); }

.fd-aspect { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.fd-aspect-hdr { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.5); }
.fd-aspect-row { display: flex; gap: 4px; }
.fd-aspect-row .fd-opt { padding: 5px 2px; border-radius: 8px; }
.fd-aspect-row .aspect-active { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-weight: 800; }

.fd-speed { display: flex; flex-direction: column; gap: 6px; }
.fd-speed-hdr { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.7); }
.fd-speed-val { font-weight: 700; color: #ff9f43; }
.fd-speed-sld { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,0.2); border-radius: 2px; outline: none; cursor: pointer; }
.fd-speed-sld::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #ff9f43; border: none; cursor: pointer; }
.fd-speed-sld::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #ff9f43; border: none; cursor: pointer; }
.fd-speed-pre { display: flex; gap: 6px; }
.fd-speed-pre button { flex: 1; background: rgba(255,255,255,0.08); border: none; border-radius: 6px; padding: 4px 0; color: #ccc; font-size: 12px; cursor: pointer; transition: background .15s, color .15s; }
.fd-speed-pre button:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ─── THEME TOGGLE ─── */
.theme-toggle { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--edge); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; }

/* ─── ROTATE OVERLAY ─── */
#rotate-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #000; z-index: 9999;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
}
.rotate-icon {
  font-size: 64px; color: #fff;
  animation: rotateHint 2s ease-in-out infinite;
}
.rotate-text { font-size: 18px; color: rgba(255,255,255,0.7); text-align: center; }
@keyframes rotateHint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}
