/* CDE Sports Data - shared stylesheet
   Based on the operator app download page visual style.
   Dark navy gradient, green accent, Arial font, mobile-first. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #07182f;
}

body {
  min-height: 100%;
  color: #ffffff;
  background: #07182f;
  background: linear-gradient(145deg, #07182f 0%, #0f2748 58%, #163668 100%);
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout shell */
.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 24, 47, 0.95);
  backdrop-filter: blur(8px);
}

.site-header .shell {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #27c457;
  color: #09213d;
  font-size: 20px;
  font-weight: 900;
  line-height: 36px;
  text-align: center;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #c7d1df;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
}

.lang-switch a {
  padding: 6px 10px;
  border-radius: 8px;
  color: #c7d1df;
  transition: background 0.15s, color 0.15s;
}

.lang-switch a.active {
  background: rgba(39, 196, 87, 0.15);
  color: #27c457;
}

.lang-sep {
  color: rgba(255, 255, 255, 0.25);
}

/* Mobile nav toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #c7d1df;
  border-radius: 1px;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 64px;
  padding: 32px 0;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #c7d1df;
}

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

.footer-copy {
  font-size: 13px;
  color: #b7c5d6;
}

/* Hero */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 720px;
  margin: 0 auto 20px;
}

.hero .lead {
  font-size: 18px;
  color: #d4dde8;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  border: none;
}

.btn-primary {
  background: #27c457;
  color: #09213d;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(39, 196, 87, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover:not(:disabled) {
  border-color: #27c457;
  color: #27c457;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 18px;
}

/* Section headings */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 12px;
  text-align: center;
}

.section-sub {
  font-size: 16px;
  color: #c7d1df;
  text-align: center;
  margin-bottom: 36px;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 20px;
}

.card:hover {
  border-color: rgba(39, 196, 87, 0.4);
}

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 24px;
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(39, 196, 87, 0.15);
  color: #27c457;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card .icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: #c7d1df;
  line-height: 1.5;
}

/* How it works steps */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 24px;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: #27c457;
  color: #09213d;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 6px;
}

.step p {
  font-size: 14px;
  color: #c7d1df;
}

/* Live homepage data status */
.data-status-wrap {
  padding: 28px 0 0;
}

.data-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #c7d1df;
  font-size: 13px;
}

.data-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27c457;
  box-shadow: 0 0 12px rgba(39, 196, 87, 0.55);
  flex-shrink: 0;
}

.data-status-error .data-status-dot {
  background: #94a3b8;
  box-shadow: none;
}

.data-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #c7d1df;
  text-align: center;
}

.data-empty-row td {
  padding: 24px;
  color: #c7d1df;
  text-align: center;
}

.data-loading {
  grid-column: 1 / -1;
  min-height: 76px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.06)
  );
  background-size: 200% 100%;
  animation: data-loading-shimmer 1.4s infinite;
}

.data-loading-row td {
  height: 60px;
  padding: 12px 14px;
}

@keyframes data-loading-shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .data-loading {
    animation: none;
  }
}

/* Live match cards */
.match-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 12px;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 32px;
}

.match-card {
  display: flex;
  flex: 0 0 min(82vw, 300px);
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 18px;
  scroll-snap-align: start;
}

.match-list > .data-empty,
.match-list > .data-loading {
  flex: 1 0 100%;
}

.match-league {
  font-size: 12px;
  color: #c7d1df;
  font-weight: 700;
}

.match-live-state {
  color: #ff5c5c;
  margin-left: 8px;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.match-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.match-score {
  font-size: 20px;
  font-weight: 900;
  color: #27c457;
}

.match-minute {
  font-size: 12px;
  font-weight: 700;
  color: #27c457;
}

.match-scheduled {
  font-size: 13px;
  font-weight: 800;
  color: #c7d1df;
  overflow-wrap: anywhere;
  text-align: right;
}

/* Leagues grid */
.leagues-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.league-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 16px;
}

.league-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.league-name {
  font-size: 14px;
  font-weight: 800;
}

.league-copy {
  display: flex;
  flex-direction: column;
}

.league-country {
  font-size: 12px;
  color: #c7d1df;
}

/* Historical events table */
.matches-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

