/* u2gay — dark + neon cyberpunk theme inspired by LGBTQ+ flag colors */
:root {
  --bg: #0a0a0f;
  --bg-elev: #14141c;
  --bg-elev-2: #1d1d28;
  --border: #2a2a38;
  --text: #e8e8f0;
  --text-dim: #8b8ba0;
  --text-muted: #5a5a72;
  --neon-pink: #ff00ff;
  --neon-magenta: #ff1493;
  --neon-cyan: #00ffff;
  --neon-purple: #b026ff;
  --accent: #ff1493;
  --accent-hover: #ff3da3;
  --success: #00d97e;
  --danger: #ff4757;
  --warning: #ffa502;
  --gradient-neon: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-magenta) 50%, var(--neon-cyan) 100%);
  --gradient-purple: linear-gradient(135deg, #672783 0%, #b026ff 100%);
  --shadow-glow: 0 0 20px rgba(255, 20, 147, 0.4);
  --shadow-cyan: 0 0 20px rgba(0, 255, 255, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* === Topbar === */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  height: 64px; padding: 0 24px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo { height: 36px; filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.4)); }
.brand-name {
  font-size: 22px; font-weight: 900; letter-spacing: -0.5px;
  background: var(--gradient-neon);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav { display: flex; gap: 4px; margin-left: 16px; flex: 1; }
.nav-link {
  padding: 8px 16px; border-radius: 8px;
  color: var(--text-dim); text-decoration: none; font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-elev); }
