* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--goat-bg);
  color: var(--goat-text);
  font-family: var(--font-primary);
  padding-top: var(--nav-height);
}

.hidden {
  display: none !important;
}

.canais-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px 64px;
}

.canais-hero {
  position: relative;
  overflow: hidden;
  margin: 24px 0 40px;
  padding: 42px 36px;
  border: 1px solid var(--goat-border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 215, 0, 0.14), transparent 45%),
    linear-gradient(135deg, rgba(20, 20, 20, 0.94), rgba(8, 8, 8, 0.96));
}

.canais-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 120%, rgba(255, 215, 0, 0.08), transparent 55%);
  pointer-events: none;
}

.canais-hero-copy {
  position: relative;
}

.canais-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--goat-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.canais-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

.canais-hero-copy p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--goat-muted);
  font-size: 0.95rem;
}

.canais-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.canais-section-head h2 {
  margin-top: 6px;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
}

.canais-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--goat-border);
  border-radius: 999px;
  color: var(--goat-gold);
  background: rgba(255, 215, 0, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.canais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.channel-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #141414;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: var(--goat-border);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.channel-card-logo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0d0d0d;
}

.channel-card-logo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(200, 20, 20, 0.92);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.channel-card-logo-wrap .channel-live-badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

.channel-live-badge i {
  font-size: 6px;
}

.channel-card-info {
  padding: 10px 12px 12px;
}

.channel-card-info strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-card-info small {
  display: block;
  margin-top: 3px;
  color: var(--goat-muted);
  font-weight: 700;
  font-size: 0.76rem;
}

.canais-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 34px 18px;
  border: 1px dashed rgba(255, 215, 0, 0.22);
  border-radius: 20px;
  color: var(--goat-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.canais-empty i {
  color: var(--goat-gold);
  font-size: 2rem;
}

.canais-empty h3 {
  margin: 16px 0 8px;
  color: var(--goat-text);
  font-size: 1.5rem;
}

/* ---- PLAYER MODAL ---- */
.channel-player-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.channel-player-modal.open {
  display: flex;
}

.channel-player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(6px);
}

.channel-player-box {
  position: relative;
  width: min(1100px, 100%);
  overflow: hidden;
  border: 1px solid var(--goat-border);
  border-radius: 16px;
  background: #0a0a0a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.channel-player-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-player-head strong {
  flex: 1;
  overflow: hidden;
  color: #fff;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#channel-player-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.channel-player-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.channel-player-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 6000;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--goat-text);
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.56);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-bottom-nav {
  display: none;
}

.mobile-bottom-item {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 768px) {
  .canais-page {
    padding: 0 16px 90px;
  }

  .canais-hero {
    padding: 28px 20px;
  }

  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: fit-content;
    min-width: 168px;
    max-width: calc(100% - 28px);
    height: 50px;
    padding: 0 10px;
    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 999px;
    background: rgba(18, 18, 18, 0.86);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobile-bottom-item {
    display: flex;
    width: 60px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 18px;
    color: var(--goat-muted);
    font-size: 9px;
    font-weight: 800;
  }

  .mobile-bottom-item i {
    font-size: 15px;
  }

  .mobile-bottom-item.active {
    color: var(--goat-gold);
    background: rgba(255, 215, 0, 0.08);
  }
}
