/* ═══ KZSTREAM MAIN STYLESHEET ═══ */

:root {
  --green: #00e676;
  --muted: #a1a1aa;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .08) transparent;
}

::selection {
  background: #00e676;
  color: #000;
}

body {
  background: #09090b;
  color: #f4f4f5;
  overflow-x: hidden;
}

/* ═══ ANIMATIONS ═══ */
@keyframes gradient-x {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes text-glow {

  0%,
  100% {
    text-shadow: 0 0 20px rgba(0, 230, 118, .3), 0 0 60px rgba(0, 230, 118, .1);
  }

  50% {
    text-shadow: 0 0 30px rgba(0, 230, 118, .5), 0 0 80px rgba(0, 230, 118, .2);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: scale(.96) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes heroDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, .7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(0, 230, 118, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

@keyframes liveDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .9);
    opacity: 1;
  }

  70% {
    box-shadow: 0 0 0 7px rgba(255, 255, 255, 0);
    opacity: 1;
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    opacity: .9;
  }
}

@keyframes liveShine {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .3;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 230, 118, .15), 0 0 60px rgba(0, 230, 118, .05);
  }

  50% {
    box-shadow: 0 0 30px rgba(0, 230, 118, .25), 0 0 80px rgba(0, 230, 118, .1);
  }
}

/* ═══ SCROLL HINT & PARTICLES ═══ */
.scroll-hint {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  transition: opacity .5s ease-out;
  display: none;
}

@media(min-width:768px) {
  .scroll-hint {
    display: block;
  }
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

[data-aos] {
  will-change: transform, opacity;
}

/* ═══ MATCHES GRID ═══ */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.match-card {
  background: rgba(18, 20, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid rgba(255, 255, 255, .08);
  will-change: transform;
}

.match-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.match-card.kz-anim {
  opacity: 0;
  transform: translateY(12px);
}

.match-card.kz-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media(hover:hover) {
  .match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
    border-color: rgba(0, 230, 118, .3);
  }
}

.match-card.no-stream {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.match-card.no-stream.kz-visible {
  opacity: .35;
}

.card-thumb {
  position: relative;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
}

.card-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1), filter .35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media(hover:hover) {
  .match-card:hover .card-poster {
    transform: scale(1.06);
    filter: brightness(1.08);
  }
}

.card-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 7, .7) 0%, rgba(0, 0, 0, .15) 50%, transparent 100%);
}

.card-poster-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-placeholder-text {
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .4);
  text-align: center;
  padding: 0 .5rem;
}

.badge-live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #00c853, #00e676);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 0 20px rgba(0, 230, 118, .5);
  overflow: hidden;
}

.badge-live::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .35) 40%, transparent 80%);
  mix-blend-mode: screen;
  transform: translateX(-120%);
  animation: liveShine 1.8s linear infinite;
  pointer-events: none;
}

.badge-live .ldot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .9);
  animation: liveDotPulse 1.1s ease-out infinite;
  flex-shrink: 0;
}

.card-body {
  padding: .9rem 1rem;
}

.card-name {
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Outfit', sans-serif;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .4rem;
}

.card-time {
  font-size: .75rem;
  color: var(--muted);
}

.card-time.live {
  color: #ff3333;
  font-weight: 600;
}

.card-ch {
  font-size: .68rem;
  color: var(--muted);
  background: rgba(255, 255, 255, .05);
  padding: 2px 7px;
  border-radius: 4px;
}

.card-dt {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .3rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

.card-watch {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: .55rem;
  color: var(--green);
  font-size: .76rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  transition: text-shadow .25s;
}

@media(hover:hover) {
  .match-card:hover .card-watch {
    text-shadow: 0 0 6px rgba(0, 230, 118, .25);
  }
}

.card-watch svg {
  width: 13px;
  height: 13px;
}

.badge-timer {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  letter-spacing: .5px;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.badge-timer::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5a623;
  flex-shrink: 0;
  animation: blink 1.4s infinite;
}

.badge-timer.soon::before {
  background: #ffa500;
}

.badge-timer.timer-red::before {
  background: #ff4444;
}

.badge-timer.timer-red {
  color: #ff4444;
}

.badge-timer.timer-orange::before {
  background: #ffa500;
}

.badge-timer.timer-orange {
  color: #ffa500;
}

.badge-timer.timer-green::before {
  background: #00e676;
}

.badge-timer.timer-green {
  color: #00e676;
}

.badge-timer.soon {
  color: #00e676;
}

.badge-viewers {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, .7);
  font-size: .65rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.badge-viewers svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.badge-datetime {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 18, .65);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, .9);
  font-size: .68rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: .3px;
  border: 1px solid rgba(255, 255, 255, .1);
  line-height: 1;
}

/* ═══ FOOTER ═══ */
.footer-sep {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}



