/* ===================================
   STREAMLIVE — GLOBAL CSS
   =================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Dark theme (default) */
  --bg: #0a0b0f;
  --bg2: #111318;
  --bg3: #181b22;
  --bg4: #1f2330;
  --border: #2a2e3d;
  --border2: #353a4e;
  --text: #f0f1f5;
  --text2: #9ba3bc;
  --text3: #5d6480;
  --accent: #ff3860;
  --accent2: #ff6b35;
  --accent3: #7c3aed;
  --gold: #f5a623;
  --green: #10d879;
  --red: #ff3860;
  --blue: #3b82f6;
  --purple: #7c3aed;
  --nav-h: 64px;
  --bn-h: 60px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --glow: 0 0 20px rgba(255, 56, 96, 0.25);
}

[data-theme="light"] {
  --bg: #f4f5f9;
  --bg2: #ffffff;
  --bg3: #f0f1f6;
  --bg4: #e8eaf0;
  --border: #d8dae5;
  --border2: #c5c8d8;
  --text: #111318;
  --text2: #4a4f68;
  --text3: #9ba3bc;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.12);
  --glow: 0 0 20px rgba(255, 56, 96, 0.15);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; cursor: pointer; }
input, select, textarea, button { font-family: inherit; outline: none; border: none; }
img { max-width: 100%; }
.hidden { display: none !important; }
.mt-16 { margin-top: 16px; }
.full-width { grid-column: 1 / -1; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ===================================
   NAVBAR
   =================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10,11,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.3s;
}
[data-theme="light"] .navbar {
  background: rgba(244,245,249,0.88);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.25rem;
  color: var(--text); letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 6px;
  margin-right: 24px; flex-shrink: 0;
}
.logo-dot { color: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text2);
  transition: all 0.2s; cursor: pointer;
  background: none;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg3); }
