* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-3: #141414;
  --bg-4: #1f1f1f;
  --border: #2a2a2a;
  --border-light: #3a3a3a;
  --text: #ffffff;
  --text-dim: #999999;
  --text-muted: #666666;
  --discord: #5865F2;
  --discord-hover: #4752C4;
  --accent: #e63946;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* PIN OVERLAY */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.pin-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pin-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: fadeInUp 0.5s ease;
}
.pin-logo {
  height: 50px;
  margin-bottom: 20px;
  filter: invert(1) brightness(1.2);
}
.pin-box h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.pin-box p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}
.pin-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.pin-input:focus {
  border-color: var(--text-dim);
}
.pin-btn {
  width: 100%;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.pin-btn:hover {
  background: var(--text-dim);
  transform: translateY(-1px);
}
.pin-error {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}
.pin-error.visible {
  opacity: 1;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.pin-box.shake {
  animation: shake 0.4s ease;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo-wrap:hover { transform: scale(1.03); }
.header-logo {
  height: 40px;
  width: auto;
  transition: filter 0.3s ease;
}
.logo-wrap:hover .header-logo { filter: drop-shadow(0 0 8px rgba(255,255,255,0.3)); }
.logo-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text);
}
nav { display: flex; gap: 10px; align-items: center; }
nav button {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
nav button:hover { color: var(--text); background: var(--bg-3); transform: translateY(-1px); }
nav button.active {
  color: var(--text);
  background: var(--bg-3);
  border-color: var(--border-light);
}

.discord-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--discord);
  color: white;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.25s ease;
  margin-left: 8px;
}
.discord-btn:hover {
  background: var(--discord-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

/* MAIN & VIEWS */
main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}
.view { display: none; }
.view.active { display: block; animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HERO */
.hero { text-align: center; padding: 60px 20px 50px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}
.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #666666 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-dim); font-size: 17px; max-width: 600px; margin: 0 auto; line-height: 1.6; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.stat { text-align: center; transition: transform 0.3s ease; }
.stat:hover { transform: scale(1.05); }
.stat-num { font-size: 32px; font-weight: 900; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* CATEGORY TABS */
.category-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
  padding: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
}
.cat-btn {
  background: transparent; border: 1px solid transparent; color: var(--text-dim);
  padding: 10px 18px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.25s ease; white-space: nowrap;
}
.cat-btn:hover { color: var(--text); background: var(--bg-3); transform: translateY(-1px); }
.cat-btn.active { background: var(--text); color: var(--bg); box-shadow: 0 4px 12px rgba(255,255,255,0.1); }

/* CHANNEL GRID */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.channel-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 160px; position: relative; overflow: hidden;
}
.channel-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.08), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
}
.channel-card:hover {
  transform: translateY(-8px) scale(1.02); 
  border-color: var(--text-dim);
  background: var(--bg-3);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.channel-card:hover::before { opacity: 1; }
.channel-logo {
  height: 55px; width: auto; max-width: 140px; object-fit: contain;
  position: relative; z-index: 1; transition: all 0.3s ease;
  filter: grayscale(30%);
}
.channel-card:hover .channel-logo { transform: scale(1.1); filter: grayscale(0%); }
.channel-name {
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  text-align: center; position: relative; z-index: 1; transition: color 0.3s ease;
}
.channel-card:hover .channel-name { color: var(--text); }
.channel-country {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* PLAYER VIEW & LAYOUT */
.player-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; padding: 20px 0; }
.back-btn {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; transition: all 0.25s ease;
}
.back-btn:hover { background: var(--bg-3); border-color: var(--border-light); transform: translateX(-3px); }
.player-title { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; animation: fadeInUp 0.4s ease; }
.player-title img {
  height: 44px; width: auto; max-width: 160px; object-fit: contain;
  background: var(--bg-3); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
}
.player-title h2 { font-size: 24px; font-weight: 800; }

.player-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
.player-main { width: 100%; }

.player-controls {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; align-items: center;
  padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  animation: fadeInUp 0.5s ease 0.1s backwards;
}
.source-selector {
  display: flex; align-items: center; gap: 6px; margin-left: auto;
  background: var(--bg); border: 1px solid var(--border); padding: 4px; border-radius: 8px;
}
.source-label { font-size: 12px; color: var(--text-muted); padding: 0 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.source-btn {
  background: transparent; color: var(--text-dim); border: none; padding: 8px 16px;
  border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s ease;
}
.source-btn:hover { color: var(--text); background: var(--bg-3); }
.source-btn.active { background: var(--text); color: var(--bg); transform: scale(1.05); }

/* IFRAME & CENTER PLAY BUTTON */
.iframe-wrapper {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: fadeInUp 0.5s ease 0.2s backwards;
}
.iframe-wrapper iframe { 
  width: 100%; height: 100%; border: none; display: block; background: #000; 
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.center-play-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}
.center-play-btn:hover {
  background: radial-gradient(circle at center, #222222 0%, #0a0a0a 100%);
  border-color: var(--text-dim);
}
.center-play-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  z-index: -1;
}
.play-icon-svg {
  width: 72px;
  height: 72px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.center-play-btn:hover .play-icon-svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 15px rgba(255,255,255,0.3));
}
.center-play-btn span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text);
  transition: letter-spacing 0.3s ease;
}
.center-play-btn:hover span {
  letter-spacing: 4px;
}

