/* ============================================================
   JALWA — Master Dark Neon Theme v4 (Self-contained)
   No external font dependency — works on shared hosting
   ============================================================ */

:root {
  /* ============================================================
     BASE COLORS
     ============================================================ */
  --gold-1: #ffd84d;
  --gold-2: #ffb627;
  --gold-3: #ff8a1e;
  --pink-1: #ff3d9a;
  --pink-2: #e8197a;
  --pink-3: #c0116a;
  --bg-void: #07060a;
  --bg-base: #0d0b14;
  --bg-surface: #15121f;
  --bg-surface-2: #1c1828;
  --bg-elevated: #221c33;
  --text-1: #f5f0ff;
  --text-2: #b9aecb;
  --text-3: #756a8a;
  --success: #2de3a8;
  --danger: #ff4d6a;
  --warn: #ffc857;
  --border-soft: rgba(255, 184, 80, .14);
  --border-pink: rgba(255, 61, 154, .25);
  --glow-gold: 0 0 20px rgba(255, 182, 39, .6);
  --glow-pink: 0 0 20px rgba(255, 61, 154, .6);
  --glow-soft: 0 0 40px rgba(255, 61, 154, .18);
  --grad-brand: linear-gradient(135deg, #ffd84d 0%, #ff8a1e 45%, #e8197a 100%);
  --grad-gold: linear-gradient(135deg, #ffd84d, #ff8a1e);
  --grad-pink: linear-gradient(135deg, #ff3d9a, #c0116a);
  --grad-surface: linear-gradient(180deg, #1c1828, #15121f);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;
  --font-display: 'Baloo 2', 'Trebuchet MS', 'Arial Rounded MT Bold', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  /* ============================================================
     🎨 THEME VARIABLES (Overridden by user theme)
     ============================================================ */
  --theme-primary: #ff2d95;
  --theme-primary-glow: rgba(255, 45, 149, 0.25);
  --theme-secondary: #b44dff;
  --theme-secondary-glow: rgba(180, 77, 255, 0.2);
  --theme-accent: #ffea00;
  --theme-blue: #00d4ff;
  --theme-green: #39ff14;
  --theme-gold: #ffd700;
  --theme-bg: #0a0a0f;
  --theme-text: #ffffff;
  --theme-text-secondary: rgba(255, 255, 255, 0.5);
  --theme-card-bg: rgba(255, 255, 255, 0.02);
  --theme-border: rgba(255, 255, 255, 0.05);
  --theme-glass-bg: rgba(255, 255, 255, 0.02);
  --theme-glass-border: rgba(255, 255, 255, 0.05);
  --theme-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  --theme-gradient: linear-gradient(135deg, #ff2d95, #b44dff);
  --theme-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text-1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

/* ============================================================
   NEON AMBIENT BG
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(232, 25, 122, .07), transparent),
    radial-gradient(ellipse 50% 35% at 80% 90%, rgba(255, 138, 30, .06), transparent),
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(42, 19, 48, .8), var(--bg-void));
}

/* ============================================================
   🎨 THEME BACKGROUND OVERRIDES
   ============================================================ */
.theme-dark {
  --theme-primary: #ff2d95;
  --theme-secondary: #b44dff;
  --theme-bg: #0a0a0f;
  --theme-text: #ffffff;
  --theme-gradient: linear-gradient(135deg, #ff2d95, #b44dff);
}

.theme-neon {
  --theme-primary: #b44dff;
  --theme-secondary: #ff2d95;
  --theme-bg: #0a0015;
  --theme-text: #ffffff;
  --theme-gradient: linear-gradient(135deg, #b44dff, #ff2d95);
}

.theme-ocean {
  --theme-primary: #00d4ff;
  --theme-secondary: #0099ff;
  --theme-bg: #001220;
  --theme-text: #e8f4fd;
  --theme-gradient: linear-gradient(135deg, #00d4ff, #0099ff);
}

.theme-sunset {
  --theme-primary: #ff6a00;
  --theme-secondary: #ff2d55;
  --theme-bg: #1a0a0a;
  --theme-text: #fff5e6;
  --theme-gradient: linear-gradient(135deg, #ff6a00, #ff2d55);
}

.theme-forest {
  --theme-primary: #00ff88;
  --theme-secondary: #00cc66;
  --theme-bg: #000d0a;
  --theme-text: #e8f5e9;
  --theme-gradient: linear-gradient(135deg, #00ff88, #00cc66);
}

.theme-galaxy {
  --theme-primary: #a070ff;
  --theme-secondary: #ff44aa;
  --theme-bg: #000008;
  --theme-text: #f0e6ff;
  --theme-gradient: linear-gradient(135deg, #a070ff, #ff44aa);
}

.theme-cherry {
  --theme-primary: #ff4488;
  --theme-secondary: #ff66aa;
  --theme-bg: #1a0a12;
  --theme-text: #ffe6f0;
  --theme-gradient: linear-gradient(135deg, #ff4488, #ff66aa);
}

.theme-midnight {
  --theme-primary: #6666ff;
  --theme-secondary: #8844ff;
  --theme-bg: #000010;
  --theme-text: #e8e8ff;
  --theme-gradient: linear-gradient(135deg, #6666ff, #8844ff);
}

.theme-aurora {
  --theme-primary: #00ffcc;
  --theme-secondary: #00ccff;
  --theme-bg: #000a12;
  --theme-text: #e0f7fa;
  --theme-gradient: linear-gradient(135deg, #00ffcc, #00ccff);
}

.theme-royal {
  --theme-primary: #ffd700;
  --theme-secondary: #ff6a00;
  --theme-bg: #0a0008;
  --theme-text: #fff0e6;
  --theme-gradient: linear-gradient(135deg, #ffd700, #ff6a00);
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: var(--bg-base);
  overflow-x: hidden;
  box-shadow: 0 0 100px rgba(255, 61, 154, .1);
  z-index: 1;
}

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 72px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(13, 11, 20, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar .title {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display);
}

/* 🎨 THEME BADGE IN TOPBAR */
.theme-badge-topbar {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--theme-gradient);
  color: #fff;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px var(--theme-primary-glow);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  color: var(--text-1);
  transition: all .2s ease;
  cursor: pointer;
}

.icon-btn:hover {
  box-shadow: var(--glow-pink);
  border-color: var(--pink-1);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 460px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 8, 18, .96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  z-index: 40;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-m);
  transition: color .2s;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nav-item.active {
  color: var(--gold-1);
}

.nav-item.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 182, 39, .8));
}

.nav-center-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -16px;
  box-shadow: 0 0 24px rgba(255, 137, 30, .5);
  border: 2px solid rgba(255, 255, 255, .15);
}

.nav-center-btn svg {
  width: 22px;
  height: 22px;
  stroke: #1a0c00;
  fill: none;
  stroke-width: 2.5;
}

/* ============================================================
   🎨 ONLINE/OFFLINE STATUS - NEW
   ============================================================ */
.online-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme-green);
  box-shadow: 0 0 15px var(--theme-green);
  animation: livePulse 1.5s ease-in-out infinite;
  border: 2px solid var(--theme-bg);
}

.online-dot.offline {
  background: #555;
  box-shadow: none;
  animation: none;
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

/* ============================================================
   FRIENDS BUBBLE
   ============================================================ */
.friends-bubble {
  position: fixed;
  bottom: 76px;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.friends-bubble .bubble-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--theme-glass-bg);
  border: 2px solid var(--theme-primary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  box-shadow: 0 0 20px var(--theme-primary-glow);
  animation: neonBorderTheme 3s ease-in-out infinite;
}

.friends-bubble .bubble-btn:active {
  transform: scale(0.88);
}

.friends-bubble .bubble-btn .icon {
  font-size: 20px;
  line-height: 1;
}

.friends-bubble .bubble-btn .badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--theme-green);
  color: #000;
  font-size: 8px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 1.5px solid var(--theme-bg);
  animation: livePulse 1.5s ease-in-out infinite;
}

.friends-bubble .bubble-btn .badge-count.zero {
  background: rgba(255, 255, 255, 0.06);
  animation: none;
  min-width: 16px;
  height: 16px;
  font-size: 7px;
  color: var(--text-secondary);
}

/* ============================================================
   FRIENDS POPUP
   ============================================================ */
.friends-popup {
  position: fixed;
  bottom: 145px;
  right: 16px;
  width: 280px;
  max-height: 320px;
  background: var(--theme-glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: var(--radius-m);
  border: 1px solid var(--theme-glass-border);
  box-shadow: var(--theme-shadow);
  padding: 12px 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 998;
}

.friends-popup.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}

.friends-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--theme-glass-border);
}

.friends-popup .popup-header .title {
  font-size: 13px;
  font-weight: 700;
  color: var(--theme-text);
}

.friends-popup .popup-header .close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--theme-glass-border);
  background: var(--theme-card-bg);
  color: var(--theme-text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.friends-popup .popup-header .close-btn:active {
  transform: scale(0.9);
}

.friends-popup .popup-list {
  overflow-y: auto;
  max-height: 240px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friends-popup .popup-list::-webkit-scrollbar {
  width: 2px;
}

.friends-popup .popup-list::-webkit-scrollbar-track {
  background: transparent;
}

.friends-popup .popup-list::-webkit-scrollbar-thumb {
  background: var(--theme-primary);
  border-radius: 10px;
}

.friends-popup .popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--theme-text);
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid transparent;
}

.friends-popup .popup-item:active {
  background: var(--theme-card-bg);
  transform: scale(0.98);
  border-color: var(--theme-glass-border);
}

.friends-popup .popup-item .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--theme-glass-border);
  flex-shrink: 0;
}

.friends-popup .popup-item .info {
  flex: 1;
  min-width: 0;
}

.friends-popup .popup-item .info .name {
  font-size: 12px;
  font-weight: 600;
}

.friends-popup .popup-item .info .status {
  font-size: 9px;
  color: var(--theme-green);
  font-weight: 500;
}

.friends-popup .popup-item .level-tag {
  font-size: 8px;
  background: var(--theme-gradient);
  color: #fff;
  padding: 1px 8px;
  border-radius: 8px;
  font-weight: 700;
}

.friends-popup .popup-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--theme-text-secondary);
  font-size: 12px;
}

.friends-popup .popup-empty .emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

/* ============================================================
   🎨 NEON BORDER ANIMATION
   ============================================================ */
@keyframes neonBorderTheme {
  0%,
  100% {
    border-color: var(--theme-primary);
    box-shadow: 0 0 10px var(--theme-primary-glow), 0 0 20px var(--theme-primary-glow);
  }
  50% {
    border-color: var(--theme-secondary);
    box-shadow: 0 0 15px var(--theme-secondary-glow), 0 0 30px var(--theme-secondary-glow);
  }
}

.topbar {
  border-bottom: 2px solid var(--theme-primary) !important;
  box-shadow: 0 0 15px var(--theme-primary-glow) !important;
  animation: neonBorderTheme 3s ease-in-out infinite !important;
}

.bottom-nav {
  border-top: 2px solid var(--theme-primary) !important;
  animation: neonBorderTheme 3s ease-in-out infinite !important;
}

.banner-wrap,
.featured-card,
.friends-bubble .bubble-btn {
  animation: neonBorderTheme 4s ease-in-out infinite !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 16px;
}

.card-glow {
  background: var(--grad-surface);
  border: 1px solid var(--border-pink);
  box-shadow: var(--glow-soft);
  border-radius: var(--radius-l);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  border: none;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--grad-brand);
  color: #1a0c00;
  box-shadow: 0 4px 24px rgba(255, 137, 30, .35);
}