.badge-datetime .dt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .15);
  flex-shrink: 0;
}

/* ═══ SECTION HEADS / DAY SEP ═══ */
.section-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 2.5rem 0 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 230, 118, .1);
  border: 1.5px solid rgba(0, 230, 118, .3);
  color: var(--green);
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: .3px;
}

.day-sep {
  font-size: .75rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 3.5rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Outfit', sans-serif;
}

.day-sep::before {
  content: '';
  width: 12px;
  height: 3px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
  flex-shrink: 0;
}

.day-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 1px;
}

/* ═══ MODAL IPTV ═══ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.iptv-modal {
  background: linear-gradient(180deg, rgba(20, 20, 22, .98) 0%, rgba(10, 10, 12, .98) 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  animation: modalIn .3s cubic-bezier(.4, 0, .2, 1);
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 80px rgba(0, 230, 118, .05);
}

.modal-top {
  text-align: center;
  padding: 3rem 2rem 2rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 230, 118, .08) 0%, transparent 70%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.modal-top h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 3px;
}

.modal-top h1 em {
  font-style: normal;
  color: #00e676;
}

.modal-top p {
  color: #888;
  font-size: .9rem;
  margin-top: .5rem;
  line-height: 1.7;
}

.modal-top p strong {
  color: #fff;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.modal-plans {
  padding: 2rem;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.modal-plans h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .03);
  border: 2px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  padding: .9rem 1.2rem;
  margin-bottom: .5rem;
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease-out, background .15s ease-out, transform .2s;
}

.plan-item:hover {
  border-color: rgba(0, 230, 118, .3);
  background: rgba(0, 230, 118, .04);
  transform: translateY(-1px);
}

.plan-item.selected {
  border-color: #00e676;
  background: rgba(0, 230, 118, .08);
  box-shadow: 0 0 20px rgba(0, 230, 118, .1);
}

.plan-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #00e676;
  color: #000;
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 99px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.plan-name {
  font-size: .9rem;
  font-weight: 500;
}

.plan-price {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  color: #00e676;
  letter-spacing: 1px;
}

.subscribe-btn {
  display: block;
  width: 100%;
  margin-top: 1.2rem;
  background: #00e676;
  color: #000;
  font-weight: 700;
  font-size: .95rem;
  padding: 14px;
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  box-shadow: 0 0 20px rgba(0, 230, 118, .15);
}

.subscribe-btn:hover {
  background: #00ff7f;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 230, 118, .25);
}

.modal-features {
  padding: 2rem;
}

.modal-features h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  font-size: .88rem;
  color: #ccc;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.feature-item:last-child {
  border: none;
}

.feature-item::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e676' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #888;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  backdrop-filter: blur(8px);
}

.modal-close-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
}

/* ═══ DISCORD POPUP ═══ */
.discord-secours-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 998;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.discord-secours-overlay.open {
  display: flex;
}

.discord-secours-box {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 20, 24, .98) 0%, rgba(12, 12, 14, .98) 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: modalIn .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(88, 101, 242, .08);
}

.discord-secours-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #888;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.discord-secours-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
}

.discord-secours-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 1.25rem;
}

.discord-secours-logo span {
  color: var(--green);
}

.discord-secours-box h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .6rem 0;
  line-height: 1.4;
}

.discord-secours-box p {
  color: #888;
  font-size: .85rem;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.discord-secours-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 14px;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 4px 20px rgba(88, 101, 242, .25);
}

.discord-secours-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(88, 101, 242, .35);
}

.discord-secours-btn svg {
  flex-shrink: 0;
}

.discord-secours-done {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 24px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .5);
  font-size: .85rem;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.discord-secours-done:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
}

@media(max-width:600px) {
  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-plans {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }

  .matches-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .6rem !important;
  }

  .card-thumb {
    height: 120px !important;
  }

  .card-body {
    padding: .6rem .75rem;
  }

  .card-name {
    font-size: .78rem;
  }

  .card-watch {
    font-size: .7rem;
  }

  .badge-timer {
    font-size: .6rem;
    padding: 3px 7px;
  }

  .badge-viewers {
    font-size: .6rem;
    padding: 2px 6px;
  }

  .badge-live {
    font-size: .58rem;
    padding: 2px 7px;
  }

  .card-dt {
    font-size: .6rem;
  }

  .section-title {
    font-size: 1.15rem;
  }

  .section-head {
    gap: .4rem;
    flex-wrap: wrap;
  }

  .live-pill {
    font-size: .6rem;
    padding: 3px 9px;
    gap: 5px;
  }

  #refreshMatchesBtn {
    height: 28px;
    padding: 0 8px;
    font-size: .6rem;
    gap: 4px;
  }

  #refreshMatchesBtn svg {
    width: 10px;
    height: 10px;
  }

  #liveCount {
    font-size: .55rem;
  }
}