/* CHAT SIDEBAR */
.chat-sidebar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 500px;
  max-height: 800px;
  animation: fadeInUp 0.5s ease 0.3s backwards;
}
.chat-header-small {
  padding: 14px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-small::before {
  content: '';
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
}
.chat-container {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #000;
}
.chat-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 500px;
  border: none !important;
}

/* DMCA */
.dmca-content {
  max-width: 850px; margin: 40px auto 0; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 48px;
  animation: fadeInUp 0.5s ease;
}
.dmca-content h1 { font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.dmca-content .subtitle { color: var(--text-dim); margin-bottom: 36px; font-size: 15px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.dmca-content h3 {
  font-size: 18px; margin: 32px 0 14px; color: var(--text); font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.dmca-content h3::before { content: ''; width: 4px; height: 20px; background: var(--text); border-radius: 2px; }
.dmca-content p { color: #b0b0b0; line-height: 1.8; margin-bottom: 14px; font-size: 15px; }
.dmca-content a {
  color: var(--text); text-decoration: none; font-weight: 700; padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 8px; transition: all 0.2s ease; display: inline-block; margin-top: 8px;
}
.dmca-content a:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }

footer {
  border-top: 1px solid var(--border); padding: 32px 24px; text-align: center;
  color: var(--text-muted); font-size: 13px; margin-top: 80px; background: var(--bg-2);
}

/* MOBILE */
@media (max-width: 1024px) {
  .player-layout { grid-template-columns: 1fr; }
  .chat-sidebar { height: 500px; max-height: none; }
}
@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; }
  .header-logo { height: 34px; }
  .logo-text { font-size: 18px; letter-spacing: 1px; }
  nav button { padding: 8px 12px; font-size: 13px; }
  .discord-btn span { display: none; }
  .discord-btn { padding: 9px; margin-left: 4px; }
  main { padding: 0 16px 60px; }
  .hero { padding: 40px 10px 30px; }
  .hero p { font-size: 15px; }
  .hero-stats { gap: 24px; margin-top: 30px; }
  .stat-num { font-size: 24px; }
  .category-tabs { padding: 6px; gap: 4px; }
  .cat-btn { padding: 8px 12px; font-size: 12px; }
  .channels-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .channel-card { padding: 18px 10px; min-height: 130px; }
  .channel-logo { height: 42px; max-width: 110px; }
  .channel-name { font-size: 11px; }
  .player-header { padding: 12px 0; gap: 10px; }
  .player-title img { height: 36px; padding: 4px 8px; }
  .player-title h2 { font-size: 18px; }
  .player-controls { padding: 12px; gap: 10px; }
  .source-selector { margin-left: 0; width: 100%; justify-content: center; }
  .source-btn { padding: 8px 12px; font-size: 12px; flex: 1; text-align: center; }
  .iframe-wrapper { border-radius: 8px; }
  .dmca-content { padding: 24px; margin-top: 20px; }
  .dmca-content h1 { font-size: 28px; }
  .back-btn { padding: 9px 14px; font-size: 13px; }
  .play-icon-svg { width: 56px; height: 56px; }
  .center-play-btn span { font-size: 15px; letter-spacing: 2px; }
  .chat-sidebar { height: 450px; }
  .pin-box { padding: 30px 20px; }
  .pin-input { font-size: 20px; letter-spacing: 6px; }
}
@media (max-width: 400px) {
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-text { display: none; }
}