.go-live-link {
  color: var(--accent) !important;
  border: 1px solid rgba(255,56,96,0.3);
}
.go-live-link:hover { background: rgba(255,56,96,0.12) !important; }
.nav-right {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  color: var(--text);
}
.theme-toggle:hover { background: var(--bg4); }
.nav-auth { display: flex; align-items: center; gap: 8px; }
.nav-user { display: flex; align-items: center; gap: 8px; position: relative; }
.nav-wallet-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer; color: var(--text);
  font-size: 0.8rem; font-weight: 600;
  transition: all 0.2s;
}
.nav-wallet-btn:hover { background: var(--bg4); }
.nav-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff;
  cursor: pointer; overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.nav-avatar:hover { border-color: var(--accent); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* User Dropdown */
.user-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 220px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 200;
  animation: dropIn 0.2s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.dd-name { font-weight: 600; font-size: 0.9rem; }
.dd-email { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.dd-item {
  display: block; padding: 11px 16px;
  font-size: 0.875rem; color: var(--text2);
  transition: all 0.15s; cursor: pointer;
}
.dd-item:hover { background: var(--bg3); color: var(--text); }
.dd-item.red { color: var(--red); }
.dd-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 38px; height: 38px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
}
.mobile-menu-btn span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 1px;
  transition: all 0.3s;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 99; transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mm-inner { padding: 24px 20px; display: flex; flex-direction: column; gap: 4px; }
.mm-link {
  display: block; padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all 0.2s;
}
.mm-link:hover { background: var(--bg3); color: var(--text); }
.mm-link.live-mm { color: var(--accent); }
.mm-link.accent { color: var(--accent); font-weight: 600; }
.mm-link.red { color: var(--red); }
.mm-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* ===================================
   BUTTONS
   =================================== */
.btn-primary {
  padding: 10px 22px;
  background: var(--accent);
  color: #fff; font-weight: 600; font-size: 0.875rem;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s; border: none;
  letter-spacing: 0.2px;
}
.btn-primary:hover { background: #e02f52; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,56,96,0.35); }
.btn-primary.full { width: 100%; padding: 13px; font-size: 0.95rem; }
.btn-ghost {
  padding: 10px 22px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s;
}
.btn-ghost:hover { background: var(--bg3); border-color: var(--border2); }
.btn-outline {
  padding: 10px 22px;
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.875rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-outline:hover { background: rgba(255,56,96,0.08); }
.btn-live {
  padding: 13px 28px;
  background: linear-gradient(135deg, #ff3860, #ff6b35);
  color: #fff; font-weight: 700; font-size: 0.95rem;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s; border: none;
  box-shadow: 0 4px 20px rgba(255,56,96,0.4);
  letter-spacing: 0.3px;
}
.btn-live:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,56,96,0.5); }
.btn-live.full { width: 100%; }
.btn-danger {
  padding: 10px 22px;
  background: transparent; color: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.875rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(255,56,96,0.08); }

/* ===================================
   MAIN LAYOUT
   =================================== */
.main {
  max-width: 1400px; margin: 0 auto;
  padding: var(--nav-h) 20px var(--bn-h);
  min-height: 100vh;
}
.section { padding: 32px 0; }
.section.hidden { display: none; }
.section.active { display: block; }

/* ===================================
   HERO
   =================================== */
.hero-section {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
  padding: 60px 0 48px;
  min-height: 70vh;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(255,56,96,0.12);
  border: 1px solid rgba(255,56,96,0.3);
  border-radius: 20px; font-size: 0.8rem;
  color: var(--accent); font-weight: 600;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease both;
}
.hero-heading {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -2px;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.accent-text {
  background: linear-gradient(135deg, #ff3860, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text2); line-height: 1.6;
  margin: 16px 0 32px; max-width: 460px;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Visual */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.hero-stream-preview {
  position: relative;
  width: 340px; height: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px; overflow: visible;
  box-shadow: var(--shadow-lg);
  animation: fadeInRight 0.7s ease 0.2s both;
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.preview-pulse {
  position: absolute; inset: -3px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ff3860, #ff6b35, #7c3aed);
  opacity: 0.15;
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
}
@keyframes glowPulse {
  0%,100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.02); opacity: 0.3; }
}
.preview-card {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  background: rgba(10,11,15,0.85); backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 14px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
}
.preview-avatar {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.preview-info { flex: 1; min-width: 0; }
.preview-name { font-weight: 600; font-size: 0.9rem; }
.preview-cat { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.preview-live-badge {
  background: var(--accent); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.5px;
  animation: pulse 1.5s infinite;
}
.floating-gift {
  position: absolute;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 600;
  animation: float 3s ease-in-out infinite;
  backdrop-filter: blur(8px);
}
#floatingGift1 { top: 60px; left: -20px; animation-delay: 0s; }
#floatingGift2 { top: 120px; right: -30px; animation-delay: 0.8s; }
#floatingGift3 { top: 200px; left: -10px; animation-delay: 1.6s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===================================
   SECTION TOOLBAR / FILTERS
   =================================== */
.section-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer; color: var(--text2);
  font-size: 0.8rem; font-weight: 500;
  transition: all 0.2s;
}
.pill:hover { border-color: var(--border2); color: var(--text); }
.pill.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.search-input {
  flex: 1; max-width: 280px;
  padding: 9px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text); font-size: 0.875rem;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }

/* ===================================
   STREAMS GRID
   =================================== */
.streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.stream-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: all 0.25s;
  position: relative;
}
.stream-card:hover {
  border-color: var(--border2); transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.stream-thumb {
  aspect-ratio: 16/9; position: relative;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.stream-thumb-emoji { font-size: 3rem; }
.stream-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.8));
}
.stream-live-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.5px;
  animation: pulse 1.5s infinite;
}
.stream-vip-badge {
    position: absolute;
    top: 10px;
    left: 70px;
    background: linear-gradient(135deg, #f5a623, #f97316);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.stream-host-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent3));
}am-viewers {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.72rem; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
}
.stream-info { padding: 14px; }
.stream-host-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.stream-host-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.stream-host-name { font-weight: 600; font-size: 0.875rem; }
.stream-cat { font-size: 0.75rem; color: var(--text2); }
.stream-title { font-size: 0.875rem; color: var(--text2); line-height: 1.4; }
.stream-card-footer {
  padding: 10px 14px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.stream-gift-count { font-size: 0.78rem; color: var(--text3); }
.stream-follow-btn {
  padding: 5px 12px;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); border-radius: 14px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.stream-follow-btn:hover { background: var(--accent); color: #fff; }
.stream-follow-btn.following {
  background: rgba(255,56,96,0.12); border-color: transparent;
  color: var(--text2);
}

/* ===================================
   PAGE HEADER
   =================================== */
.page-header { margin-bottom: 28px; }
.page-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 700;
  letter-spacing: -0.5px;
}
.page-header p { color: var(--text2); margin-top: 4px; }

/* ===================================
   MODALS
   =================================== */
.modal {
  position: fixed; inset: 0;
  z-index: 500; display: none;
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  width: calc(100% - 32px); max-width: 440px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 50%; cursor: pointer; color: var(--text2);
  font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; z-index: 2;
}
.modal-close:hover { background: var(--bg4); color: var(--text); }

/* Auth Box */
.auth-box { padding: 32px; }
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 28px;
  background: var(--bg3); border-radius: var(--radius-sm); padding: 4px;
}
.auth-tab {
  flex: 1; padding: 9px;
  background: none; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 600; color: var(--text2);
  border-radius: 6px; transition: all 0.2s;
}
.auth-tab.active { background: var(--bg2); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.auth-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem; font-weight: 800;
  text-align: center; margin-bottom: 6px;
}
.auth-sub { text-align: center; color: var(--text2); font-size: 0.875rem; margin-bottom: 24px; }

/* Field Group */
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.field-group input, .field-group select, .field-group textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.875rem;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  border-color: var(--accent);
}
.field-group select { cursor: pointer; }
.field-group textarea { resize: vertical; }
.forgot-link {
  display: block; text-align: right; font-size: 0.78rem;
  color: var(--accent); cursor: pointer; margin-top: 6px;
}
.forgot-link:hover { text-decoration: underline; }
.auth-divider {
  text-align: center; position: relative; margin: 20px 0;
}
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.auth-divider span {
  position: relative; background: var(--bg2);
  padding: 0 12px; font-size: 0.78rem; color: var(--text3);
}
.social-btns { display: flex; gap: 10px; }
.social-btn {
  flex: 1; padding: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-size: 0.8rem; font-weight: 500;
  transition: all 0.2s;
}
.social-btn:hover { background: var(--bg4); }

/* OTP */
.otp-hint { font-size: 0.85rem; color: var(--text2); margin-bottom: 20px; text-align: center; line-height: 1.5; }
.otp-inputs { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; }
.otp-box {
  width: 58px; height: 64px;
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius-sm); text-align: center;
  font-size: 1.5rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  color: var(--text); transition: border-color 0.2s;
}
.otp-box:focus { border-color: var(--accent); }
.resend-otp { text-align: center; font-size: 0.8rem; color: var(--text2); margin-top: 12px; }
.resend-otp span { color: var(--accent); cursor: pointer; }
.resend-otp span:hover { text-decoration: underline; }

