/* cyber-neon.css
   Cyber Neon theme (Blue × Purple × Black) + animated rainbow borders
*/

html,
body {
  height: auto !important;
  min-height: 100vh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin: 0;
  padding: 0;
}

body {
  display: block !important;
  min-height: 100vh;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 50px;
}

.hidden {
  display: none !important;
}

/* ========== Categories Toggle ========== */
.categories-toggle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 12px;
}

.categories-toggle-btn {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 1;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6a00ff, #00eaff);
  color: #fff;
  padding: 10px 38px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 22px;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: transform .3s cubic-bezier(.2, .9, .2, 1), box-shadow .3s, background .3s;
  box-shadow: 0 0 30px rgba(106, 0, 255, 0.5), 0 0 60px rgba(0, 234, 255, 0.3), 0 4px 20px rgba(0,0,0,0.3);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
  align-self: center;
}

.categories-toggle-btn:hover {
  color: #fff;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 0 50px rgba(106, 0, 255, 0.7), 0 0 80px rgba(0, 234, 255, 0.5), 0 8px 30px rgba(0,0,0,0.4);
}

.categories-toggle-btn:active {
  transform: translateY(-2px) scale(1.03);
}

.categories-toggle-btn .toggle-arrow {
  transition: transform 0.3s ease;
  font-size: 20px;
}

.categories-toggle-content {
  margin-top: 12px;
}

iframe.loading {
  opacity: 0.5;
}

/* ========== Variables ========== */
:root {
  --bg-a: #000000;
  --bg-b: #0f0f1f;
  --bg-c: #1a0033;
  --bg-d: #001f3f;
  --accent-a: #6a00ff;
  /* purple */
  --accent-b: #00eaff;
  /* cyan */
  --text: #e6f7ff;
  --muted: #9aa6b2;
  --radius-pill: 30px;
  --radius-lg: 12px;
  --rainbow-speed: 6s;
  --fix-chrome-flash: hidden;
}

/* ========== Base / Background ========== */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  height: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  margin: 0;
  padding-top: 0;
  font-family: 'Cairo', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: linear-gradient(-45deg, var(--bg-a), var(--bg-b), var(--bg-c), var(--bg-d));
  background-size: 400% 400%;
  animation: neonShift 18s ease infinite;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  max-width: 100vw;
}

body.preload {
  visibility: hidden;
}

/* nice subtle backdrop glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 15%, rgba(106, 0, 255, 0.06), transparent 12%),
    radial-gradient(circle at 85% 85%, rgba(0, 234, 255, 0.04), transparent 18%);
  z-index: -1;
  overflow: hidden;
}

/* ========== Animations ========== */
@keyframes neonShift {
  0% {
    background-position: 0% 50%;
  }

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

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

@keyframes neonPulse {
  from {
    box-shadow: 0 0 8px var(--accent-b), 0 0 14px var(--accent-a);
  }

  to {
    box-shadow: 0 0 18px var(--accent-b), 0 0 28px var(--accent-a);
  }
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* respect user's reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ========== Title ========== */
.daddy-schedule-title {
  max-width: 1200px;
  margin: 20px auto;
  padding: 12px 18px;
  background: #0a133a;
  color: #fb7100;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  border-radius: var(--radius-lg);
  letter-spacing: 1px;
  box-shadow: 0 12px 40px rgba(106, 0, 255, 0.14), 0 6px 18px rgba(0, 234, 255, 0.08) inset;

  border: 4px solid transparent;
  border-image: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet) 1;

  text-transform: uppercase;

  -webkit-backface-visibility: var(--fix-chrome-flash);
  backface-visibility: hidden;
}

.daddy-schedule-title:hover {
  transform: translateZ(0);
}

/* ========== Category Nav (buttons) ========== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 14px 12px;
  padding-bottom: 6px;
  overflow-x: auto;
}

/* base tab/button */
.category-nav button {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 1;
  border: none;
  cursor: pointer;
  background: #0d0d1a;
  color: var(--accent-b);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: left;
  gap: 10px;
  transition: transform .26s cubic-bezier(.2, .9, .2, 1), box-shadow .26s, background .26s, color .26s;
  box-shadow: 0 0 10px rgba(106, 0, 255, 0.18);
  border: 1px solid rgba(0, 234, 255, 0.06);
  overflow: hidden;

  -webkit-backface-visibility: var(--fix-chrome-flash);
  backface-visibility: hidden;
  will-change: transform;
}

.category-nav button:hover,
.category-nav button.active {
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #001;
  transform: translateY(-4px) scale(1.03) translateZ(0);
  box-shadow: 0 18px 50px rgba(0, 234, 255, 0.12), 0 6px 18px rgba(106, 0, 255, 0.06) inset;
}

/* focus accessibility */
.category-nav button:focus {
  outline: 3px solid rgba(0, 234, 255, 0.14);
  outline-offset: 4px;
}

/* ========== Category Header (panel header) ========== */
/* apply rainbow border + neon visuals */
.category-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 12px;
  padding: 12px 16px;
  margin: 10px 12px 6px;
  border-radius: 13px;
  background: linear-gradient(90deg, #1a0033, #001f3f);
  color: var(--accent-b);
  font-weight: 800;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.18);
  transition: transform .22s ease, box-shadow .22s ease;

  -webkit-backface-visibility: var(--fix-chrome-flash);
  backface-visibility: hidden;
  will-change: transform;
  overflow: hidden;
  /* منع overflow من الـrainbow */
}