.btn-primary:hover {
  box-shadow: 0 4px 32px rgba(255, 137, 30, .55);
}

.btn-pink {
  background: var(--grad-pink);
  color: #fff;
  box-shadow: 0 4px 24px rgba(232, 25, 122, .4);
}

.btn-outline {
  background: transparent;
  color: var(--text-1);
  border: 1.5px solid var(--border-pink);
}

.btn-outline:hover {
  border-color: var(--pink-1);
  box-shadow: var(--glow-pink);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-2);
  border: 1px solid var(--border-soft);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   INPUTS
   ============================================================ */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 5px;
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: var(--font-body);
  -webkit-appearance: none;
}

.input::placeholder {
  color: var(--text-3);
}

.input:focus {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(255, 182, 39, .1);
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23756a8a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.badge-gold {
  background: rgba(255, 182, 39, .15);
  color: var(--gold-1);
  border: 1px solid rgba(255, 182, 39, .3);
}

.badge-pink {
  background: rgba(255, 61, 154, .15);
  color: var(--pink-1);
  border: 1px solid rgba(255, 61, 154, .3);
}

.badge-live {
  background: var(--grad-pink);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: var(--glow-pink);
}

.badge-success {
  background: rgba(45, 227, 168, .15);
  color: var(--success);
}

.badge-danger {
  background: rgba(255, 77, 106, .15);
  color: var(--danger);
}

.badge-level {
  background: linear-gradient(135deg, rgba(255, 182, 39, .2), rgba(255, 61, 154, .15));
  border: 1px solid rgba(255, 182, 39, .3);
  color: var(--gold-1);
}

/* ============================================================
   AVATAR FRAMES
   ============================================================ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
}

.frame-silver {
  box-shadow: 0 0 0 3px #c0c0c0, 0 0 14px rgba(192, 192, 192, .45) !important;
}

.frame-gold {
  box-shadow: 0 0 0 3px #ffd84d, 0 0 18px rgba(255, 216, 77, .6) !important;
}

.frame-diamond {
  box-shadow: 0 0 0 3px #7fffd4, 0 0 18px rgba(127, 255, 212, .6) !important;
}

.frame-rose {
  box-shadow: 0 0 0 3px #ff9999, 0 0 16px rgba(255, 153, 153, .5) !important;
}

.frame-neon {
  box-shadow: 0 0 0 3px #ff3d9a, 0 0 22px rgba(255, 61, 154, .7) !important;
}

.frame-royal {
  box-shadow: 0 0 0 4px #ffd700, 0 0 26px rgba(255, 215, 0, .8) !important;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.text-muted {
  color: var(--text-2);
}

.text-dim {
  color: var(--text-3);
}

.text-gold {
  color: var(--gold-1);
}

.text-pink {
  color: var(--pink-1);
}

.divider {
  height: 1px;
  background: var(--border-soft);
  margin: 14px 0;
  border: none;
}

.scroll-x {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.scroll-x::-webkit-scrollbar {
  display: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   NEON TEXT
   ============================================================ */
.neon-text-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.neon-text-pink {
  background: var(--grad-pink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   ROOM CARD
   ============================================================ */
.room-card {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  min-width: 148px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}

.room-card:active {
  transform: scale(.97);
}

.room-card .cover {
  height: 96px;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--grad-pink);
}

.room-card .info {
  padding: 9px;
}

.room-card .room-name {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-card .live-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--grad-pink);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: var(--glow-pink);
}

.room-card .viewers {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .6);
  font-size: 10px;
  font-weight: 700;
}

