/* IPTVBuddy - Responsive (Desktop + Mobile) */
:root {
  --bg: #0b0f19;
  --card: #111827;
  --border: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --green: #22c55e;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== HEADER ========== */
.header {
  background: #0f172a;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.logo span { color: var(--primary); }
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--card); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: #2563eb; }

/* ========== DATE BAR ========== */
.date-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 14px;
  color: var(--muted);
}
.date-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tz-badge {
  background: #1e3a5f;
  color: #93c5fd;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ========== DAY NAV ========== */
.day-nav {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}
.day-btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: 0.15s;
}
.day-btn:hover { background: #1e293b; color: #fff; }
.day-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ========== INTRO ========== */
.intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}
.intro h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

/* ========== AD SLOTS ========== */
.ad-slot {
  background: #0f172a;
  border: 1px dashed #334155;
  border-radius: 10px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 13px;
  margin: 16px 0;
  text-align: center;
  padding: 12px;
}

/* ========== MATCH CARDS ========== */
.matches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 40px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.2s;
}
.card:hover {
  border-color: #334155;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  background: #0f172a;
  font-size: 13px;
  color: var(--muted);
}
.comp { font-weight: 500; }
.time {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 14px;
  gap: 8px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}
.team img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.team span {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.score-box {
  text-align: center;
  min-width: 60px;
}
.score-box strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
}
.vs {
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
}

.card-bottom {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: space-between;
  align-items: center;
}
.meta { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.meta span { white-space: nowrap; }

/* Share buttons */
.share-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}
.share-wa { background: #25D366; }
.share-wa:hover { background: #1da851; }
.share-copy { background: #334155; }
.share-copy:hover { background: #475569; }
.share-mail { background: #3b82f6; }
.share-mail:hover { background: #2563eb; }

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer a { color: #93c5fd; margin: 0 6px; }
.footer-links { margin-bottom: 10px; }

/* ========== DESKTOP IMPROVEMENTS ========== */
@media (min-width: 768px) {
  .container { padding: 0 24px; }
  .logo { font-size: 1.55rem; }
  .teams { padding: 20px 18px; }
  .team img { width: 56px; height: 56px; }
  .team span { font-size: 15px; }
  .score-box strong { font-size: 1.6rem; }
  .card-bottom { padding: 12px 18px; }
  .day-btn { flex: none; min-width: 130px; }
  .matches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .matches .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 480px;
    justify-self: center;
  }
}

@media (min-width: 900px) {
  .matches {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile tweaks for easy screenshots */
@media (max-width: 600px) {
  .container { padding: 0 10px; }
  .header-actions .btn { padding: 6px 10px; font-size: 12px; }
  .team img { width: 40px; height: 40px; }
  .team span { font-size: 13px; }
  .card-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .share-btns { width: 100%; }
  .share-btn { flex: 1; justify-content: center; }
}

/* ========== SIDEBAR & LAYOUT ========== */
.layout {
  display: block;
}
.main-content {
  width: 100%;
}
.sidebar {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
}
.sidebar h3 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-links a {
  display: block;
  padding: 9px 12px;
  background: #0f172a;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  transition: 0.15s;
}
.sidebar-links a:hover {
  background: #1e293b;
  color: #fff;
}
.sidebar-links a span {
  color: var(--muted);
  font-size: 11px;
  display: block;
  margin-top: 2px;
}

/* Desktop: show sidebar */
@media (min-width: 900px) {
  .layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
  }
  .sidebar {
    display: block;
    position: sticky;
    top: 80px;
  }
  .matches {
    grid-template-columns: 1fr;
  }
}