.matches-table th,
.matches-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.matches-table th {
  font-size: 12px;
  font-weight: 800;
  color: #c7d1df;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.matches-table td.score {
  font-weight: 900;
  color: #27c457;
  white-space: nowrap;
}

/* Coverage stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 24px 16px;
}

.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: #27c457;
}

.stat-label {
  font-size: 13px;
  color: #c7d1df;
  font-weight: 700;
  margin-top: 4px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

.pricing-card.featured {
  border-color: #27c457;
  background: rgba(39, 196, 87, 0.08);
}

.pricing-card .plan-name {
  font-size: 16px;
  font-weight: 800;
  color: #c7d1df;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
}

.pricing-card .price-period {
  font-size: 16px;
  color: #c7d1df;
  font-weight: 700;
}

.pricing-card .plan-desc {
  font-size: 15px;
  color: #d4dde8;
  margin: 12px 0 20px;
  line-height: 1.5;
}

.pricing-card .plan-features {
  list-style: none;
  text-align: left;
  margin: 0 0 24px;
  padding: 0;
}

.pricing-card .plan-features li {
  font-size: 14px;
  color: #d4dde8;
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
}

.pricing-card .plan-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #27c457;
  font-weight: 900;
}

.pricing-card .btn {
  width: 100%;
}

.pricing-card .btn + .btn {
  margin-top: 10px;
}

.pricing-card .pay-note {
  font-size: 12px;
  color: #9fb0c3;
  line-height: 1.5;
  margin-top: 12px;
}

.addon-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.addon-stepper-label {
  font-size: 14px;
  font-weight: 800;
  color: #d4dde8;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, opacity 0.15s;
}

.stepper-btn:hover:not(:disabled) {
  border-color: #27c457;
  color: #27c457;
}

.stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper-value {
  min-width: 24px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.addon-hint {
  font-size: 12px;
  color: #9fb0c3;
  line-height: 1.5;
  margin-bottom: 16px;
}

.total-line {
  font-size: 16px;
  color: #d4dde8;
  margin-bottom: 16px;
}

.total-line strong {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: #27c457;
  font-weight: 900;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item .faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: #c7d1df;
  line-height: 1.6;
}

/* Legal pages */
.legal-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0;
}

.legal-article h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 24px;
}

.legal-article h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 28px 0 12px;
}

.legal-article p {
  font-size: 15px;
  color: #d4dde8;
  margin-bottom: 14px;
  line-height: 1.7;
}

.legal-article ul {
  margin: 0 0 14px 20px;
}

.legal-article li {
  font-size: 15px;
  color: #d4dde8;
  margin-bottom: 6px;
  line-height: 1.6;
}

/* Thank you page */
.thank-you {
  text-align: center;
  padding: 80px 0;
}

.thank-you .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: #27c457;
  color: #09213d;
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 24px;
}

.thank-you h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 16px;
}

.thank-you p {
  font-size: 17px;
  color: #d4dde8;
  max-width: 480px;
  margin: 0 auto 28px;
}

.order-box {
  max-width: 480px;
  margin: 0 auto 28px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
}

.order-box .order-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c7d1df;
  margin-bottom: 10px;
}

.order-box .order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.order-box .order-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #27c457;
  word-break: break-all;
}

.order-box .btn {
  padding: 6px 14px;
  font-size: 13px;
}

/* 404 */
.not-found {
  text-align: center;
  padding: 100px 0;
}

.not-found h1 {
  font-size: 72px;
  font-weight: 900;
  color: #27c457;
  margin-bottom: 12px;
}

.not-found p {
  font-size: 18px;
  color: #d4dde8;
  margin-bottom: 28px;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 56px 0;
}

.cta-section h2 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 24px;
}

/* Responsive: desktop */
@media (min-width: 760px) {
  .shell {
    padding: 0 32px;
  }

  .hero {
    padding: 96px 0 64px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero .lead {
    font-size: 20px;
  }

  .site-nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .lang-switch {
    margin-left: 0;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .leagues-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .section-title {
    font-size: 36px;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Responsive: small mobile */
@media (max-width: 420px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero .lead {
    font-size: 16px;
  }

  .pricing-card .price {
    font-size: 32px;
  }

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