/* ============================================================
   SPLASH
   ============================================================ */
.splash-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2c1336 0%, var(--bg-void) 65%);
  position: relative;
  overflow: hidden;
}

.splash-screen::before,
.splash-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .3;
}

.splash-screen::before {
  width: 300px;
  height: 300px;
  background: var(--pink-2);
  top: -80px;
  right: -80px;
}

.splash-screen::after {
  width: 260px;
  height: 260px;
  background: var(--gold-3);
  bottom: -60px;
  left: -80px;
}

.splash-logo {
  width: 160px;
  filter: drop-shadow(0 0 40px rgba(255, 61, 154, .5));
  position: relative;
  z-index: 2;
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.splash-tagline {
  margin-top: 16px;
  color: var(--text-2);
  letter-spacing: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  position: relative;
}

/* ============================================================
   PARTICLES
   ============================================================ */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: .5;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-wrap {
  padding: 28px 22px;
  max-width: 460px;
  margin: 0 auto;
}

.auth-logo {
  width: 80px;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 20px rgba(255, 137, 30, .5));
}

.auth-tabs {
  display: flex;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  transition: all .2s;
}

.auth-tab.active {
  background: var(--grad-brand);
  color: #1a0c00;
}

/* ============================================================
   WALLET
   ============================================================ */