.nav-link.router-link-active { color: var(--neon-pink); background: rgba(255, 20, 147, 0.1); }
.user-zone { display: flex; align-items: center; gap: 12px; }
.coins {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.coin-icon { color: var(--warning); }
.coin-amt { font-variant-numeric: tabular-nums; }

/* === Buttons === */
.btn {
  padding: 8px 18px; border-radius: 8px; border: none;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: var(--gradient-neon);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(255, 20, 147, 0.6); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--neon-pink); color: var(--neon-pink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #0a0a0f; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* === Content === */
.content { flex: 1; padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* === Avatar === */
.avatar-menu { position: relative; }
.avatar-menu img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer;
}
.caret { font-size: 10px; margin-left: 4px; color: var(--text-muted); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 12px; min-width: 200px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden; padding: 6px;
}
.menu-item {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.menu-item:hover { background: var(--bg-elev); }
.menu-item.danger { color: var(--danger); }

/* === Grid === */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* === Cards === */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s;
}
.card:hover { border-color: var(--neon-pink); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.card-img {
  aspect-ratio: 9/16; background: var(--bg-elev-2);
  background-size: cover; background-position: center;
  position: relative;
}
.card-img-live {
  position: absolute; top: 12px; left: 12px;
  background: var(--danger); color: #fff; padding: 4px 10px;
  border-radius: 6px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.card-img-viewers {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  color: #fff; padding: 4px 10px;
  border-radius: 6px; font-size: 12px; font-weight: 600;
}
.card-body { padding: 14px; }
.card-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.card-subtitle { color: var(--text-dim); font-size: 13px; display: flex; align-items: center; gap: 6px; }

/* === Forms === */
.form { max-width: 420px; margin: 40px auto; padding: 32px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; }
.form h1 { font-size: 28px; margin-bottom: 8px; background: var(--gradient-neon); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.form-subtitle { color: var(--text-dim); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 15px;
  transition: all 0.2s;
}
.form-input:focus { outline: none; border-color: var(--neon-pink); box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.15); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.form-link { color: var(--neon-pink); text-decoration: none; font-size: 13px; }
.form-link:hover { text-decoration: underline; }
.form-actions { margin-top: 20px; }

/* === Wallet === */
.wallet-balance {
  text-align: center; padding: 40px;
  background: var(--gradient-purple);
  border-radius: 16px; margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(176, 38, 255, 0.3);
}
.wallet-balance .amt {
  font-size: 56px; font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #ffd6f0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.wallet-balance .lbl { color: rgba(255,255,255,0.85); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* === Stream player === */
.stream-page { display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
@media (max-width: 1024px) { .stream-page { grid-template-columns: 1fr; } }
.stream-player { aspect-ratio: 9/16; max-height: 80vh; background: #000; border-radius: 14px; overflow: hidden; position: relative; }
.stream-player video { width: 100%; height: 100%; object-fit: cover; }
.stream-info { padding: 16px 0; }
.stream-info h1 { font-size: 22px; margin-bottom: 8px; }
.stream-info .meta { color: var(--text-dim); display: flex; gap: 16px; font-size: 14px; }
.stream-chat { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; height: 80vh; max-height: 700px; }
.chat-header { padding: 14px; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-msg { font-size: 13px; padding: 4px 0; word-break: break-word; }
.chat-msg .user { font-weight: 700; color: var(--neon-cyan); margin-right: 6px; }
.chat-msg.gift { background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent); padding: 6px 10px; border-radius: 6px; }
.chat-msg.system { color: var(--text-muted); font-style: italic; }
.chat-input { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input input { flex: 1; }

/* === Gifts === */
.gifts-bar { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.gift-btn {
  flex-shrink: 0; width: 60px; height: 60px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; font-size: 28px;
  transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gift-btn:hover { border-color: var(--neon-pink); transform: translateY(-2px); }
.gift-btn .lbl { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

/* === Toasts === */
.toasts {
  position: fixed; top: 80px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 999;
}
.toast {
  padding: 12px 18px; border-radius: 10px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  min-width: 250px; max-width: 400px;
  animation: slideIn 0.3s ease;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.warning { border-color: var(--warning); color: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === Loading === */
.loading { text-align: center; padding: 60px; color: var(--text-dim); }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--neon-pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Section title === */
.section-title { font-size: 22px; font-weight: 800; margin: 24px 0 16px; }
.section-title .accent { background: var(--gradient-neon); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* === Tabs === */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 16px; cursor: pointer;
  color: var(--text-dim); font-weight: 500;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--neon-pink); border-bottom-color: var(--neon-pink); }

/* === Responsive === */
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; height: 56px; }
  .nav { display: none; }
  .content { padding: 16px; }
  .form { padding: 20px; }
}

/* === Profile === */
.profile-header { display: flex; gap: 24px; align-items: center; padding: 24px; background: var(--bg-elev); border-radius: 16px; margin-bottom: 24px; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--neon-pink); box-shadow: var(--shadow-glow); }
.profile-info h1 { font-size: 28px; margin-bottom: 4px; }
.profile-stats { display: flex; gap: 24px; margin-top: 12px; color: var(--text-dim); }
.profile-stat strong { color: var(--text); font-size: 18px; }

/* === Discover filters === */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 14px; border-radius: 20px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; font-size: 13px;
}
.filter-chip.active { background: var(--neon-pink); color: #fff; border-color: var(--neon-pink); }

/* === PK arena === */
.pk-arena { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 24px; }
.pk-side { aspect-ratio: 9/16; max-height: 60vh; background: var(--bg-elev); border-radius: 12px; overflow: hidden; }
.pk-vs { font-size: 48px; font-weight: 900; background: var(--gradient-neon); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pk-bars { display: flex; flex-direction: column; gap: 8px; }
.pk-bar { height: 16px; background: var(--bg-elev-2); border-radius: 8px; overflow: hidden; }
.pk-bar-fill { height: 100%; background: var(--gradient-neon); transition: width 0.5s; }

/* === Admin === */
.admin-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.admin-sidebar { background: var(--bg-elev); border-radius: 14px; padding: 12px; height: fit-content; }
.admin-content { background: var(--bg-elev); border-radius: 14px; padding: 24px; }
.admin-stat { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.admin-stat:last-child { border-bottom: none; }

/* Empty state */
.empty { text-align: center; padding: 60px 24px; color: var(--text-dim); }
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
