/* ================================================================
   PHAROS 8K — Apps Page Stylesheet
   IPTV App Listings  |  Ratings, Features & Setup Steps
   ================================================================ */


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


/* ----------------------------------------------------------------
   1. APP CARDS
   ---------------------------------------------------------------- */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  border-right: 4px solid transparent;
  transition: border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease),
              transform 0.35s var(--ease);
  animation: fadeInUp 0.6s var(--ease) both;
}

/* Staggered entrance delays */
.app-card:nth-child(1) { animation-delay: 0s; }
.app-card:nth-child(2) { animation-delay: 0.1s; }
.app-card:nth-child(3) { animation-delay: 0.2s; }
.app-card:nth-child(4) { animation-delay: 0.3s; }
.app-card:nth-child(5) { animation-delay: 0.4s; }
.app-card:nth-child(6) { animation-delay: 0.5s; }
.app-card:nth-child(7) { animation-delay: 0.6s; }
.app-card:nth-child(8) { animation-delay: 0.7s; }

.app-card:hover {
  border-right-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}


/* ----------------------------------------------------------------
   2. APP HEADER — Title, Rating & Badges
   ---------------------------------------------------------------- */
.app-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.app-header h3 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

/* Star rating */
.app-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.app-rating svg {
  width: 18px;
  height: 18px;
  fill: var(--gold);
  filter: drop-shadow(0 0 3px rgba(245, 200, 66, 0.3));
}

.app-rating .rating-value {
  margin-right: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
}

/* Badge row */
.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-right: auto;
}


/* ----------------------------------------------------------------
   3. BADGES — Colored Pill Variants
   ---------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-green {
  color: var(--green);
  background: rgba(6, 214, 160, 0.12);
  border: 1px solid rgba(6, 214, 160, 0.25);
}

.badge-blue {
  color: var(--blue);
  background: rgba(76, 201, 240, 0.12);
  border: 1px solid rgba(76, 201, 240, 0.25);
}

.badge-orange {
  color: var(--orange);
  background: rgba(255, 159, 67, 0.12);
  border: 1px solid rgba(255, 159, 67, 0.25);
}

.badge-gold {
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--border);
}


/* ----------------------------------------------------------------
   4. APP BODY — Grid Layout (Features / Devices / Steps)
   ---------------------------------------------------------------- */
.app-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* — Features list — */
.app-features h4,
.app-devices h4,
.app-steps h4 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
}

.app-features ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.app-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.app-features li::before {
  content: '✓';
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-dark);
  background: var(--green);
  border-radius: 50%;
  margin-top: 2px;
}

/* — Device tags — */
.app-devices {
  display: flex;
  flex-direction: column;
}

.app-devices .devices-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.device-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.device-tag:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.device-tag svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* — Setup steps — */
.app-steps {
  counter-reset: step-counter;
}

.app-steps ol {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.app-steps li {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-number {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(245, 200, 66, 0.25);
}

.step-number::before {
  content: counter(step-counter);
}


/* ----------------------------------------------------------------
   5. COMPARISON TABLE
   ---------------------------------------------------------------- */
.comparison-table {
  width: 100%;
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.comparison-table table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table thead {
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.12) 0%, rgba(212, 160, 23, 0.08) 100%);
}

.comparison-table th {
  padding: 1rem 1.25rem;
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold);
  text-align: right;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

.comparison-table td {
  padding: 0.85rem 1.25rem;
  color: var(--text-muted);
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comparison-table tbody tr {
  background: var(--bg-card);
  transition: background 0.25s var(--ease);
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--bg-card2);
}

.comparison-table tbody tr:hover {
  background: var(--bg-card-hover);
}


/* ----------------------------------------------------------------
   6. TIPS SECTION
   ---------------------------------------------------------------- */
.tips-section {
  margin: 3rem 0;
}

.tips-section h3 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tip-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.tip-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.tip-card .tip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  background: var(--gold-glow);
  border-radius: var(--radius-xs);
}

.tip-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tip-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}


