/* ===== Nbaji Bet - Global Stylesheet ===== */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary: #6366f1;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --danger: #ef4444;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-section-alt: #0c1929;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --container-max: 1200px;
  --header-h: 70px;
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif, "Noto Sans Bengali";
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-stack);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.8rem; color: var(--accent); }
h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }

p { margin-bottom: 1rem; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Topbar ===== */
.topbar {
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { color: var(--text-muted); font-size: 0.82rem; }
.topbar-links a:hover { color: var(--accent); }

/* ===== Header ===== */
.site-header {
  background: var(--bg-darker);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--secondary);
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.header-logo img, .header-logo svg {
  max-height: 44px;
  width: auto;
  display: block;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.header-nav a {
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
}
.header-nav a:hover, .header-nav a.active {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-register {
  background: linear-gradient(135deg, var(--accent), var(--danger));
  color: #fff;
  animation: btnPulse 2.5s ease-in-out infinite;
}
.btn-register:hover {
  background: linear-gradient(135deg, var(--danger), var(--accent));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245,158,11,0.4);
}
.btn-login {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-login:hover {
  background: var(--primary);
  color: #fff;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ea580c);
  color: #fff;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: #fff; }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

/* ===== Mobile Menu ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  padding: 80px 20px 20px;
  overflow-y: auto;
}
.mobile-menu.active { display: flex; flex-direction: column; }
.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.mobile-menu a {
  display: block;
  color: #fff;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}
.mobile-menu-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.mobile-menu-actions .btn { flex: 1; text-align: center; }

/* ===== Banner ===== */
.hero-banner {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.hero-banner img, .hero-banner svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Shortcut Grid ===== */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 30px 0;
}
.shortcut-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 12px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.shortcut-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.shortcut-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shortcut-item h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.shortcut-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Section ===== */
.section {
  padding: 50px 0;
}
.section-alt {
  background: var(--bg-section-alt);
}
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.section-title p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.section-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
  margin: 0 auto;
  max-width: 200px;
  border-radius: 2px;
  margin-top: 12px;
}

/* ===== Game Grid ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.game-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.game-card-img svg {
  width: 60%;
  height: 60%;
}
.game-card-body {
  padding: 10px;
  text-align: center;
}
.game-card-body h4 {
  font-size: 0.8rem;
  color: var(--text-primary);
  margin: 0;
}

/* ===== Category Nav ===== */
.category-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  justify-content: center;
}
.category-nav a {
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--transition);
}
.category-nav a:hover, .category-nav a.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
}

/* ===== Content Block ===== */
.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 30px;
}
.content-block h2 {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
}
.content-block h3 {
  color: var(--primary);
  margin-top: 1.5rem;
}

/* ===== Feature Cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-card h3 { color: var(--accent); }
.feature-card p { color: var(--text-secondary); margin: 0; }

/* ===== CTA Block ===== */
.cta-block {
  background: linear-gradient(135deg, #1e1b4b, #0c4a6e);
  border-radius: var(--radius-xl);
  padding: 50px 40px;
  text-align: center;
  border: 1px solid var(--border-color);
  margin: 30px 0;
}
.cta-block h2 { color: #fff; font-size: 2rem; }
.cta-block p { color: var(--text-secondary); margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-block .btn { margin: 0 8px; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg-card-hover); }
.faq-question .faq-toggle {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.active .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

/* ===== Article List ===== */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-card {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.article-thumb {
  width: 220px;
  min-height: 150px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-card-body { flex: 1; }
.article-card-body h3 { margin-bottom: 8px; }
.article-card-body h3 a { color: var(--text-primary); }
.article-card-body h3 a:hover { color: var(--accent); }
.article-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.article-card-body p { color: var(--text-secondary); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  overflow-wrap: break-word;
  word-break: break-word;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); margin: 0 6px; }
.breadcrumb .current { color: var(--text-secondary); }

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(135deg, var(--bg-darker), #1e1b4b);
  padding: 50px 0 40px;
  border-bottom: 2px solid var(--border-color);
  overflow: hidden;
}
.page-header h1 { margin-bottom: 10px; overflow-wrap: break-word; word-break: break-word; }
.page-header p { color: var(--text-secondary); max-width: 700px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-darker);
  border-top: 2px solid var(--secondary);
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 30px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.footer-col p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-contact p {
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-contact strong { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ===== Steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  counter-increment: step;
  position: relative;
}
.step-card::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 16px;
}

/* ===== Related Links ===== */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.related-links a {
  display: block;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
}
.related-links a:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  color: var(--accent);
}

/* ===== Article Detail ===== */
.article-detail {
  max-width: 850px;
  margin: 0 auto;
  overflow-wrap: break-word;
  word-break: break-word;
}
.article-detail h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}
.article-detail .article-meta {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.article-body p { margin-bottom: 1.2rem; }
.article-body h2 { margin-top: 2rem; border-left: 4px solid var(--accent); padding-left: 16px; }
.article-body h3 { margin-top: 1.5rem; color: var(--primary); }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; }
.recommended-articles {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* ===== Tables ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.info-table th, .info-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.info-table th {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}
.info-table td {
  background: var(--bg-darker);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .header-nav { display: none; }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .game-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .shortcut-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .article-card { flex-direction: column; }
  .article-thumb { width: 100%; min-height: 120px; }
  .content-block { padding: 24px; }
  .cta-block { padding: 30px 20px; }
  .cta-block .btn { display: block; margin: 8px auto; max-width: 280px; }
  .header-logo img, .header-logo svg { max-height: 36px; }
  .shortcut-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .shortcut-item { padding: 16px 8px; }
  .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
}
