/* ===================================
   STREAMLIVE â€” GLOBAL CSS (FIXED)
   =================================== */

/* ---------- CSS Variables ---------- */
:root {
  --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 16px;
  height: 100%;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.1rem;
  color: var(--text); letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 6px;
  margin-right: 16px; 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: 2px; flex: 1; }
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem; 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: 6px; margin-left: auto;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer; font-size: 0.9rem;
  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: 6px; }
.nav-user { display: flex; align-items: center; gap: 6px; position: relative; }
.nav-wallet-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; cursor: pointer; color: var(--text);
  font-size: 0.75rem; font-weight: 600;
  transition: all 0.2s;
}
.nav-wallet-btn:hover { background: var(--bg4); }
.nav-avatar {
  width: 34px; height: 34px; 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.8rem; 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% + 8px); right: 0;
  width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  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: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.dd-name { font-weight: 600; font-size: 0.85rem; }
.dd-email { font-size: 0.7rem; color: var(--text2); margin-top: 2px; }
.dd-item {
  display: block; padding: 9px 14px;
  font-size: 0.8rem; 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: 4px;
  width: 36px; height: 36px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
}
.mobile-menu-btn span {
  display: block; width: 16px; 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: 16px; display: flex; flex-direction: column; gap: 2px; }
.mm-link {
  display: block; padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem; 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: 6px 0; }

/* ===================================
   BUTTONS
   =================================== */
.btn-primary {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff; font-weight: 600; font-size: 0.85rem;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s; border: none;
}
.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: 12px; font-size: 0.9rem; }
.btn-ghost {
  padding: 8px 16px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.85rem; font-weight: 500;
  transition: all 0.2s;
}
.btn-ghost:hover { background: var(--bg3); border-color: var(--border2); }
.btn-outline {
  padding: 8px 16px;
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-outline:hover { background: rgba(255,56,96,0.08); }
.btn-live {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff3860, #ff6b35);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s; border: none;
  box-shadow: 0 4px 20px rgba(255,56,96,0.4);
}
.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: 8px 16px;
  background: transparent; color: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.85rem; 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) 16px var(--bn-h);
  min-height: 100vh;
}
.section { padding: 24px 0; }
.section.hidden { display: none; }
.section.active { display: block; }

/* ===================================
   HERO
   =================================== */
.hero-section {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px; align-items: center;
  padding: 40px 0 32px;
  min-height: 60vh;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: rgba(255,56,96,0.12);
  border: 1px solid rgba(255,56,96,0.3);
  border-radius: 16px; font-size: 0.75rem;
  color: var(--accent); font-weight: 600;
  margin-bottom: 16px;
}
.hero-heading {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -1px;
}
.accent-text {
  background: linear-gradient(135deg, #ff3860, #ff6b35);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1rem; color: var(--text2); line-height: 1.6;
  margin: 12px 0 24px; max-width: 420px;
}
.hero-btns {
  display: flex; gap: 10px; flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual { display: none; }
.hero-stream-preview { display: none; }

/* ===================================
   SECTION TOOLBAR / FILTERS
   =================================== */
.section-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 5px 12px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; cursor: pointer; color: var(--text2);
  font-size: 0.75rem; 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: 240px;
  padding: 7px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; color: var(--text); font-size: 0.8rem;
  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(240px, 1fr));
  gap: 16px;
}
.stream-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; transition: all 0.25s;
}
.stream-card:hover {
  border-color: var(--border2); transform: translateY(-3px);
  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: 2.5rem; }
.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: 8px; left: 8px;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  animation: pulse 1.5s infinite;
}
.stream-viewers {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.65rem; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
}
.stream-info { padding: 10px 12px; }
.stream-host-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.stream-host-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; flex-shrink: 0;
}
.stream-host-name { font-weight: 600; font-size: 0.8rem; }
.stream-cat { font-size: 0.7rem; color: var(--text2); }
.stream-title { font-size: 0.8rem; color: var(--text2); line-height: 1.3; }
.stream-card-footer {
  padding: 8px 12px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.stream-gift-count { font-size: 0.7rem; color: var(--text3); }
.stream-follow-btn {
  padding: 3px 10px;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); border-radius: 12px;
  font-size: 0.7rem; 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: 20px; }
.page-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.5px;
}
.page-header p { color: var(--text2); font-size: 0.9rem; margin-top: 2px; }

/* ===================================
   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.7); backdrop-filter: blur(8px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  width: calc(100% - 24px); max-width: 400px;
  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: 10px; right: 10px;
  width: 28px; height: 28px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 50%; cursor: pointer; color: var(--text2);
  font-size: 0.7rem; 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: 24px 20px; }
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--bg3); border-radius: var(--radius-sm); padding: 4px;
}
.auth-tab {
  flex: 1; padding: 7px;
  background: none; border: none; cursor: pointer;
  font-size: 0.8rem; 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.2rem; font-weight: 800;
  text-align: center; margin-bottom: 4px;
}
.auth-sub { text-align: center; color: var(--text2); font-size: 0.8rem; margin-bottom: 16px; }

/* Field Group */
.field-group { margin-bottom: 12px; }
.field-group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.field-group input, .field-group select, .field-group textarea {
  width: 100%; padding: 9px 12px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem;
  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.7rem;
  color: var(--accent); cursor: pointer; margin-top: 4px;
}
.forgot-link:hover { text-decoration: underline; }
.auth-divider {
  text-align: center; position: relative; margin: 16px 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 10px; font-size: 0.7rem; color: var(--text3);
}
.social-btns { display: flex; gap: 8px; }
.social-btn {
  flex: 1; padding: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-size: 0.75rem; font-weight: 500;
  transition: all 0.2s;
}
.social-btn:hover { background: var(--bg4); }

