/* ============================================================
   APEX — styles.css
   IPTV Download Suite · Dark Red & White Theme
   ============================================================ */

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #0A0A0A;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NOISE TEXTURE OVERLAY ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* ── AMBIENT GLOW BLOBS ──────────────────────────────────── */
.glow-1 {
  position: fixed;
  top: -20%;
  right: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(232,0,29,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow-2 {
  position: fixed;
  bottom: -20%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,0,29,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ── NAVBAR ──────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 68px;
  background: rgba(10,10,10,0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232,0,29,0.12);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.12em;
  color: #E8001D;
  text-decoration: none;
}

.nav-badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8001D;
  animation: pulse 2s infinite;
}

/* ── HERO WRAPPER ────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 5vw 60px;
  position: relative;
  z-index: 1;
  text-align: center;
}

/* ── EYEBROW BADGE ───────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(232,0,29,0.25);
  border-radius: 100px;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E8001D;
  background: rgba(232,0,29,0.06);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

/* ── HEADLINE ────────────────────────────────────────────── */
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 1rem;
  animation: fadeUp 0.7s 0.08s ease both;
}

.hero h1 span {
  color: #E8001D;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: rgba(255,255,255,0.45);
  font-weight: 300;
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 3rem;
  animation: fadeUp 0.7s 0.16s ease both;
}

/* ── APP GRID ────────────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 960px;
  animation: fadeUp 0.8s 0.24s ease both;
}

/* ── APP CARD ────────────────────────────────────────────── */
.app-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 2rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

/* Top shimmer line */
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E8001D, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

/* Inner glow */
.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(232,0,29,0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.app-card:hover {
  transform: translateY(-8px);
  border-color: rgba(232,0,29,0.35);
  background: rgba(232,0,29,0.06);
}

.app-card:hover::before,
.app-card:hover::after {
  opacity: 1;
}

/* ── APP ICON ────────────────────────────────────────────── */
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

.app-card:hover .app-icon {
  transform: scale(1.1);
}

/* ── APP NAME ────────────────────────────────────────────── */
.app-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: #fff;
  position: relative;
  z-index: 1;
}

/* ── APP DESCRIPTION ─────────────────────────────────────── */
.app-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.5;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── DOWNLOAD BUTTON ─────────────────────────────────────── */
.app-dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(232,0,29,0.12);
  border: 1px solid rgba(232,0,29,0.25);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #E8001D;
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.app-card:hover .app-dl-btn {
  background: #E8001D;
  border-color: #E8001D;
  color: white;
}

/* ── FOOTER NOTE ─────────────────────────────────────────── */
.hero-note {
  margin-top: 2.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.18);
  text-transform: uppercase;
  animation: fadeUp 0.8s 0.32s ease both;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #E8001D;
}

/* ── TOAST NOTIFICATION ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: #1a1a1a;
  color: white;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid rgba(232,0,29,0.2);
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E8001D;
  flex-shrink: 0;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(1.5); }
}

/* ── RESPONSIVE: TABLET ──────────────────────────────────── */
@media (max-width: 860px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 560px;
  }
}

/* ── RESPONSIVE: MOBILE ──────────────────────────────────── */
@media (max-width: 480px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
  .app-icon  { width: 58px; height: 58px; font-size: 1.7rem; }
  .app-name  { font-size: 1.2rem; }
  .hero h1   { font-size: 2.6rem; }
  .nav-badge { display: none; }
}

/* ── RESPONSIVE: SMALL PHONES ────────────────────────────── */
@media (max-width: 360px) {
  .app-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
  }
}

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
