/* ==========================================
   Yacine TV - Main Stylesheet
   Modern Dark Sport Theme - Optimized for Performance
   ========================================== */

/* CSS Variables for Color Palette */
:root {
  --primary: #7F1D1D;
  --accent: #B91C1C;
  --bg-dark: #0B0F14;
  --text-main: #E5E7EB;
  /* Lighten secondary text for better contrast on dark bg */
  --text-secondary: #BFC7D1;
  --border-color: #1F2933;
  --transition: 0.2s ease;
}

/* Font Face - Using system fonts (Cairo fonts not available locally) */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  color: var(--text-main);
}

h2 {
  font-size: 1.75rem;
  color: var(--text-main);
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--text-main);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  /* avoid classic underline per request */
  /* Provide a non-color cue so links are distinguishable */
  border-bottom: 1px dotted currentColor;
  text-underline-offset: 2px;
  transition: color var(--transition), border-color var(--transition);
}

a:hover {
  color: var(--primary);
  border-bottom-style: solid;
}

/* Keyboard focus visibility for accessibility */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-bottom: none;
  /* avoid double cues during focus */
}

ul,
ol {
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background-color: rgba(11, 15, 20, 0.95);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
  /* Subtle shadow to improve contrast on dark header without changing brand color */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-main);
  font-weight: 500;
  transition: color var(--transition);
  direction: ltr;
  display: inline-block;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

/* Exempt non-text-link UI elements from decorative underline/borders */
nav a,
.btn,
.btn-secondary,
.share-btn,
.logo,
.code-box,
.copy-btn {
  border-bottom: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Content */
main {
  min-height: 60vh;
  padding: 3rem 0;
}

/* Section Spacing */
section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  border-right: 4px solid var(--accent);
  padding-right: 1rem;
}

/* CTA Buttons - Fixed Dimensions (No Layout Shift) */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  width: 280px;
  height: 56px;
  text-decoration: none;
  white-space: normal;
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(185, 28, 28, 0.3);
  color: var(--text-main);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  padding: 0.9rem 2.4rem;
}

.btn-secondary:hover {
  background: var(--accent);
  box-shadow: 0 8px 16px rgba(185, 28, 28, 0.2);
}

/* Download Section */
.download-section {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.1), rgba(11, 15, 20, 0.5));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  margin: 2rem 0;
  text-align: center;
}

.download-section h2 {
  margin-top: 0;
}

.download-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  background: rgba(31, 41, 51, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-card h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Content Sections */
.content-section {
  margin: 3rem 0;
}

.content-section h2 {
  border-right: 4px solid var(--accent);
  padding-right: 1rem;
  margin-bottom: 1.5rem;
}

/* Steps List */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-right: 3rem;
  margin-bottom: 1.5rem;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  right: 0;
  top: 0;
  background: var(--accent);
  color: var(--text-main);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* FAQ Section */
.faq-item {
  background: rgba(31, 41, 51, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.faq-item h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

/* Smart TV Download Card */
.download-card {
  background: rgba(31, 41, 51, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
}

.download-card .download-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.download-card .download-note {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.downloader-block {
  margin-top: 1.5rem;
  background: rgba(11, 15, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.downloader-block pre,
.downloader-block code {
  display: block;
  background: rgba(31, 41, 51, 0.6);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  direction: ltr;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  min-width: 160px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(31, 41, 51, 0.6);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

.code-box {
  display: block;
  width: 100%;
  max-width: 520px;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  background: rgba(31, 41, 51, 0.35);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  direction: ltr;
  text-align: center;
  margin: 0.75rem auto 0;
}

.code-box:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

.code-box code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
}

/* Social Share Buttons */
.social-share {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(31, 41, 51, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
}

.share-btn:hover {
  background: rgba(31, 41, 51, 0.8);
  border-color: var(--accent);
  color: var(--text-main);
}

/* Footer */
footer {
  background-color: rgba(11, 15, 20, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  text-align: right;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-section ul li {
  margin-bottom: 0;
}

.footer-section a {
  color: var(--text-secondary);
  transition: all var(--transition);
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}

.footer-section a:last-child {
  border-bottom: none;
}

.footer-section a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================
   Live Matches Section
   ========================================== */

.live-matches-section {
  margin: 3rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--text-main);
}

.view-all-btn {
  color: var(--accent);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: all var(--transition);
}

.view-all-btn:hover {
  background: var(--accent);
  color: var(--text-main);
}

/* Matches Grid */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Match Card */
.match-card {
  background: rgba(31, 41, 51, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.match-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.match-card.live {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

/* Live Badge */
.live-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #ef4444;
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Match League */
.match-league {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.league-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.match-league span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Match Teams */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.team-name {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Match Score */
.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.score {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.match-time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Match Status */
.match-status {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Loading and Error States */
.loading,
.error,
.no-matches {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.error {
  color: #ef4444;
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {

  0%,
  20% {
    content: '.';
  }

  40% {
    content: '..';
  }

  60%,
  100% {
    content: '...';
  }
}

/* Matches Page Specific */
.matches-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.matches-page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.matches-page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.matches-section {
  margin: 3rem 0;
}

.matches-section h2 {
  border-right: 4px solid var(--accent);
  padding-right: 1rem;
  margin-bottom: 2rem;
}


/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 15, 20, 0.98);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
  }

  nav ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: block;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  /* Matches Grid Mobile */
  .matches-grid {
    grid-template-columns: 1fr;
  }

  .match-card {
    padding: 1.25rem;
  }

  .team-logo {
    width: 40px;
    height: 40px;
  }

  .team-name {
    font-size: 0.85rem;
  }

  .score {
    font-size: 1.5rem;
  }

  .matches-page-header h1 {
    font-size: 1.75rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {

  header,
  footer,
  .download-section,
  .social-share {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
} 
 