/* ক্রীড়াজগত (KhelaJagat) - বাংলা স্পোর্টস পোর্টাল ডিজাইন সিস্টেম */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
  --font-bn: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Outfit', sans-serif;

  --bg-main: #091212;
  --bg-surface: #101e1d;
  --bg-surface-elevated: #162927;
  --bg-glass: rgba(16, 30, 29, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(52, 211, 153, 0.4);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;

  --accent-cricket: #10b981; /* মাঠের সবুজ */
  --accent-football: #3b82f6; /* ফুটবল ইলেকট্রিক ব্লু */
  --accent-primary: #10b981;
  --accent-gold: #f59e0b;
  --accent-danger: #ef4444;

  --badge-bg: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(16, 185, 129, 0.4);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --badge-bg: rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: var(--font-bn);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* গ্লাস ও কার্ড */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
  border-color: var(--border-color-hover);
}

/* টপ টিকার */
.sports-ticker {
  background: linear-gradient(90deg, #065f46, #1e40af, #991b1b);
  color: #ffffff;
  padding: 0.4rem 1.25rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

/* হেডার */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* স্পোর্টস সুইচিং বাটন (সব / ক্রিকেট / ফুটবল) */
.sport-switch-bar {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.sport-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-bn);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sport-switch-btn:hover {
  color: var(--text-main);
}

.sport-switch-btn.active-all {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
}

.sport-switch-btn.active-cricket {
  background: var(--accent-cricket);
  color: #ffffff;
  font-weight: 700;
}

.sport-switch-btn.active-football {
  background: var(--accent-football);
  color: #ffffff;
  font-weight: 700;
}

/* নেভিগেশন লিংকস */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--badge-bg);
}

.nav-link.nav-active {
  color: var(--accent-cricket);
  background: rgba(16, 185, 129, 0.12);
}

/* মেইন কন্টেইনার */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* বাটন ও ব্যাজ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-bn);
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--badge-bg);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-accent { background: rgba(16, 185, 129, 0.18); color: #10b981; }
.badge-info { background: rgba(59, 130, 246, 0.18); color: #3b82f6; }
.badge-danger { background: rgba(239, 68, 68, 0.18); color: #ef4444; }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.badge-outline { border: 1px solid var(--border-color); color: var(--text-muted); }

/* ক্যাটাগরি চিপস */
.chips-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.category-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-bn);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-chip:hover {
  color: var(--text-main);
  border-color: var(--accent-cricket);
}

.category-chip.active {
  background: var(--accent-cricket);
  color: #ffffff;
  border-color: var(--accent-cricket);
}

/* নিউজ কার্ড গ্রিড */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cricket);
}

.news-img-holder {
  position: relative;
  width: 100%;
  height: 190px;
}

.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-sport-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.news-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.news-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.btn-read {
  color: var(--accent-cricket);
  background: transparent;
  border: none;
  font-family: var(--font-bn);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.btn-read:hover {
  text-decoration: underline;
}

/* লাইভ ম্যাচ গ্রিড */
.live-matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

.match-card {
  padding: 1.5rem;
}

.match-clash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.score-display-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.team-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-flag {
  font-size: 2.2rem;
}

.team-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.big-score {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-cricket);
}

.big-score-football {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-football);
}

.comm-feed-box {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.comm-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
}

/* বল চিপস */
.ball-chip {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
}

.ball-four { background: #0284c7; color: #ffffff; }
.ball-six { background: #e11d48; color: #ffffff; }
.ball-wicket { background: #dc2626; color: #ffffff; animation: pulse 1s infinite; }

/* ট্যাকটিক্যাল পিচ এসভিজি */
.tactics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

.football-pitch-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
}

.football-pin {
  fill: #38bdf8;
  stroke: #ffffff;
  stroke-width: 1.2;
}

.pitch-label {
  font-size: 3px;
  font-weight: 700;
  fill: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.cricket-field-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 1 / 1;
}

.cricket-pin {
  fill: #f59e0b;
  stroke: #ffffff;
  stroke-width: 1;
}

.cricket-label {
  font-size: 3.4px;
  font-weight: 700;
  fill: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* প্লেয়ার কার্ডস */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.player-card {
  padding: 1.25rem;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.avatar-round {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--badge-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

/* কুইজ */
.quiz-wrapper {
  max-width: 650px;
  margin: 0 auto;
  padding: 2rem;
}

.quiz-btn {
  width: 100%;
  text-align: left;
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-bn);
  font-size: 0.95rem;
  background: var(--bg-surface);
  border-radius: 0.6rem;
  transition: all 0.2s ease;
}

.quiz-btn:hover:not(:disabled) {
  border-color: var(--accent-cricket);
  background: rgba(16, 185, 129, 0.08);
}

.correct-ans {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.wrong-ans {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

/* মোডাল */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* বিজ্ঞাপন ও মনিটাইজেশন স্লট (AdSense & Sponsorship Slots) */
.ad-banner-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.ad-placeholder-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* সোশাল শেয়ারিং বার */
.social-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  margin-top: 1rem;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-bn);
}

.btn-share:hover { opacity: 0.85; }
.btn-share-wa { background: #25d366; }
.btn-share-fb { background: #1877f2; }
.btn-share-x { background: #0f1419; border: 1px solid rgba(255,255,255,0.2); }

/* অ্যাফিলিয়েট মার্চেন্ডাইজ ব্যানার */
.merch-banner {
  background: linear-gradient(135deg, #1e3a8a, #065f46);
  border-radius: 1rem;
  padding: 1.5rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  md:flex-row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

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

.slide-down {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .section-title { font-size: 1.4rem; }
}