/* ===================================
   OTP INPUT - FIXED FOR MOBILE
   =================================== */
.otp-hint { 
  font-size: 0.8rem; 
  color: var(--text2); 
  margin-bottom: 16px; 
  text-align: center; 
  line-height: 1.5; 
}
.otp-inputs { 
  display: flex; 
  gap: 8px; 
  justify-content: center; 
  margin-bottom: 20px; 
  flex-wrap: wrap;
}
.otp-box {
  width: 48px; 
  height: 56px;
  background: var(--bg3); 
  border: 2px solid var(--border);
  border-radius: var(--radius-sm); 
  text-align: center;
  font-size: 1.3rem; 
  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.75rem; 
  color: var(--text2); 
  margin-top: 10px; 
}
.resend-otp span { color: var(--accent); cursor: pointer; }
.resend-otp span:hover { text-decoration: underline; }

/* ===================================
   GIFT MODAL
   =================================== */
.gift-box { padding: 20px; max-width: 440px; }
.gift-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.gift-sub { font-size: 0.8rem; color: var(--text2); margin-bottom: 16px; }
.gifts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift-item {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 6px;
  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.5rem; margin-bottom: 2px; }
.gift-item-name { font-size: 0.65rem; color: var(--text2); margin-bottom: 2px; }
.gift-item-cost { font-size: 0.65rem; font-weight: 700; color: var(--gold); }

/* ===================================
   WALLET MODAL
   =================================== */
.wallet-box { padding: 20px; }
.wallet-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.wallet-sub { font-size: 0.8rem; color: var(--text2); margin-bottom: 16px; }
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pkg-item {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 6px;
  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: 1rem; font-weight: 700; }
.pkg-price { font-size: 0.7rem; color: var(--text2); margin-top: 2px; }
.pkg-bonus { font-size: 0.65rem; color: var(--green); margin-top: 2px; }
.payment-methods p { font-size: 0.75rem; color: var(--text2); margin-bottom: 8px; }
.pay-btns { display: flex; gap: 6px; }
.pay-btn {
  flex: 1; padding: 7px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text2);
  font-size: 0.75rem; 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.7rem; color: var(--text2); margin: 10px 0; }

/* ===================================
   LIVE SETUP
   =================================== */
.live-setup-box { padding: 20px; max-width: 440px; }
.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.85rem;
}
.live-toggles { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.toggle-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text2); cursor: pointer;
}
.toggle-item input { accent-color: var(--accent); }

/* ===================================
   LIVE ROOM - IMPROVED
   =================================== */