/* Gift Box */
.gift-box { padding: 28px; max-width: 500px; }
.gift-title { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.gift-sub { font-size: 0.85rem; color: var(--text2); margin-bottom: 20px; }
.gifts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gift-item {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 8px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.gift-item:hover { border-color: var(--accent); background: var(--bg4); transform: scale(1.05); }
.gift-item.selected { border-color: var(--accent); background: rgba(255,56,96,0.1); }
.gift-item-icon { font-size: 1.8rem; margin-bottom: 4px; }
.gift-item-name { font-size: 0.7rem; color: var(--text2); margin-bottom: 2px; }
.gift-item-cost { font-size: 0.75rem; font-weight: 700; color: var(--gold); }

/* Wallet Box */
.wallet-box { padding: 28px; }
.wallet-title { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.wallet-sub { font-size: 0.85rem; color: var(--text2); margin-bottom: 20px; }
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.pkg-item {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 8px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.pkg-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.pkg-item.selected { border-color: var(--accent); background: rgba(255,56,96,0.08); }
.pkg-coins { font-size: 1.1rem; font-weight: 700; }
.pkg-price { font-size: 0.75rem; color: var(--text2); margin-top: 4px; }
.pkg-bonus { font-size: 0.7rem; color: var(--green); margin-top: 2px; }
.payment-methods p { font-size: 0.8rem; color: var(--text2); margin-bottom: 10px; }
.pay-btns { display: flex; gap: 8px; }
.pay-btn {
  flex: 1; padding: 9px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text2);
  font-size: 0.8rem; font-weight: 500; transition: all 0.2s;
}
.pay-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(255,56,96,0.08); }
.withdraw-note { font-size: 0.78rem; color: var(--text2); margin: 12px 0; }

/* Live Setup */
.live-setup-box { padding: 28px; max-width: 500px; }
.camera-preview {
  aspect-ratio: 16/9; background: #000;
  border-radius: var(--radius-sm); overflow: hidden;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.camera-preview video { width: 100%; height: 100%; object-fit: cover; }
.camera-placeholder {
  position: absolute; color: var(--text3); font-size: 0.9rem;
}
.live-toggles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.toggle-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; color: var(--text2); cursor: pointer;
}
.toggle-item input { accent-color: var(--accent); }

/* ===================================
   LIVE ROOM
   =================================== */
.live-room {
  position: fixed; inset: 0; z-index: 600;
  background: #000;
  display: flex; flex-direction: column;
}
.live-room.hidden { display: none; }
.live-video-wrap {
  flex: 1; position: relative; overflow: hidden;
}
.live-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
}
.live-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.7) 100%);
}
.live-top {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 0;
}
.live-host-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.live-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; border: 2px solid rgba(255,255,255,0.3);
}
.live-host-name { font-weight: 700; font-size: 0.95rem; color: #fff; }
.live-badge {
  font-size: 0.65rem; font-weight: 700; color: #fff;
  background: var(--accent); padding: 2px 8px; border-radius: 4px;
  display: inline-block; margin-top: 2px;
  animation: pulse 1.5s infinite;
}
.live-stats { display: flex; gap: 8px; color: #fff; font-size: 0.8rem; font-weight: 600; }
.live-close-btn {
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.8rem; font-weight: 600;
}
.live-gifts-float {
  flex: 1; pointer-events: none; position: relative;
  padding: 16px;
}
.gift-float-item {
  position: absolute; left: 16px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 12px; border-radius: 20px;
  color: #fff; font-size: 0.8rem; font-weight: 600;
  animation: giftFloat 3s ease-out forwards;
}
@keyframes giftFloat {
  0% { bottom: 0; opacity: 0; }
  20% { opacity: 1; }
  100% { bottom: 200px; opacity: 0; }
}
.live-chat-wrap {
  padding: 0 12px 80px;
}
.live-chat {
  height: 180px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 8px; padding-right: 4px;
}
.live-chat::-webkit-scrollbar { display: none; }
.chat-msg {
  font-size: 0.8rem; color: #fff;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  padding: 5px 10px; border-radius: 12px;
  width: fit-content; max-width: 80%;
}
.chat-msg .chat-name { font-weight: 700; color: var(--gold); }
.live-chat-input {
  display: flex; gap: 8px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; padding: 8px 8px 8px 14px;
  align-items: center;
}
.live-chat-input input {
  flex: 1; background: none; color: #fff; font-size: 0.875rem;
  border: none;
}
.live-chat-input input::placeholder { color: rgba(255,255,255,0.4); }
.live-chat-input button {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gift-btn { background: rgba(255,255,255,0.15) !important; }

/* ===================================
   TOAST
   =================================== */
.toast {
  position: fixed; bottom: calc(var(--bn-h) + 16px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-size: 0.875rem; font-weight: 500;
  z-index: 9999; box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}
.toast.error { border-color: var(--red); }
.toast.success { border-color: var(--green); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===================================
   DASHBOARD
   =================================== */
.dash-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-label { font-size: 0.75rem; color: var(--text2); margin-bottom: 4px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 700; }
.stat-change { font-size: 0.75rem; color: var(--green); margin-top: 4px; }
.stat-change.down { color: var(--red); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.dash-card h4 { font-weight: 600; margin-bottom: 16px; font-size: 0.9rem; color: var(--text2); }
.activity-item, .gifter-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.activity-item:last-child, .gifter-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1.1rem; }
.activity-text { flex: 1; }
.activity-time { font-size: 0.75rem; color: var(--text3); }
.gifter-rank { font-weight: 700; font-size: 0.8rem; color: var(--text3); width: 20px; }
.gifter-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}
.gifter-name { flex: 1; font-weight: 500; }
.gifter-amount { font-size: 0.8rem; color: var(--gold); font-weight: 700; }
.earnings-chart {
  height: 80px; display: flex; align-items: flex-end;
  gap: 8px; padding-top: 8px;
}
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar {
  width: 100%; border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  min-height: 4px; transition: height 0.6s ease;
}
.chart-bar-label { font-size: 0.65rem; color: var(--text3); }

/* ===================================
   WALLET SECTION
   =================================== */
.wallet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.wallet-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all 0.2s;
}
.wallet-card.coins { border-left: 3px solid var(--gold); }
.wallet-card.diamonds { border-left: 3px solid var(--blue); }
.wc-icon { font-size: 2rem; }
.wc-info { flex: 1; }
.wc-label { font-size: 0.75rem; color: var(--text2); }
.wc-amount { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 700; }
.wallet-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.wallet-action-btn {
  flex: 1; min-width: 120px; padding: 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-size: 0.875rem; font-weight: 500; text-align: center;
  transition: all 0.2s;
}
.wallet-action-btn:hover { background: var(--bg3); border-color: var(--border2); }
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.tx-item:last-child { border-bottom: none; }
.tx-icon { font-size: 1.2rem; }
.tx-info { flex: 1; }
.tx-label { font-weight: 500; }
.tx-date { font-size: 0.75rem; color: var(--text3); }
.tx-amount { font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 0.875rem; }
.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--red); }

/* TX Table */
.tx-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tx-table {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.tx-table-row {
  display: grid; grid-template-columns: 2fr 3fr 1fr 1fr;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.85rem; align-items: center;
}
.tx-table-row:last-child { border-bottom: none; }
.tx-table-head { background: var(--bg3); font-weight: 600; font-size: 0.78rem; color: var(--text2); }
.tx-status {
  display: inline-block; padding: 3px 10px;
  border-radius: 12px; font-size: 0.72rem; font-weight: 600;
}
.tx-status.success { background: rgba(16,216,121,0.15); color: var(--green); }
.tx-status.pending { background: rgba(245,166,35,0.15); color: var(--gold); }
.tx-status.failed { background: rgba(255,56,96,0.15); color: var(--red); }

/* ===================================
   VIP
   =================================== */
.vip-banner {
  text-align: center; padding: 48px 20px;
  background: linear-gradient(135deg, rgba(245,166,35,0.08), rgba(124,58,237,0.08));
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius); margin-bottom: 32px;
}
.vip-crown { font-size: 3rem; margin-bottom: 12px; }
.vip-title {
  font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #f97316);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.vip-sub { color: var(--text2); margin-top: 8px; }
.vip-plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 40px;
}
.vip-plan-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: all 0.25s; cursor: pointer;
}
.vip-plan-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.vip-plan-card.popular {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(245,166,35,0.15);
}
.vip-popular-tag {
  font-size: 0.7rem; font-weight: 700; color: var(--gold);
  background: rgba(245,166,35,0.12);
  padding: 3px 10px; border-radius: 12px; display: inline-block;
  margin-bottom: 12px;
}
.vip-plan-icon { font-size: 2.2rem; margin-bottom: 10px; }
.vip-plan-name { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.vip-plan-price {
  font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800;
  color: var(--gold); margin-bottom: 4px;
}
.vip-plan-period { font-size: 0.78rem; color: var(--text3); margin-bottom: 16px; }
.vip-plan-features { list-style: none; margin-bottom: 20px; }
.vip-plan-features li { font-size: 0.8rem; color: var(--text2); padding: 4px 0; }
.vip-plan-features li::before { content: '✓ '; color: var(--green); font-weight: 700; }
.vip-perks h3 { font-family: 'Syne', sans-serif; font-size: 1.3rem; margin-bottom: 20px; }
.perks-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.perk-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 500;
}
.perk-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ===================================
   SETTINGS
   =================================== */
