/* =============================================
   STARFA — Main Stylesheet
   ============================================= */

:root {
  --bg:          #0B1426;
  --bg2:         #0F1B35;
  --card:        #1E3A5F;
  --card-hover:  #1a3357;
  --blue:        #0EA5E9;
  --blue-bright: #38BDF8;
  --blue-dim:    #0369A1;
  --text:        #F0F9FF;
  --text-muted:  #7BBCD4;
  --border:      rgba(14,165,233,0.2);
  --live-red:    #EF4444;
  --twitch:      #9147FF;
  --youtube:     #FF0000;
  --tiktok:      #010101;
  --radius:      12px;
  --radius-lg:   20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,20,38,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: .9rem 2rem;
}
.nav-brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none;
}
.logo-wrap { display: flex; }
.logo-star {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #38BDF8, #0EA5E9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  border: 2px solid var(--blue);
  padding: 2px 8px;
  border-radius: 6px;
}
.logo-star.small { font-size: 1rem; padding: 1px 5px; }
.star-icon { font-size: .85em; }
.brand-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.brand-accent { color: var(--blue-bright); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
  letter-spacing: .5px;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue-bright); }
.nav-admin {
  background: var(--blue);
  color: var(--text) !important;
  padding: .4rem .9rem;
  border-radius: 6px;
  font-size: .82rem !important;
}
.nav-admin:hover { background: var(--blue-bright) !important; color: var(--bg) !important; }
.nav-status {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--blue-bright);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ── DOT LIVE ── */
.dot-live {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live-red);
  animation: pulse-red 1.5s ease-in-out infinite;
}
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(14,165,233,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,233,.07) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}
.hero-glow {
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(14,165,233,.18) 0%, transparent 70%);
  filter: blur(40px);
}
.hero-content {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(14,165,233,.1);
  border: 1px solid var(--border);
  color: var(--blue-bright);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: .4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}
.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}
.gradient-text {
  background: linear-gradient(90deg, #38BDF8, #0EA5E9, #7DD3FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #0EA5E9, #38BDF8);
  color: #0B1426;
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: .5px;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(14,165,233,.4);
}
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  padding: .75rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--blue); background: rgba(14,165,233,.07); }

/* HERO STATS */
.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-val {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-bright);
}
.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── FILTER BAR ── */
.filter-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 62px;
  z-index: 80;
}
.filter-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.filter-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; letter-spacing: 1px; }
.filter-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: .35rem .8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(14,165,233,.12);
  border-color: var(--blue);
  color: var(--blue-bright);
}
.filter-search { margin-left: auto; }
.filter-search input {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .38rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  outline: none;
  width: 220px;
  transition: border-color .2s;
}
.filter-search input:focus { border-color: var(--blue); }
.filter-search input::placeholder { color: var(--text-muted); }

/* ── SECTIONS ── */
.lives-section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.section-header { margin-bottom: 2rem; }
.section-header h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.section-sub { font-size: .85rem; color: var(--text-muted); margin-top: .3rem; }

/* ── LIVE CARDS ── */
.lives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.live-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  cursor: pointer;
  position: relative;
}
.live-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: 0 12px 40px rgba(14,165,233,.2);
}
.live-card.is-live::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, rgba(14,165,233,.5), transparent, rgba(56,189,248,.3));
  z-index: 0;
  animation: border-pulse 3s ease-in-out infinite;
}
@keyframes border-pulse {
  0%,100% { opacity: .5; }
  50% { opacity: 1; }
}
.live-card > * { position: relative; z-index: 1; }

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg);
  overflow: hidden;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.live-card:hover .card-thumb img { transform: scale(1.05); }

.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--bg), var(--bg2));
}

.badge-platform {
  position: absolute;
  top: .6rem; left: .6rem;
  padding: .2rem .6rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge-twitch  { background: var(--twitch); }
.badge-youtube { background: var(--youtube); }
.badge-tiktok  { background: linear-gradient(135deg, #69C9D0, #EE1D52); }

.badge-live-pill {
  position: absolute;
  top: .6rem; right: .6rem;
  background: var(--live-red);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: .2rem .6rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.badge-live-pill::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: blink .8s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.viewers-badge {
  position: absolute;
  bottom: .6rem; right: .6rem;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .72rem;
  font-weight: 500;
  padding: .2rem .5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.card-body { padding: 1rem; }
.card-streamer {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  overflow: hidden;
}
.streamer-info { flex: 1; min-width: 0; }
.streamer-name {
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.streamer-handle {
  font-size: .75rem;
  color: var(--text-muted);
}
.card-title {
  font-size: .85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .75rem;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.watch-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(14,165,233,.15);
  border: 1px solid var(--blue);
  color: var(--blue-bright);
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .8rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s;
  letter-spacing: .5px;
}
.watch-btn:hover { background: rgba(14,165,233,.3); }
.card-duration {
  font-size: .75rem;
  color: var(--text-muted);
}

/* OFFLINE CARDS */
.offline-grid .live-card {
  opacity: .55;
  filter: grayscale(.4);
  transition: opacity .2s, filter .2s, transform .2s;
}
.offline-grid .live-card:hover { opacity: 1; filter: none; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 1.1rem; }
.empty-state span { font-size: .85rem; opacity: .6; }

/* ── ABOUT SECTION ── */
.about-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0;
}
.about-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.badge-small {
  display: inline-block;
  background: rgba(14,165,233,.1);
  border: 1px solid var(--border);
  color: var(--blue);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: .3rem .8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.about-text h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.about-text p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.server-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 2rem;
}
.info-card {
  background: rgba(14,165,233,.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.info-icon { font-size: 1.2rem; }
.info-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.info-val { font-weight: 600; font-size: .9rem; }

.about-visual { display: flex; justify-content: center; }
.glow-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 0 60px rgba(14,165,233,.12);
}
.server-status-live {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 600;
  color: #4ADE80;
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 10px; height: 10px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
  50% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
}
.connect-label { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; letter-spacing: 1px; }
.connect-ip {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .8rem 1rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: var(--blue-bright);
  letter-spacing: 1px;
}
.version-tag {
  margin-top: 1rem;
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 1px;
}

/* ── FOOTER ── */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: .82rem; transition: color .2s; }
.footer-links a:hover { color: var(--blue-bright); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .lives-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
  .filter-search { width: 100%; }
  .filter-search input { width: 100%; }
}