.wallet-hero {
  border-radius: var(--radius-l);
  padding: 20px;
  background: linear-gradient(135deg, #2a1430, #160a1e 60%);
  border: 1px solid var(--border-pink);
  position: relative;
  overflow: hidden;
}

.wallet-hero::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--grad-gold);
  opacity: .1;
  filter: blur(40px);
  top: -60px;
  right: -60px;
}

.coin-amount {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-wrap {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-m);
  background: var(--bg-elevated);
  border: 1px solid var(--border-pink);
  box-shadow: var(--glow-soft);
  font-size: 13px;
  font-weight: 600;
  animation: toastIn .25s ease;
  white-space: nowrap;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-3);
}

.empty-state svg {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  opacity: .4;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.tog {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}

.tog.on {
  background: var(--pink-2);
  border-color: var(--pink-1);
}

.tog::after {
  content: '';
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left .2s;
}

.tog.on::after {
  left: 22px;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.ob-icon {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  font-size: 48px;
  position: relative;
}

.ob-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 34px;
  background: inherit;
  opacity: .25;
  filter: blur(14px);
  z-index: -1;
}

/* ============================================================
   🎨 LOADING SPINNER - NEW
   ============================================================ */
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--theme-card-bg);
  border-top: 3px solid var(--theme-primary);
  border-right: 3px solid var(--theme-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================================
   🎨 RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 480px) {
  .topbar .title {
    font-size: 16px;
  }

  .friends-bubble {
    bottom: 70px;
    right: 12px;
  }

  .friends-bubble .bubble-btn {
    width: 46px;
    height: 46px;
  }

  .friends-bubble .bubble-btn .icon {
    font-size: 17px;
  }

  .friends-bubble .bubble-btn .badge-count {
    min-width: 16px;
    height: 16px;
    font-size: 7px;
    top: -3px;
    right: -3px;
  }

  .friends-popup {
    width: 240px;
    max-height: 280px;
    bottom: 130px;
    right: 12px;
  }

  .friends-popup .popup-item .avatar {
    width: 30px;
    height: 30px;
  }

  .friends-popup .popup-item .info .name {
    font-size: 11px;
  }

  .bottom-nav {
    height: 58px;
    padding: 2px 8px env(safe-area-inset-bottom, 6px) 8px;
  }

  .bottom-nav .nav-item {
    min-width: 38px;
    padding: 2px 4px;
  }

  .bottom-nav .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .bottom-nav .nav-item span {
    font-size: 6px;
  }

  .bottom-nav .nav-center-btn {
    width: 44px;
    height: 44px;
    margin-top: -16px;
  }

  .bottom-nav .nav-center-btn svg {
    width: 20px;
    height: 20px;
  }

  .theme-badge-topbar {
    font-size: 7px;
    padding: 1px 8px;
  }
}

@media (max-width: 380px) {
  .friends-bubble {
    bottom: 64px;
    right: 8px;
  }

  .friends-bubble .bubble-btn {
    width: 40px;
    height: 40px;
  }

  .friends-bubble .bubble-btn .icon {
    font-size: 15px;
  }

  .friends-bubble .bubble-btn .badge-count {
    min-width: 14px;
    height: 14px;
    font-size: 6px;
  }

  .friends-popup {
    width: 200px;
    max-height: 240px;
    bottom: 115px;
    right: 8px;
  }

  .theme-badge-topbar {
    font-size: 6px;
    padding: 0px 6px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .online-dot {
    animation: none !important;
  }

  .friends-bubble .bubble-btn .badge-count {
    animation: none !important;
  }

  .topbar,
  .bottom-nav,
  .banner-wrap,
  .featured-card,
  .friends-bubble .bubble-btn {
    animation: none !important;
  }

  .splash-logo {
    animation: none !important;
  }
}