/* UpIPTV — Custom Styles */

/* ── Skip link (visually hidden until focused) ── */
.skip-link {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link:focus {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  background: #3b82f6 !important;
  color: #fff !important;
  font-weight: 700 !important;
  z-index: 9999 !important;
  border-radius: 0 0 8px 0 !important;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3b82f6; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #60a5fa; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Glassmorphism ── */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-light {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08);
}

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-blue {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero gradient ── */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 50%, rgba(139,92,246,0.10) 0%, transparent 60%);
}

/* ── Neon glow ── */
.neon-blue { box-shadow: 0 0 20px rgba(59,130,246,0.4), 0 0 60px rgba(59,130,246,0.15); }
.neon-blue:hover { box-shadow: 0 0 30px rgba(59,130,246,0.6), 0 0 80px rgba(59,130,246,0.25); }

/* ── Card hover lift ── */
.card-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ── Gradient border ── */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── Featured plan glow ── */
.plan-featured {
  box-shadow: 0 0 0 1px rgba(59,130,246,0.5), 0 20px 60px rgba(59,130,246,0.2);
}

/* ── Prose for blog content ── */
.prose-custom h2 {
  color: #f1f5f9; font-size: 1.6rem; font-weight: 800;
  margin-top: 2.5rem; margin-bottom: 1rem;
  padding-bottom: 0.4rem; border-bottom: 2px solid rgba(59,130,246,0.25);
  line-height: 1.3;
}
.prose-custom h3 {
  color: #cbd5e1; font-size: 1.2rem; font-weight: 700;
  margin-top: 1.75rem; margin-bottom: 0.6rem; line-height: 1.4;
}
.prose-custom h4 {
  color: #94a3b8; font-size: 1.05rem; font-weight: 600;
  margin-top: 1.25rem; margin-bottom: 0.5rem;
}
.prose-custom p { color: #94a3b8; line-height: 1.85; margin-bottom: 1.1rem; font-size: 1.0rem; }
.prose-custom a { color: #60a5fa; text-decoration: underline; }
.prose-custom a:hover { color: #93c5fd; }
.prose-custom ul { color: #94a3b8; padding-left: 1.6rem; margin-bottom: 1.1rem; list-style-type: disc; }
.prose-custom ol { color: #94a3b8; padding-left: 1.6rem; margin-bottom: 1.1rem; list-style-type: decimal; }
.prose-custom li { margin-bottom: 0.5rem; line-height: 1.7; }
.prose-custom li::marker { color: #3b82f6; }
.prose-custom blockquote {
  border-left: 4px solid #3b82f6; padding: 0.75rem 1.25rem;
  margin: 1.75rem 0; color: #64748b; font-style: italic;
  background: rgba(59,130,246,0.05); border-radius: 0 8px 8px 0;
}
.prose-custom code { background: rgba(59,130,246,0.15); color: #93c5fd; padding: 0.2em 0.5em; border-radius: 4px; font-size: 0.875em; }
.prose-custom pre { background: #0f1117; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 1rem; overflow-x: auto; }
.prose-custom img { border-radius: 12px; margin: 1.5rem auto; display: block; max-width: 100%; }
.prose-custom strong { color: #e2e8f0; font-weight: 700; }
.prose-custom table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.95rem; }
.prose-custom th { color: #e2e8f0; background: rgba(59,130,246,0.15); padding: 0.6rem 1rem; text-align: left; font-weight: 700; border: 1px solid rgba(255,255,255,0.1); }
.prose-custom td { color: #94a3b8; padding: 0.6rem 1rem; border: 1px solid rgba(255,255,255,0.07); }
.prose-custom tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Light mode prose */
.light .prose-custom h2 { color: #0f172a; border-bottom-color: rgba(59,130,246,0.3); }
.light .prose-custom h3 { color: #1e293b; }
.light .prose-custom h4 { color: #334155; }
.light .prose-custom p { color: #374151; }
.light .prose-custom ul, .light .prose-custom ol, .light .prose-custom li { color: #374151; }
.light .prose-custom li::marker { color: #2563eb; }
.light .prose-custom blockquote { color: #475569; background: rgba(59,130,246,0.04); }
.light .prose-custom code { background: rgba(59,130,246,0.1); color: #2563eb; }
.light .prose-custom pre { background: #f8fafc; border-color: #e2e8f0; }
.light .prose-custom strong { color: #0f172a; }
.light .prose-custom th { color: #1e293b; background: rgba(59,130,246,0.08); border-color: #e2e8f0; }
.light .prose-custom td { color: #374151; border-color: #f1f5f9; }
.light .prose-custom tr:nth-child(even) td { background: #f8fafc; }

/* ── FAQ accordion ── */
.faq-item details[open] summary { color: #60a5fa; }
.faq-item details summary::marker { display: none; }
.faq-item details summary::-webkit-details-marker { display: none; }
.faq-item details summary { list-style: none; cursor: pointer; }

/* ── Star rating ── */
.stars { color: #f59e0b; letter-spacing: -1px; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-green { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-purple { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.badge-orange { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }

/* ── Pulse dot ── */
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
  display: inline-block;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ── Animated gradient border on focus ── */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.4);
}

/* ── Country flag badges ── */
.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ── Section gradient separators ── */
.section-sep {
  background: linear-gradient(to bottom, transparent, rgba(59,130,246,0.05) 50%, transparent);
}

/* ── Animated number counter ── */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Channel category pill ── */
.cat-pill {
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-pill.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* ── Responsive video ── */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Table of Contents box ── */
.toc-box {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2rem;
}
.toc-box .toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 0.75rem;
}
.toc-box ol {
  padding-left: 1.25rem;
  margin: 0;
  list-style-type: decimal;
}
.toc-box li {
  margin-bottom: 0.35rem;
  line-height: 1.5;
}
.toc-box a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.toc-box a:hover { color: #60a5fa; }

.light .toc-box {
  background: rgba(59,130,246,0.04);
  border-color: rgba(59,130,246,0.25);
}
.light .toc-box a { color: #475569; }
.light .toc-box a:hover { color: #2563eb; }

/* ── Inline article section images ── */
.article-img {
  margin: 1.75rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
}
.article-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  margin: 0;
}
.article-img figcaption {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: rgba(0,0,0,0.2);
}

.light .article-img {
  border-color: rgba(0,0,0,0.07);
}
.light .article-img figcaption {
  background: rgba(0,0,0,0.04);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-float { animation: floatY 4s ease-in-out infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-text {
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #3b82f6 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}
