@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

:root {
  --base: #0F0F12;
  --base2: #16161B;
  --base3: #1E1E26;
  --base4: #252530;
  --primary: #7B3FF2;
  --primary-hover: #9055f5;
  --primary-glow: rgba(123, 63, 242, 0.35);
  --primary-dim: rgba(123, 63, 242, 0.12);
  --secondary: #00E5FF;
  --secondary-glow: rgba(0, 229, 255, 0.3);
  --secondary-dim: rgba(0, 229, 255, 0.08);
  --text: #E8E8F0;
  --text-muted: #7777A0;
  --text-dim: #4A4A6A;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(123, 63, 242, 0.35);
  --live-red: #FF3D5A;
  --success: #00E5A0;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--base4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── FONDO ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 15% -5%, rgba(123,63,242,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 105%, rgba(0,229,255,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(15,15,18,0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

/* Search bar */
.nav-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.nav-search input {
  width: 100%;
  background: var(--base3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s;
}

.nav-search input:focus {
  border-color: var(--primary);
  background: var(--base2);
}

.nav-search input::placeholder { color: var(--text-dim); }

.nav-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
  z-index: 300;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.search-results.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--text);
}

.search-result-item:hover { background: var(--base3); }

.nav-spacer { flex: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a:hover { color: var(--text); background: var(--border); }
.nav-links a.active { color: var(--primary); background: var(--primary-dim); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Notif bell */
.notif-btn {
  position: relative;
  background: var(--base3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.notif-btn:hover { color: var(--text); border-color: var(--border-hover); }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--live-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

/* User menu */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--base3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}

.user-menu-trigger:hover { border-color: var(--border-hover); }

.user-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.user-menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-menu-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 200px;
  overflow: hidden;
  display: none;
  z-index: 300;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.user-menu-dropdown.open { display: block; }

.user-menu-dropdown a,
.user-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  color: var(--text);
  background: var(--base3);
}

.user-menu-dropdown .menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* ── BOTONES ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn i { font-size: 1rem; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 24px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--primary-dim);
  color: var(--primary);
}

.btn-cyan {
  background: var(--secondary);
  color: var(--base);
  font-weight: 700;
  box-shadow: 0 0 16px var(--secondary-glow);
}
.btn-cyan:hover {
  box-shadow: 0 0 28px var(--secondary-glow);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(255,61,90,0.12);
  color: var(--live-red);
  border: 1px solid rgba(255,61,90,0.25);
}
.btn-danger:hover { background: rgba(255,61,90,0.22); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--base3); color: var(--text); }

.btn-sm { padding: 0.38rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-follow {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}
.btn-follow.following {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-follow.following:hover {
  background: rgba(255,61,90,0.1);
  color: var(--live-red);
  border-color: rgba(255,61,90,0.3);
}

/* ── CONTENEDOR ── */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── HERO ── */
.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-dim);
  border: 1px solid rgba(123,63,242,0.25);
  color: #a47ff5;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 460px;
  margin: 0 auto 2rem;
}

.hero-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-item .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .lbl { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.1rem; }

/* ── SECCIONES ── */
.section { padding: 2rem 0 3.5rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i { color: var(--primary); font-size: 1.2rem; }

/* ── LIVE BADGE ── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,61,90,0.12);
  border: 1px solid rgba(255,61,90,0.3);
  color: var(--live-red);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--live-red);
  border-radius: 50%;
  animation: livePulse 1s infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,61,90,0.5); }
  50% { box-shadow: 0 0 0 4px rgba(255,61,90,0); }
}

/* ── CATEGORY FILTER ── */
.category-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cat-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.cat-chip:hover { color: var(--text); border-color: var(--border-hover); }
.cat-chip.active {
  background: var(--primary-dim);
  border-color: rgba(123,63,242,0.4);
  color: #a47ff5;
}

/* ── STREAM CARDS ── */
.streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}

.stream-card {
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.stream-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(123,63,242,0.18);
}

.stream-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--base3);
  overflow: hidden;
}

.stream-thumb-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.stream-thumb-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(123,63,242,0.15) 0%,
    rgba(0,229,255,0.08) 100%);
}

.stream-live-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
}

.stream-viewers {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(0,0,0,0.72);
  color: #fff;
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stream-info { padding: 0.85rem 1rem; }

.stream-streamer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.stream-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.stream-avatar img { width: 100%; height: 100%; object-fit: cover; }

.stream-username {
  font-weight: 600;
  font-size: 0.875rem;
}

.stream-title-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}