.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: contain;
  background: #000;
}
.live-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.8) 100%);
}
.live-top {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 0;
  flex-wrap: wrap;
}
.live-host-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 140px; }
.live-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: 1rem; border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.live-host-name { font-weight: 600; font-size: 0.85rem; color: #fff; }
.live-badge {
  font-size: 0.55rem; 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.7rem; font-weight: 600; }
.live-stats span {
  background: rgba(0,0,0,0.5);
  padding: 2px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.live-close-btn {
  background: rgba(255,0,0,0.7);
  border: none; color: #fff;
  padding: 4px 12px; border-radius: 12px; cursor: pointer;
  font-size: 0.7rem; font-weight: 600;
  transition: background 0.2s;
}
.live-close-btn:hover { background: #ff0000; }
.live-gifts-float {
  flex: 1; pointer-events: none; position: relative;
  padding: 12px;
}
.live-chat-wrap {
  padding: 0 12px 12px;
}
.live-chat {
  height: 160px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
  margin-bottom: 6px; padding-right: 4px;
}
.live-chat::-webkit-scrollbar { display: none; }
.live-chat .chat-msg {
  font-size: 0.75rem; color: #fff;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: 12px;
  width: fit-content; max-width: 80%;
}
.live-chat .chat-msg .chat-name { font-weight: 700; color: var(--gold); }
.live-chat .chat-msg.user-msg {
  background: rgba(79, 70, 229, 0.2);
  border-left: 2px solid #4F46E5;
}
.live-chat .chat-msg.gift-msg {
  background: rgba(255, 215, 0, 0.15);
  border-left: 2px solid #FFD700;
  color: #FFD700;
}
.live-chat .chat-msg.system-msg {
  background: rgba(255, 255, 255, 0.05);
  border-left: 2px solid #888;
  color: #aaa;
  font-style: italic;
}
.live-chat-input {
  display: flex; gap: 6px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 4px 4px 4px 12px;
  align-items: center;
}
.live-chat-input input {
  flex: 1; background: none; color: #fff; font-size: 0.8rem;
  border: none; padding: 6px 0;
}
.live-chat-input input::placeholder { color: rgba(255,255,255,0.4); }
.live-chat-input button {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.live-chat-input .gift-btn { background: rgba(255,215,0,0.2) !important; color: #ffd93d; }

/* ===================================
   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: 10px 18px;
  font-size: 0.8rem; font-weight: 500;
  z-index: 9999; box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.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(150px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-icon { font-size: 1.2rem; margin-bottom: 6px; }
.stat-label { font-size: 0.7rem; color: var(--text2); margin-bottom: 2px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 700; }
.stat-change { font-size: 0.7rem; color: var(--green); margin-top: 2px; }
.stat-change.down { color: var(--red); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.dash-card h4 { font-weight: 600; margin-bottom: 12px; font-size: 0.8rem; color: var(--text2); }
.activity-item, .gifter-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.activity-item:last-child, .gifter-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1rem; }
.activity-text { flex: 1; }
.activity-time { font-size: 0.65rem; color: var(--text3); }
.gifter-rank { font-weight: 700; font-size: 0.7rem; color: var(--text3); width: 16px; }
.gifter-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #fff;
}
.gifter-name { flex: 1; font-weight: 500; }
.gifter-amount { font-size: 0.7rem; color: var(--gold); font-weight: 700; }
.earnings-chart {
  height: 60px; display: flex; align-items: flex-end;
  gap: 6px; padding-top: 6px;
}
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chart-bar {
  width: 100%; border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  min-height: 3px; transition: height 0.6s ease;
}
.chart-bar-label { font-size: 0.55rem; color: var(--text3); }

/* ===================================
   WALLET
   =================================== */
.wallet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.wallet-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.wallet-card.coins { border-left: 3px solid var(--gold); }
.wallet-card.diamonds { border-left: 3px solid var(--blue); }
.wc-icon { font-size: 1.5rem; }
.wc-info { flex: 1; }
.wc-label { font-size: 0.7rem; color: var(--text2); }
.wc-amount { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; }
.wallet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.wallet-action-btn {
  flex: 1; min-width: 100px; padding: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-size: 0.75rem; font-weight: 500; text-align: center;
  transition: all 0.2s;
}
.wallet-action-btn:hover { background: var(--bg3); border-color: var(--border2); }

/* TX Table */
.tx-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tx-table {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.tx-table-row {
  display: grid; grid-template-columns: 2fr 2fr 1fr 1fr;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-size: 0.75rem; align-items: center;
}
.tx-table-row:last-child { border-bottom: none; }
.tx-table-head { background: var(--bg3); font-weight: 600; font-size: 0.7rem; color: var(--text2); }
.tx-status {
  display: inline-block; padding: 2px 8px;
  border-radius: 10px; font-size: 0.65rem; 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: 32px 16px;
  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-sm); margin-bottom: 24px;
}
.vip-crown { font-size: 2.5rem; margin-bottom: 8px; }
.vip-title {
  font-family: 'Syne', sans-serif; font-size: 1.5rem; 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); font-size: 0.9rem; margin-top: 4px; }
.vip-plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 32px;
}
.vip-plan-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px; text-align: center;
  transition: all 0.25s; cursor: pointer;
}
.vip-plan-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.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.65rem; font-weight: 700; color: var(--gold);
  background: rgba(245,166,35,0.12);
  padding: 2px 8px; border-radius: 10px; display: inline-block;
  margin-bottom: 8px;
}
.vip-plan-icon { font-size: 1.8rem; margin-bottom: 8px; }
.vip-plan-name { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.vip-plan-price {
  font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800;
  color: var(--gold); margin-bottom: 2px;
}
.vip-plan-period { font-size: 0.7rem; color: var(--text3); margin-bottom: 12px; }
.vip-plan-features { list-style: none; margin-bottom: 16px; }
.vip-plan-features li { font-size: 0.75rem; color: var(--text2); padding: 3px 0; }
.vip-plan-features li::before { content: 'âœ“ '; color: var(--green); font-weight: 700; }
.vip-perks h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; margin-bottom: 16px; }
.perks-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.perk-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 500;
}
.perk-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ===================================
   SETTINGS
   =================================== */
.settings-grid {
  display: grid; grid-template-columns: 180px 1fr;
  gap: 16px;
}
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-tab {
  padding: 8px 12px;
  background: none; border: 1px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text2);
  font-size: 0.8rem; 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.1rem; font-weight: 700; margin-bottom: 16px; }
.avatar-upload { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar-preview {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--bg3); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.settings-form { max-width: 400px; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.security-option, .notif-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 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.7rem; color: var(--text2); margin-top: 2px; }
.notif-list { margin-bottom: 12px; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--border2); border-radius: 22px; cursor: pointer;
  transition: 0.3s;
}
.slider::before {
  content: ''; position: absolute; height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.3s;
}
input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(18px); }

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
  text-align: center; padding: 48px 16px;
  color: var(--text2);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 0.9rem; margin-bottom: 16px; }