/* ----------------------------------------------------------------
   7. OWN APPS BANNER — Pharos8K Branded Apps
   ---------------------------------------------------------------- */
.own-apps-banner {
  position: relative;
  padding: 2.5rem;
  margin: 3rem 0;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.06) 0%, rgba(9, 12, 20, 0.95) 70%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  overflow: hidden;
}

.own-apps-banner::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.own-apps-banner h3 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.own-apps-banner > p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.75;
}

.own-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.own-apps-grid .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 200, 66, 0.1);
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease);
}

.own-apps-grid .feature-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.own-apps-grid .feature-item .icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  background: var(--gold-glow);
  border-radius: 50%;
}

.own-apps-grid .feature-item h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.own-apps-grid .feature-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* ----------------------------------------------------------------
   8. APP NOTE (paid activation warning etc.)
   ---------------------------------------------------------------- */
.app-note {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--orange);
  background: rgba(255, 159, 67, 0.08);
  border: 1px solid rgba(255, 159, 67, 0.2);
  border-radius: var(--radius-sm);
}


/* ----------------------------------------------------------------
   9. APP DESCRIPTION
   ---------------------------------------------------------------- */
.app-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
}


/* ----------------------------------------------------------------
   10. COMPARISON TABLE — Check marks
   ---------------------------------------------------------------- */
.check-yes {
  color: var(--green);
  font-weight: 700;
  font-size: 1.05rem;
}

.check-no {
  color: var(--red, #ef4444);
  font-weight: 700;
  font-size: 1.05rem;
  opacity: 0.5;
}


/* ----------------------------------------------------------------
   11. OWN APPS — Devices Label
   ---------------------------------------------------------------- */
.own-devices-label {
  display: block;
  margin: 1.5rem 0 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}


/* ----------------------------------------------------------------
   12. CTA SECTION (shared with other pages)
   ---------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.08), rgba(76, 201, 240, 0.05));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4rem 2rem;
  text-align: center;
  margin: 3rem 0 2rem;
}

.cta-section h2 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}


/* ----------------------------------------------------------------
   13. MAIN CONTAINER
   ---------------------------------------------------------------- */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}

.section {
  padding: 3rem 0;
}

.highlight {
  color: var(--gold);
}


/* ----------------------------------------------------------------
   14. RESPONSIVE — Mobile & Tablet
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .app-body {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-card {
    padding: 1.5rem;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .app-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .comparison-table {
    border-radius: var(--radius-sm);
  }

  .comparison-table table {
    font-size: 0.82rem;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }

  .own-apps-banner {
    padding: 1.75rem;
  }

  .own-apps-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Premium 2026 Enhancements
   ============================================ */

/* 3D tilt ready */
.app-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

/* Enhanced hover with depth */
.app-card:hover {
  box-shadow: 0 25px 50px rgba(0,0,0,0.35), 0 0 30px rgba(245,200,66,0.06);
}

/* Rating stars sequential reveal */
.app-rating svg {
  opacity: 0;
  animation: starReveal 0.3s ease forwards;
}
.app-rating svg:nth-child(1) { animation-delay: 0s; }
.app-rating svg:nth-child(2) { animation-delay: 0.05s; }
.app-rating svg:nth-child(3) { animation-delay: 0.1s; }
.app-rating svg:nth-child(4) { animation-delay: 0.15s; }
.app-rating svg:nth-child(5) { animation-delay: 0.2s; }
.app-rating svg:nth-child(6) { animation-delay: 0.25s; }
.app-rating svg:nth-child(7) { animation-delay: 0.3s; }

@keyframes starReveal {
  0% { opacity: 0; transform: scale(0) rotate(-90deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Badge hover effect */
.badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Comparison table row highlight */
.comparison-table tbody tr {
  transition: background 0.2s ease;
}
.comparison-table tbody tr:hover {
  background: rgba(245,200,66,0.05) !important;
}

/* Tip card icon spin on hover */
.tip-card svg {
  transition: transform 0.4s ease;
}
.tip-card:hover svg {
  transform: rotate(10deg) scale(1.1);
}