.settings-grid {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 24px;
}
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-tab {
  padding: 10px 14px;
  background: none; border: 1px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text2);
  font-size: 0.85rem; font-weight: 500; text-align: left;
  transition: all 0.2s;
}
.settings-tab:hover { background: var(--bg3); color: var(--text); }
.settings-tab.active { background: var(--bg3); border-color: var(--border); color: var(--text); font-weight: 600; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-panel h3 { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 24px; }
.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg3); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-form { max-width: 480px; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.security-option, .notif-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.security-option:last-child, .notif-item:last-child { border-bottom: none; }
.security-option p, .notif-item p { font-size: 0.8rem; color: var(--text2); margin-top: 2px; }
.notif-list { margin-bottom: 16px; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--border2); border-radius: 24px; cursor: pointer;
  transition: 0.3s;
}
.slider::before {
  content: ''; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.3s;
}
input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(20px); }

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
  text-align: center; padding: 64px 20px;
  color: var(--text2);
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 1.3rem; margin-bottom: 8px; color: var(--text); }
.empty-state p { margin-bottom: 24px; }

/* ===================================
   DESKTOP-ONLY / MOBILE TOGGLES
   =================================== */
.desktop-only { display: flex; }

/* ===================================
   BOTTOM NAV (mobile)
   =================================== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bn-h);
  background: var(--bg2); border-top: 1px solid var(--border);
  z-index: 100;
  grid-template-columns: repeat(5, 1fr);
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 0.6rem; font-weight: 600;
  transition: color 0.2s;
}
.bn-item.active { color: var(--accent); }
.bn-icon { font-size: 1.1rem; }
.bn-label { font-size: 0.6rem; }
.live-btn {
  background: linear-gradient(135deg, rgba(255,56,96,0.15), rgba(255,107,53,0.15));
  border-radius: 12px; margin: 6px 4px;
}
.bn-live-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: #fff;
}
.bn-live-dot::after { content: '🔴'; font-size: 0.6rem; }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
  .settings-tab { flex: 1; min-width: 120px; text-align: center; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-menu-btn { display: flex; }
  .bottom-nav { display: grid; }
  .main { padding-bottom: calc(var(--bn-h) + 16px); }
  .streams-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .wallet-cards { grid-template-columns: 1fr; }
  .wallet-card { flex-direction: column; align-items: flex-start; }
  .packages-grid { grid-template-columns: repeat(2, 1fr); }
  .gifts-grid { grid-template-columns: repeat(3, 1fr); }
  .tx-table-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .tx-table-row > *:nth-child(3), .tx-table-row > *:nth-child(4) { display: none; }
  .nav-auth { display: none; }
  .hero-heading { font-size: 2.2rem; }
  .vip-plans { grid-template-columns: 1fr 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .streams-grid { grid-template-columns: 1fr; }
  .gifts-grid { grid-template-columns: repeat(3, 1fr); }
  .vip-plans { grid-template-columns: 1fr; }
  .section-toolbar { flex-direction: column; align-items: flex-start; }
  .search-input { max-width: 100%; width: 100%; }
  .modal-box { max-width: 100%; border-radius: 20px 20px 0 0; margin-top: auto; }
  .modal { align-items: flex-end; }
}
/* Gift Animation */
.gift-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 30px 50px;
    border-radius: 20px;
    z-index: 9999;
    animation: giftPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    pointer-events: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,215,0,0.3);
}

.gift-emoji {
    font-size: 5rem;
    display: block;
    animation: giftBounce 0.8s ease-in-out infinite;
}

.gift-sender {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 12px;
    display: block;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@keyframes giftPop {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes giftBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(5deg); }
}

/* Chat message styles */
.chat-msg {
    padding: 6px 12px;
    margin: 3px 0;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

.chat-msg.user-msg {
    background: rgba(79, 70, 229, 0.15);
    border-left: 3px solid #4F46E5;
}

.chat-msg.gift-msg {
    background: rgba(255, 215, 0, 0.15);
    border-left: 3px solid #FFD700;
    color: #FFD700;
}

.chat-msg.system-msg {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #888;
    color: #aaa;
    font-style: italic;
}

.chat-name {
    font-weight: 600;
    color: #4F46E5;
}

.user-msg .chat-name {
    color: #4F46E5;
}

.gift-msg .chat-name {
    color: #FFD700;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}