/* ===================================
   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: 2px; background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 0.55rem; font-weight: 600;
  transition: color 0.2s;
}
.bn-item.active { color: var(--accent); }
.bn-icon { font-size: 1rem; }
.bn-label { font-size: 0.55rem; }
.live-btn {
  background: linear-gradient(135deg, rgba(255,56,96,0.15), rgba(255,107,53,0.15));
  border-radius: 10px; margin: 4px;
}
.bn-live-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; color: #fff;
}
.bn-live-dot::after { content: 'ðŸ”´'; font-size: 0.55rem; }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
  .settings-tab { flex: 1; min-width: 100px; text-align: center; padding: 6px 10px; font-size: 0.75rem; }
  .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) + 12px); padding-left: 12px; padding-right: 12px; }
  .streams-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .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; font-size: 0.7rem; }
  .tx-table-row > *:nth-child(3), .tx-table-row > *:nth-child(4) { display: none; }
  .nav-auth { display: none; }
  .hero-heading { font-size: 1.8rem; }
  .vip-plans { grid-template-columns: 1fr 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .modal-box { max-width: calc(100% - 16px); }
  .auth-box { padding: 20px 16px; }
  
  /* OTP Mobile Fix */
  .otp-box {
    width: 40px;
    height: 48px;
    font-size: 1.1rem;
  }
  .otp-inputs {
    gap: 6px;
  }
  
  /* Live Room Mobile */
  .live-top {
    padding: 8px 10px 0;
  }
  .live-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  .live-host-name { font-size: 0.75rem; }
  .live-stats { font-size: 0.6rem; }
  .live-stats span { padding: 1px 8px; }
  .live-chat {
    height: 120px;
  }
  .live-chat-wrap {
    padding: 0 8px 8px;
  }
  .live-chat .chat-msg {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  .live-chat-input {
    padding: 3px 3px 3px 10px;
    border-radius: 16px;
  }
  .live-chat-input input { font-size: 0.75rem; padding: 4px 0; }
  .live-chat-input button {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
  .live-close-btn {
    font-size: 0.65rem;
    padding: 3px 10px;
  }
}

@media (max-width: 480px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .streams-grid { grid-template-columns: 1fr; gap: 10px; }
  .gifts-grid { grid-template-columns: repeat(3, 1fr); }
  .vip-plans { grid-template-columns: 1fr; }
  .section-toolbar { flex-direction: column; align-items: stretch; }
  .search-input { max-width: 100%; width: 100%; }
  .modal-box { max-width: 100%; border-radius: 16px 16px 0 0; margin-top: auto; max-height: 85vh; }
  .modal { align-items: flex-end; }
  .packages-grid { grid-template-columns: 1fr 1fr; }
  .wallet-actions { flex-direction: column; }
  .wallet-action-btn { min-width: unset; }
  .hero-heading { font-size: 1.5rem; }
  .hero-sub { font-size: 0.85rem; }
  .hero-btns .btn-live, .hero-btns .btn-ghost { width: 100%; text-align: center; }
  .filter-pills { gap: 4px; }
  .pill { font-size: 0.65rem; padding: 4px 10px; }
  
  /* OTP Mobile Small */
  .otp-box {
    width: 36px;
    height: 42px;
    font-size: 1rem;
  }
  .otp-inputs {
    gap: 4px;
  }
  
  /* Gifts Grid Mobile */
  .gifts-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .gift-item { padding: 8px 4px; }
  .gift-item-icon { font-size: 1.2rem; }
  .gift-item-name { font-size: 0.55rem; }
  .gift-item-cost { font-size: 0.55rem; }
  
  /* Wallet Cards Mobile */
  .wallet-card { padding: 12px; }
  .wc-amount { font-size: 1rem; }
  
  /* Settings Mobile */
  .settings-grid { gap: 10px; }
  .settings-tab { min-width: 70px; padding: 5px 8px; font-size: 0.65rem; }
  .settings-panel h3 { font-size: 1rem; }
  
  /* Live Room Mobile Small */
  .live-chat {
    height: 100px;
  }
  .live-chat .chat-msg {
    font-size: 0.65rem;
    padding: 2px 6px;
    max-width: 90%;
  }
  .live-chat-input input { font-size: 0.7rem; }
  .live-chat-input button {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
  }
  .live-top {
    padding: 6px 8px 0;
    gap: 4px;
  }
  .live-stats { gap: 4px; }
  .live-stats span { font-size: 0.55rem; padding: 1px 6px; }
  .live-close-btn { font-size: 0.6rem; padding: 2px 8px; }
}

/* ===================================
   CHAT MESSAGE STYLES (Global)
   =================================== */
.chat-msg {
  padding: 4px 10px;
  margin: 2px 0;
  border-radius: 6px;
  animation: fadeIn 0.3s ease;
  font-size: 0.8rem;
}
.chat-msg .chat-name {
  font-weight: 600;
  color: #4F46E5;
}
.chat-msg.user-msg {
  background: rgba(79, 70, 229, 0.15);
  border-left: 2px solid #4F46E5;
}
.chat-msg.user-msg .chat-name { color: #4F46E5; }
.chat-msg.gift-msg {
  background: rgba(255, 215, 0, 0.15);
  border-left: 2px solid #FFD700;
  color: #FFD700;
}
.chat-msg.gift-msg .chat-name { color: #FFD700; }
.chat-msg.system-msg {
  background: rgba(255, 255, 255, 0.05);
  border-left: 2px solid #888;
  color: #aaa;
  font-style: italic;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   GIFT ANIMATION
   =================================== */
.gift-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  padding: 24px 40px;
  border-radius: 16px;
  z-index: 9999;
  animation: giftPop 0.5s 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-animation .gift-emoji {
  font-size: 4rem;
  display: block;
  animation: giftBounce 0.8s ease-in-out infinite;
}
.gift-animation .gift-sender {
  color: #fff;
  font-size: 1rem;
  margin-top: 8px;
  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); }
}
/* ===================================
   VIEWER PLACEHOLDER
   =================================== */
.viewer-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a2e, #0a0a0f);
  z-index: 10;
}
.viewer-placeholder.hidden { display: none; }
.viewer-content {
  text-align: center;
  color: #fff;
  padding: 20px;
}
.viewer-stream-icon {
  font-size: 6rem;
  margin-bottom: 16px;
  animation: pulse 2s infinite;
}
.viewer-stream-title {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.viewer-host-name {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.viewer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,0,0,0.2);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff4444;
  margin-bottom: 16px;
}
.live-dot {
  animation: blink 1.5s infinite;
}
.viewer-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
.viewer-stats span {
  background: rgba(255,255,255,0.1);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
}
.viewer-message {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .viewer-stream-icon { font-size: 4rem; }
  .viewer-stream-title { font-size: 1.5rem; }
  .viewer-host-name { font-size: 1rem; }
  .viewer-stats span { font-size: 0.7rem; padding: 2px 10px; }
}

/* ============================================
   LIVE GIFT MODAL - FIXED LAYOUT
   ============================================ */

.live-gift-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.live-gift-overlay.hidden {
  display: none !important;
}

.live-gift-modal {
  background: var(--bg);
  border-radius: 20px;
  padding: 24px;
  max-width: 520px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s ease;
}

/* Scrollbar styling */
.live-gift-modal::-webkit-scrollbar {
  width: 4px;
}
.live-gift-modal::-webkit-scrollbar-track {
  background: var(--bg2);
  border-radius: 10px;
}
.live-gift-modal::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* Header */
.live-gift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.live-gift-title {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  color: var(--text);
}

.live-gift-close {
  background: var(--bg2);
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  padding: 4px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.live-gift-close:hover {
  background: var(--danger);
  color: white;
}

/* Balance */
.live-gift-balance {
  padding: 12px 16px;
  background: var(--bg2);
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--text2);
  text-align: center;
}

.live-gift-balance strong {
  color: var(--primary);
  font-size: 1.2rem;
}

/* Free Emojis Section */
.free-emojis-section {
  margin-bottom: 16px;
}

.free-emojis-label {
  font-size: 0.8rem;
  color: var(--text2);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.free-emojis-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.free-emoji-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border: 2px solid var(--border-alpha);
  border-radius: 10px;
  background: var(--bg2);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.free-emoji-item:hover {
  border-color: var(--success);
  transform: translateY(-2px);
  background: var(--success-alpha);
}

.free-emoji-item .emoji-icon {
  font-size: 1.6rem;
}

.free-emoji-item .emoji-name {
  font-size: 0.55rem;
  color: var(--text2);
  margin-top: 2px;
}

.free-emoji-item .emoji-badge {
  font-size: 0.5rem;
  color: var(--success);
  background: var(--success-alpha);
  padding: 1px 6px;
  border-radius: 10px;
  margin-top: 2px;
}

/* Gift Divider */
.gift-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gift-divider::before,
.gift-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.gift-divider::before {
  margin-right: 12px;
}
.gift-divider::after {
  margin-left: 12px;
}

/* Premium Gifts Grid */
.live-gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.live-gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
}

.live-gift-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.15);
}