.stream-category-tag {
  display: inline-flex;
  align-items: center;
  background: var(--secondary-dim);
  color: var(--secondary);
  padding: 0.13rem 0.55rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.empty-state p { font-size: 0.875rem; }

/* ── FORMULARIOS AUTH ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.auth-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.75rem; }

.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text);
  letter-spacing: 0.2px;
}

.form-input {
  width: 100%;
  background: var(--base3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
  background: var(--base2);
}

.form-input::placeholder { color: var(--text-dim); }
textarea.form-input { resize: vertical; min-height: 90px; }

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237777A0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.5rem;
}

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }

.form-error {
  background: rgba(255,61,90,0.08);
  border: 1px solid rgba(255,61,90,0.25);
  color: #ff7090;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.form-success {
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.25);
  color: var(--success);
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.875rem; }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── DASHBOARD ── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-h));
}

.sidebar {
  background: var(--base2);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.75rem;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.75rem 0.75rem 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.sidebar-link i { font-size: 1.1rem; flex-shrink: 0; }
.sidebar-link:hover { color: var(--text); background: var(--base3); }
.sidebar-link.active { color: var(--primary); background: var(--primary-dim); }

.dashboard-content {
  padding: 2rem;
  overflow-y: auto;
  min-width: 0;
}

/* ── CARDS ── */
.card {
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.card-title i { color: var(--primary); font-size: 1.1rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--border-hover); }

.stat-card .stat-icon {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label { color: var(--text-muted); font-size: 0.78rem; }

/* ── RTMP KEY ── */
.rtmp-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--base3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--secondary);
  word-break: break-all;
}

.rtmp-box span { flex: 1; }

.rtmp-info-box {
  background: var(--base3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 2;
}

.rtmp-info-box strong { color: var(--secondary); }

/* ── AVATAR UPLOAD ── */
.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid var(--border);
}

.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ── COLOR PICKER ── */
.color-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.color-swatch.selected,
.color-swatch:hover { border-color: #fff; transform: scale(1.15); }

/* ── SOCIAL LINKS ── */
.social-inputs { display: flex; flex-direction: column; gap: 0.75rem; }

.social-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-input-row .social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--base3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.65rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── WATCH PAGE ── */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.1rem;
  padding: 1.1rem;
  max-width: 1480px;
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-h));
}

/* ── CHAT ── */
.chat-panel {
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-h) - 2.2rem);
  position: sticky;
  top: calc(var(--nav-h) + 1.1rem);
}

.chat-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.chat-viewer-count {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chat-msg {
  font-size: 0.83rem;
  line-height: 1.45;
  word-break: break-word;
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius-xs);
  transition: background 0.1s;
}

.chat-msg:hover { background: rgba(255,255,255,0.03); }

.chat-msg .chat-user {
  font-weight: 700;
  margin-right: 0.35rem;
  cursor: pointer;
}

.chat-msg .chat-user:hover { text-decoration: underline; }

.chat-msg .chat-time {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 0.35rem;
}

.chat-system {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.2rem 0;
  font-style: italic;
}

.chat-input-area {
  padding: 0.65rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--base3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text-dim); }

/* ── PROFILE PAGE ── */
.profile-banner {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-dim), var(--secondary-dim));
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
}

.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  padding: 0 1.5rem;
  margin-top: -50px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--base);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-live-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid var(--live-red);
  animation: livePulse 1.5s infinite;
  display: none;
}

.profile-live-ring.active { display: block; }

.profile-info { flex: 1; padding-bottom: 0.5rem; min-width: 200px; }

.profile-username {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0.35rem 0 0.75rem;
  max-width: 500px;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-stat { text-align: center; }
.profile-stat .num { font-weight: 700; font-size: 1rem; }
.profile-stat .lbl { color: var(--text-muted); font-size: 0.75rem; }

.profile-actions { display: flex; gap: 0.5rem; align-items: flex-end; padding-bottom: 0.5rem; flex-wrap: wrap; }

.social-links-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: var(--base3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
}

.social-link:hover { color: var(--text); border-color: var(--border-hover); }
.social-link i { font-size: 0.95rem; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--base2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.2rem;
  font-size: 0.875rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-success { border-color: rgba(0,229,160,0.3); color: var(--success); }
.toast.toast-error { border-color: rgba(255,61,90,0.3); color: var(--live-red); }
.toast.toast-info { border-color: rgba(0,229,255,0.3); color: var(--secondary); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .watch-layout { grid-template-columns: 1fr; }
  .chat-panel { height: 450px; position: static; }
}

@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    z-index: 150;
    transition: left 0.3s;
    width: 240px;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 140;
    top: var(--nav-h);
  }
  .sidebar-overlay.open { display: block; }
}

@media (max-width: 640px) {
  .navbar { padding: 0 1rem; gap: 0.5rem; }
  .nav-search { display: none; }
  .nav-links { display: none; }
  .hero { padding: 3rem 0 2rem; }
  .hero h1 { font-size: 2rem; letter-spacing: -1px; }
  .streams-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stats-bar { gap: 1.5rem; }
  .profile-header { padding: 0 1rem; }
  .profile-avatar { width: 80px; height: 80px; font-size: 2rem; }
  .profile-username { font-size: 1.3rem; }
}

@media (max-width: 400px) {
  .streams-grid { grid-template-columns: 1fr; }
}