.category-header:hover {
  transform: translateX(4px) translateZ(0);
  box-shadow: 0 0 22px rgba(106, 0, 255, 0.25), 0 0 30px rgba(0, 234, 255, 0.18);
}

/* ========== Category Content (panel body) ========== */
.category-content {
  margin: 0 12px 12px;
  background: #0a0a15;
  padding: 10px;
  border-radius: 0 0 10px 10px;
  border: 2px solid rgba(106, 0, 255, 0.14);
  box-shadow: inset 0 0 20px rgba(0, 234, 255, 0.02);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) 1;
  transition: background .22s, transform .22s;

}

/* ========== Match rows ========== */
.match {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) 1;
  transition: background .22s, transform .22s;
  overflow: hidden;
  /* منع عرض زائد */
}

.match:hover {
  background: rgba(0, 234, 255, 0.03);
  transform: translateX(6px) translateZ(0);
}

.match .time {
  min-width: 64px;
  text-align: center;
  font-weight: 800;
  color: #39ff14;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 234, 255, 0.04);
}

.match .match-name {
  flex: 1;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  transition: color .2s, text-shadow .2s;
}

.match .match-name:hover {
  color: var(--accent-b);
  text-shadow: 0 0 8px var(--accent-b);
}

/* ========== Links (stream buttons) ========== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  margin: 10px 0 0;
  width: 100%;
  background: transparent;
}

/* base link button (will get rainbow border) */
.link-button {
  position: relative;
  z-index: 1;
  background: #1a1a2e;
  color: var(--accent-b);
  font-weight: 700;
  border-radius: 25px;
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid rgba(106, 0, 255, 0.08);
  cursor: pointer;
  transition: transform .26s, box-shadow .26s, background .26s, color .26s;
  box-shadow: 0 0 6px rgba(106, 0, 255, 0.18);
  overflow: hidden;
  /* منع overflow من الـrainbow */

  -webkit-backface-visibility: var(--fix-chrome-flash);
  backface-visibility: hidden;
  will-change: transform;
}

.link-button:hover {
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #fff;
  transform: translateY(-3px) scale(1.04) translateZ(0);
  box-shadow: 0 10px 30px rgba(0, 234, 255, 0.12), 0 0 18px rgba(106, 0, 255, 0.12);
}

/* ========== Flashy button (24/7) ========== */
.filter-btn.flashy {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #fff;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 234, 255, 0.12);
  animation: neonPulse 2s infinite alternate;
  transition: transform .22s;

  -webkit-backface-visibility: var(--fix-chrome-flash);
  backface-visibility: hidden;
  will-change: transform;
  overflow: hidden;
  /* منع overflow من الـrainbow */
}