.live-gift-item.selected {
  border-color: var(--primary);
  background: var(--primary-alpha);
  box-shadow: 0 0 25px rgba(255, 107, 107, 0.25);
}

.live-gift-item .gift-emoji {
  font-size: 2rem;
  line-height: 1.2;
}

.live-gift-item .gift-name {
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text);
}

.live-gift-item .gift-cost {
  font-size: 0.6rem;
  color: var(--text2);
  margin-top: 2px;
}

.live-gift-item .gift-diamond {
  font-size: 0.55rem;
  color: var(--success);
  margin-top: 1px;
}

.live-gift-item .gift-check {
  display: none;
  color: var(--success);
  font-size: 0.8rem;
  margin-top: 2px;
}

.live-gift-item.selected .gift-check {
  display: block;
}

/* Send Button */
.live-gift-send-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 4px;
}

.live-gift-send-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.live-gift-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.live-gift-send-btn.loading {
  opacity: 0.7;
  cursor: wait;
}

/* Responsive */
@media (max-width: 480px) {
  .live-gift-modal {
    padding: 16px;
    max-width: 96%;
    max-height: 90vh;
  }
  
  .free-emojis-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  
  .free-emoji-item {
    padding: 6px 2px;
  }
  
  .free-emoji-item .emoji-icon {
    font-size: 1.3rem;
  }
  
  .live-gifts-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  .live-gift-item {
    padding: 8px 4px;
  }
  
  .live-gift-item .gift-emoji {
    font-size: 1.5rem;
  }
  
  .live-gift-item .gift-name {
    font-size: 0.55rem;
  }
  
  .live-gift-title {
    font-size: 1rem;
  }
  
  .live-gift-send-btn {
    font-size: 0.85rem;
    padding: 12px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }

/* ============================================
   STREAM REQUESTS - BEAUTIFUL DESIGN
   ============================================ */

/* Live Requests Container */
.live-requests {
  position: absolute;
  right: 16px;
  top: 70px;
  width: 220px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  z-index: 10;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

/* Header */
.live-requests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.live-requests-header span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-requests-header span::before {
  content: '📋';
  font-size: 1rem;
}

.live-requests-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.live-requests-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Requests List */
.live-requests-list {
  overflow-y: auto;
  padding: 8px 10px;
  flex: 1;
  max-height: 300px;
}

.live-requests-list.collapsed {
  max-height: 0;
  padding: 0 10px;
  overflow: hidden;
}

/* Scrollbar */
.live-requests-list::-webkit-scrollbar {
  width: 3px;
}

.live-requests-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.live-requests-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* Individual Request Item */
.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
  gap: 8px;
}

.request-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.request-item .request-name {
  font-size: 0.78rem;
  color: #fff;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-item .request-coins-badge {
  font-size: 0.7rem;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.15);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.request-item .request-coins-badge::before {
  content: '🪙';
  font-size: 0.6rem;
}

.request-pay-btn {
  background: linear-gradient(135deg, #FF6B6B, #FF4757);
  border: none;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.request-pay-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.request-pay-btn:active {
  transform: scale(0.95);
}

/* Empty state */
.request-empty {
  text-align: center;
  padding: 20px 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* ============================================
   STREAM REQUESTS - GO LIVE MODAL
   ============================================ */

.stream-requests-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.stream-requests-list .request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border-alpha);
  gap: 10px;
}

.stream-requests-list .request-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.stream-requests-list .request-info input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 0.85rem;
}

.stream-requests-list .request-info input.request-name {
  flex: 1;
  min-width: 100px;
}

.stream-requests-list .request-info input.request-coins {
  width: 70px;
}

.stream-requests-list .request-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stream-requests-list .request-actions .toggle-item {
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stream-requests-list .request-actions .btn-ghost.small {
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 6px;
  background: var(--danger);
  color: white;
  border: none;
  cursor: pointer;
}

.stream-requests-list .request-actions .btn-ghost.small:hover {
  background: var(--danger-hover);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes requestSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.request-item {
  animation: requestSlideIn 0.3s ease forwards;
}

.request-item:nth-child(1) { animation-delay: 0.05s; }
.request-item:nth-child(2) { animation-delay: 0.10s; }
.request-item:nth-child(3) { animation-delay: 0.15s; }
.request-item:nth-child(4) { animation-delay: 0.20s; }
.request-item:nth-child(5) { animation-delay: 0.25s; }
.request-item:nth-child(6) { animation-delay: 0.30s; }
.request-item:nth-child(7) { animation-delay: 0.35s; }
.request-item:nth-child(8) { animation-delay: 0.40s; }
.request-item:nth-child(9) { animation-delay: 0.45s; }
.request-item:nth-child(10) { animation-delay: 0.50s; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .live-requests {
    right: 8px;
    top: 60px;
    width: 180px;
    max-height: 350px;
  }
  
  .live-requests-header span {
    font-size: 0.75rem;
  }
  
  .request-item {
    padding: 6px 10px;
  }
  
  .request-item .request-name {
    font-size: 0.7rem;
  }
  
  .request-item .request-coins-badge {
    font-size: 0.6rem;
    padding: 1px 8px;
  }
  
  .request-pay-btn {
    font-size: 0.6rem;
    padding: 3px 10px;
  }
}

@media (max-width: 480px) {
  .live-requests {
    right: 4px;
    top: 55px;
    width: 160px;
    max-height: 300px;
  }
  
  .live-requests-header {
    padding: 8px 12px;
  }
  
  .live-requests-header span {
    font-size: 0.65rem;
  }
  
  .request-item {
    padding: 4px 8px;
    margin-bottom: 4px;
  }
  
  .request-item .request-name {
    font-size: 0.6rem;
  }
  
  .request-item .request-coins-badge {
    font-size: 0.5rem;
    padding: 1px 6px;
  }
  
  .request-pay-btn {
    font-size: 0.5rem;
    padding: 2px 8px;
  }
}

/* ============================================
   ADD REQUEST BUTTON
   ============================================ */

.btn-ghost.small {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-ghost.small:hover {
  background: var(--primary-alpha);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   PULL CLOTHE SETTINGS
   ============================================ */

.pull-clothe-settings {
  padding: 12px;
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 8px;
}

.pull-clothe-settings .field-group {
  margin-bottom: 10px;
}

.pull-clothe-settings .field-group:last-child {
  margin-bottom: 0;
}

.pull-clothe-settings label {
  font-size: 0.8rem;
  color: var(--text2);
  display: block;
  margin-bottom: 4px;
}

.pull-clothe-settings input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.pull-clothe-settings .note {
  font-size: 0.7rem;
  color: var(--text2);
  margin-top: 8px;
  font-style: italic;
}

/* Toggle item for settings */
.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.toggle-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.toggle-item.small {
  font-size: 0.75rem;
}

.toggle-item.small input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* ============================================
   PULL CLOTHE MODAL - FIXED
   ============================================ */

.pull-clothe-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.pull-clothe-overlay.hidden {
  display: none !important;
}

.pull-clothe-content {
  background: var(--bg);
  border-radius: 24px;
  padding: 32px;
  max-width: 420px;
  width: 92%;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s ease;
}

.pull-clothe-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounce 1s ease infinite;
}

.pull-clothe-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: 'Syne', sans-serif;
}

.pull-clothe-content p {
  font-size: 1rem;
  color: var(--text2);
  margin-bottom: 12px;
}

.pull-clothe-content p strong {
  color: #FFD700;
  font-size: 1.3rem;
}

.pull-clothe-balance {
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pull-clothe-balance span {
  font-size: 0.9rem;
  color: var(--text2);
}

.pull-clothe-balance strong {
  color: #FFD700;
  font-size: 1.1rem;
}

.pull-clothe-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.pull-clothe-btns .btn-primary {
  background: linear-gradient(135deg, #FF6B6B, #FF4757);
  border: none;
  padding: 14px 36px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.pull-clothe-btns .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.pull-clothe-btns .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pull-clothe-btns .btn-ghost {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 14px 36px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.pull-clothe-btns .btn-ghost:hover {
  background: var(--border);
}

.pull-clothe-note {
  font-size: 0.75rem;
  color: var(--text2);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-alpha);
}

.pull-clothe-note strong {
  color: var(--primary);
}

/* Status messages */
.pull-clothe-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 8px;
  display: none;
}

.pull-clothe-status.success {
  display: inline-block;
  color: var(--success);
  background: var(--success-alpha);
}

.pull-clothe-status.error {
  display: inline-block;
  color: var(--danger);
  background: var(--danger-alpha);
}

/* ============================================
   LIVE ROOM - STREAM REQUESTS
   ============================================ */

.live-requests {
  position: absolute;
  right: 16px;
  top: 70px;
  width: 220px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  z-index: 10;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.live-requests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.live-requests-header span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-requests-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.live-requests-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.live-requests-list {
  overflow-y: auto;
  padding: 8px 10px;
  flex: 1;
  max-height: 320px;
}

.live-requests-list.collapsed {
  max-height: 0;
  padding: 0 10px;
  overflow: hidden;
}

.live-requests-list::-webkit-scrollbar {
  width: 3px;
}
.live-requests-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.live-requests-list::-webkit-scrollbar-thumb {
  background: #FF6B6B;
  border-radius: 10px;
}

.request-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 14px !important;
  margin-bottom: 6px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  transition: all 0.3s ease !important;
  gap: 10px !important;
  animation: requestSlideIn 0.3s ease forwards !important;
  min-height: 44px !important;
}

.request-item:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateX(4px) !important;
}

.request-item .request-name {
  font-size: 0.8rem !important;
  color: #fff !important;
  font-weight: 500 !important;
  flex: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-family: 'DM Sans', sans-serif !important;
}

.request-item .request-coins-badge {
  font-size: 0.7rem !important;
  color: #FFD700 !important;
  background: rgba(255, 215, 0, 0.15) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid rgba(255, 215, 0, 0.1) !important;
}

.request-item .request-coins-badge::before {
  content: '🪙';
  font-size: 0.6rem;
}

.request-pay-btn {
  background: linear-gradient(135deg, #FF6B6B, #FF4757) !important;
  border: none !important;
  color: white !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3) !important;
}

.request-pay-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5) !important;
}

.request-pay-btn:active {
  transform: scale(0.95) !important;
}

.request-empty {
  text-align: center;
  padding: 20px 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

@keyframes requestSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.request-item:nth-child(1) { animation-delay: 0.05s; }
.request-item:nth-child(2) { animation-delay: 0.10s; }
.request-item:nth-child(3) { animation-delay: 0.15s; }
.request-item:nth-child(4) { animation-delay: 0.20s; }
.request-item:nth-child(5) { animation-delay: 0.25s; }
.request-item:nth-child(6) { animation-delay: 0.30s; }
.request-item:nth-child(7) { animation-delay: 0.35s; }
.request-item:nth-child(8) { animation-delay: 0.40s; }
.request-item:nth-child(9) { animation-delay: 0.45s; }
.request-item:nth-child(10) { animation-delay: 0.50s; }
/* ============================================
   STREAM CARD - IMPROVED
   ============================================ */

.stream-card {
  background: var(--bg2);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.stream-card:hover:not(.offline) {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.stream-card.offline {
  opacity: 0.6;
  cursor: default;
}

.stream-thumb {
  position: relative;
  height: 180px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stream-thumb-emoji {
  font-size: 3rem;
  opacity: 0.5;
}

.stream-thumb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}

.stream-live-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FF0000;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulseLive 1.5s ease infinite;
}

.stream-offline-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(100, 100, 100, 0.9);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stream-viewers {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.stream-gifts-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #FFD700;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stream-info {
  padding: 12px 15px;
}

.stream-host-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.stream-host-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.stream-host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-host-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.stream-cat {
  font-size: 0.7rem;
  color: var(--text2);
}

.stream-title {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px 12px;
  border-top: 1px solid var(--border-alpha);
}

.stream-gift-count {
  font-size: 0.75rem;
  color: var(--text2);
}

.stream-follow-btn {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.stream-follow-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.stream-follow-btn.following {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.stream-follow-btn.following:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
/* ============================================
   WEBRTC STREAMING WIDGET
   ============================================ */

.webrtc-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  max-width: 90vw;
  background: var(--bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 9999;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.webrtc-widget.hidden {
  display: none !important;
}

.webrtc-container {
  display: flex;
  flex-direction: column;
}

.webrtc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.webrtc-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.webrtc-close {
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

.webrtc-close:hover { color: var(--danger); }

.webrtc-body { padding: 16px; }

.webrtc-video-container {
  position: relative;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  min-height: 180px;
}

.webrtc-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webrtc-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.webrtc-placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.webrtc-live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FF0000;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  display: none;
}

.webrtc-live-badge.active { display: block; }

.webrtc-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.webrtc-controls-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.webrtc-controls-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 0.85rem;
  min-width: 80px;
}

.webrtc-controls-row input:focus {
  outline: none;
  border-color: var(--primary);
}

.webrtc-controls-row select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 0.85rem;
  min-width: 80px;
}

.webrtc-stats {
  font-size: 0.8rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.webrtc-dot {
  width: 8px;
  height: 8px;
  background: #FF0000;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.webrtc-buttons {
  display: flex;
  gap: 6px;
}

.webrtc-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.webrtc-btn:active { transform: scale(0.95); }

.webrtc-btn-start {
  background: linear-gradient(135deg, #FF0000, #FF4757);
  color: #fff;
}

.webrtc-btn-start:hover { box-shadow: 0 4px 15px rgba(255,0,0,0.3); }

.webrtc-btn-stop {
  background: #dc3545;
  color: #fff;
}

.webrtc-btn-stop:hover { background: #c82333; }

.webrtc-btn-camera {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
}

.webrtc-btn-camera:hover { border-color: var(--primary); }

.webrtc-btn-copy {
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
}

.webrtc-btn-copy:hover { opacity: 0.8; }

.webrtc-share-row input {
  flex: 1;
  font-size: 0.7rem;
  color: var(--text2);
}

/* ============================================
   VIEWER WIDGET
   ============================================ */

.webrtc-viewer-widget {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.webrtc-viewer-widget.hidden { display: none !important; }

.webrtc-viewer-container {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  margin: 20px;
}

.webrtc-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.webrtc-viewer-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.webrtc-viewer-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
}

.webrtc-viewer-close:hover { color: #fff; }

.webrtc-viewer-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.webrtc-viewer-video {
  flex: 1;
  background: #111;
  position: relative;
  min-height: 300px;
}

.webrtc-viewer-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.webrtc-viewer-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #666;
}

.webrtc-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #333;
  border-top-color: #FF6B6B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.webrtc-viewer-chat {
  width: 300px;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.05);
}

.webrtc-viewer-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-size: 0.85rem;
  max-height: 400px;
}

.webrtc-viewer-chat-messages .chat-msg {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex;
  gap: 8px;
}

.webrtc-viewer-chat-messages .chat-msg .name {
  color: #FFD700;
  font-weight: 600;
  white-space: nowrap;
}

.webrtc-viewer-chat-messages .chat-msg .text {
  color: #ddd;
  word-break: break-word;
}

.webrtc-viewer-chat-messages .chat-msg.gift .text { color: #FFD700; }
.webrtc-viewer-chat-messages .chat-msg.system { color: #00D4FF; font-style: italic; }

.webrtc-viewer-chat-input {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.webrtc-viewer-chat-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #333;
  border-radius: 20px;
  background: #222;
  color: #fff;
  font-size: 0.85rem;
}

.webrtc-viewer-chat-input input:focus {
  outline: none;
  border-color: #FF6B6B;
}

.webrtc-viewer-chat-input button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #FF6B6B;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.webrtc-viewer-chat-input .webrtc-gift-btn {
  background: #FFD700;
  color: #000;
}

/* Responsive */
@media (max-width: 768px) {
  .webrtc-widget {
    bottom: 70px;
    right: 10px;
    width: 340px;
  }
  
  .webrtc-viewer-body {
    flex-direction: column;
  }
  
  .webrtc-viewer-chat {
    width: 100%;
    height: 200px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.05);
  }
  
  .webrtc-viewer-container {
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .webrtc-widget {
    width: 300px;
    bottom: 60px;
    right: 5px;
  }
  
  .webrtc-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .webrtc-controls-row input,
  .webrtc-controls-row select {
    min-width: auto;
  }
  
  .webrtc-buttons {
    justify-content: center;
  }