.filter-btn.flashy:hover {
  transform: translateY(-4px) translateZ(0);
}

/* ========== Status lamps ========== */
.lamp {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

.lamp-green {
  background: #39ff14;
  box-shadow: 0 0 10px #39ff14;
}

.lamp-yellow {
  background: #ffea00;
  box-shadow: 0 0 10px #ffea00;
}

.lamp-red {
  background: #ff1744;
  box-shadow: 0 0 10px #ff1744;
}

.lamp-gray {
  background: #555;
}

/* ========== Rainbow border (single source) ========== */
/* use on .category-header, .category-nav button, .link-button, .filter-btn.flashy */
@keyframes rainbowBorder {
  0% {
    background-position: 0% 50%;
  }

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

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

/* helper to enable mask-border style */
.rainbow-base {
  position: relative;
  z-index: 1;
  border-radius: inherit;
  overflow: hidden;
  /* منع overflow */
}

.rainbow-base::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  /* تقليل إلى 2px لمنع عرض زائد */
  border-radius: inherit;
  background: linear-gradient(270deg, #ff003c, #ff7a00, #ffd400, #00ff8a, #00d4ff, #6a00ff);
  background-size: 400% 400%;
  animation: rainbowBorder var(--rainbow-speed) linear infinite;
  pointer-events: none;
  z-index: -1;
  /* mask center so only border shows (webkit + standard) */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

/* Apply rainbow to the actual UI elements automatically */
.category-header {
  border-radius: 12px;
}

.category-header.rainbow,
.category-header.rainbow-base,
.category-header::before {
  /* nothing - left for clarity */
}

/* apply to headers and nav buttons and stream buttons */
.category-header,
.category-nav button,
.link-button,
.filter-btn.flashy {
  /* make them compatible with rainbow pseudo-element */
  position: relative;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  /* منع overflow كامل */
}

/* create per-selector ::before with mask, but avoid duplicating animation by reusing .rainbow-base rules */
/* We inject the same ::before behavior for these selectors: */
.category-header::before,
.category-nav button::before,
.link-button::before,
.filter-btn.flashy::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  /* تقليل padding */
  border-radius: inherit;
  background: linear-gradient(270deg, #ff003c, #ff7a00, #ffd400, #00ff8a, #00d4ff, #6a00ff);
  background-size: 400% 400%;
  animation: rainbowBorder var(--rainbow-speed) linear infinite;
  pointer-events: none;
  z-index: -1;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

/* subtle hover amplify when element has rainbow border */
.category-header:hover::before,
.category-nav button:hover::before,
.link-button:hover::before,
.filter-btn.flashy:hover::before {
  filter: brightness(1.08) saturate(1.05);
  transform: scale(1.006);
}

/* ========== Focus (keyboard) ========= */
.category-nav button:focus::after,
.link-button:focus::after,
.filter-btn.flashy:focus::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 4px rgba(0, 234, 255, 0.12);
  z-index: -2;
}

/* ========== Responsive tweaks ========== */
@media (max-width:900px) {
  .daddy-schedule-title {
    font-size: 18px;
    padding: 10px;
    margin: 14px auto;
  }

  .category-nav {
    gap: 10px;
    padding: 8px 10px;
  }

  .category-nav button,
  .link-button,
  .filter-btn.flashy {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 40px;
  }

  .category-header {
    padding: 10px 12px;
    font-size: 19px;
    margin: 8px 10px 6px;
  }

  .match {
    padding: 10px;
  }

  .match .time {
    min-width: 54px;
    padding: 6px 8px;
    font-size: 13px;
  }
}

/* Fix Mobile Overflow & Scrolling Issues */
html,
body {
  overflow-x: hidden !important;
  width: 100% !important;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

body {
  overflow-y: auto !important;
}

img,
video,
iframe {
  max-width: 100% !important;
  height: auto;
}

.container,
.wrapper,
.main-content {
  max-width: 100vw !important;
  overflow-x: hidden;
}