/* 399bet.it.com - Design System */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --accent: #fbbf24;
  --accent-dark: #f59e0b;
  --accent-light: #fde68a;
  --bg-dark: #0a0a0a;
  --bg-section: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --text-white: #ffffff;
  --text-light: #d1d5db;
  --text-muted: #9ca3af;
  --text-gold: #fbbf24;
  --border-color: #2a2a2a;
  --border-accent: #0d9488;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --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);
  --shadow-glow: 0 0 20px rgba(13,148,136,0.15);
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans Bengali", sans-serif;
  --max-w: 1280px;
  --header-h: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-stack);
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ======== HEADER ======== */
.site-header {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top-bar {
  background: var(--primary-dark);
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-white);
  overflow: hidden;
}

.header-top-bar .marquee-text {
  white-space: nowrap;
  display: inline-block;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.header-logo img, .header-logo svg {
  max-height: 44px;
  width: auto;
  display: block;
}

.header-nav { display: flex; align-items: center; gap: 4px; }

.header-nav a {
  color: var(--text-white);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.header-nav a:hover, .header-nav a.active {
  background: rgba(13,148,136,0.15);
  color: var(--accent);
}

.header-cta { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-register {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #0a0a0a;
}

.btn-register:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(251,191,36,0.3); color: #0a0a0a; }

.btn-login {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-login:hover { background: var(--accent); color: #0a0a0a; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-white);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
}

/* ======== BOTTOM NAV ======== */
.header-bottom-nav {
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-color);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.bottom-nav-inner::-webkit-scrollbar { display: none; }

.bottom-nav-inner a {
  color: var(--text-white);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.bottom-nav-inner a:hover, .bottom-nav-inner a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ======== BANNER ======== */
.hero-banner {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-banner img, .hero-banner svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ======== SECTIONS ======== */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-section); }
.section-dark { background: var(--bg-dark); }

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h1 {
  color: var(--text-gold);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.section-title h2 {
  color: var(--text-gold);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.title-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 16px auto;
  border-radius: 2px;
}

/* ======== CARDS ======== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.card h3 {
  color: var(--text-white);
  font-size: 18px;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(13,148,136,0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg { width: 24px; height: 24px; fill: var(--primary-light); }

/* ======== SHORTCUT GRID ======== */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.shortcut-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.3s;
  display: block;
}

.shortcut-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.shortcut-item h4 {
  color: var(--text-white);
  font-size: 15px;
  font-weight: 600;
  margin-top: 10px;
}

.shortcut-item p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* ======== CONTENT AREA ======== */
.content-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  max-height: 600px;
  overflow-y: auto;
  line-height: 1.8;
}

.content-area::-webkit-scrollbar { width: 8px; }
.content-area::-webkit-scrollbar-track { background: var(--bg-dark); }
.content-area::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 4px; }

.content-area h2 {
  color: var(--text-gold);
  font-size: 22px;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.content-area h3 {
  color: var(--text-white);
  font-size: 18px;
  margin: 20px 0 10px;
}

.content-area p {
  margin-bottom: 14px;
  color: var(--text-light);
}

.content-area ul, .content-area ol {
  margin: 12px 0 16px 24px;
}

.content-area li {
  margin-bottom: 8px;
  color: var(--text-light);
}

.content-area a {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ======== NEWS CARDS ======== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s;
}

.news-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.news-card-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-dark), var(--bg-section));
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-img span {
  color: var(--primary-light);
  font-size: 14px;
  opacity: 0.6;
}

.news-card-body {
  padding: 20px;
}

.news-card-body h3 {
  color: var(--text-white);
  font-size: 17px;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-body h3 a { color: var(--text-white); }
.news-card-body h3 a:hover { color: var(--accent); }

.news-card-body .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.news-card-body p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-body .read-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 600;
}

/* ======== FAQ ======== */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-white);
  transition: background 0.2s;
}

.faq-question:hover { background: rgba(13,148,136,0.08); }

.faq-question .faq-toggle {
  font-size: 20px;
  color: var(--primary-light);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-toggle { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 24px;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 18px;
}

/* ======== CTA BLOCK ======== */
.cta-block {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
}

.cta-block h2 {
  color: var(--text-white);
  font-size: 28px;
  margin-bottom: 14px;
}

.cta-block p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-block .btn { font-size: 16px; padding: 14px 36px; }

/* ======== FOOTER ======== */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  padding: 50px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand .footer-logo { max-height: 40px; margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.footer-col h4 {
  color: var(--text-gold);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--primary-light); }

.footer-contact p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-contact strong { color: var(--text-light); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ======== BREADCRUMB ======== */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb span { margin: 0 6px; }

/* ======== PAGE HERO ======== */
.page-hero {
  background: linear-gradient(135deg, var(--bg-section), var(--primary-dark));
  padding: 50px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
  color: var(--text-gold);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-light);
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto;
}

/* ======== ARTICLE DETAIL ======== */
.article-header { margin-bottom: 24px; overflow: hidden; }
.article-header h1 { color: var(--text-gold); font-size: 30px; margin-bottom: 10px; word-wrap: break-word; overflow-wrap: break-word; line-height: 1.3; }
.article-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.article-body { word-wrap: break-word; overflow-wrap: break-word; overflow: hidden; }
.article-body h2 { color: var(--text-gold); font-size: 22px; margin: 28px 0 12px; word-wrap: break-word; overflow-wrap: break-word; }
.article-body h3 { color: var(--text-white); font-size: 18px; margin: 20px 0 10px; }
.article-body p { margin-bottom: 14px; word-wrap: break-word; overflow-wrap: break-word; }
.article-body ul, .article-body ol { margin: 10px 0 16px 24px; }
.article-body li { margin-bottom: 6px; }

.related-articles { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.related-articles h3 { color: var(--text-gold); font-size: 20px; margin-bottom: 16px; }

/* ======== STEP LIST ======== */
.step-list { counter-reset: step; max-width: 700px; }
.step-item {
  counter-increment: step;
  padding: 20px 20px 20px 70px;
  position: relative;
  border-left: 2px solid var(--border-color);
  margin-bottom: 4px;
}

.step-item::before {
  content: counter(step);
  position: absolute;
  left: -17px;
  top: 18px;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.step-item h4 { color: var(--text-white); font-size: 16px; margin-bottom: 6px; }
.step-item p { color: var(--text-muted); font-size: 14px; }

/* ======== TABLE ======== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.info-table th, .info-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 14px;
}

.info-table th {
  background: var(--primary-dark);
  color: var(--text-white);
  font-weight: 600;
}

.info-table td { color: var(--text-light); }
.info-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ======== MOBILE NAV (default hidden) ======== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,10,10,0.98);
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mobile-nav.open { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.mobile-nav-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 36px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.mobile-nav-close:hover { background: rgba(255,255,255,0.1); }

.mobile-nav-links {
  list-style: none;
  padding: 60px 0 0;
}

.mobile-nav-links li { }

.mobile-nav-links a {
  display: block;
  padding: 14px 0;
  color: var(--text-white);
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav-links a:hover {
  color: var(--accent);
  padding-left: 8px;
}

.mobile-nav-cta {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.mobile-nav-cta .btn { flex: 1; text-align: center; }

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .header-nav { display: none; }
  .header-cta { display: none; }
  .mobile-menu-btn { display: block; }
  .header-logo img, .header-logo svg { max-height: 36px; }
  .bottom-nav-inner { justify-content: flex-start; padding: 0 10px; }
  .bottom-nav-inner a { padding: 12px 14px; font-size: 13px; }
  .section { padding: 40px 0; }
  .section-title h2 { font-size: 22px; }
  .page-hero h1 { font-size: 24px; }
  .page-hero { padding: 36px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
  .content-area { padding: 24px 20px; max-height: 450px; }
  .cta-block { padding: 36px 24px; }
  .cta-block h2 { font-size: 22px; }
  .step-list { padding-left: 10px; }
}

@media (max-width: 480px) {
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shortcut-item { padding: 16px 10px; }
  .section { padding: 30px 0; }
  .page-hero h1 { font-size: 20px; }
  .section-title h2 { font-size: 20px; }
  .cta-block h2 { font-size: 20px; }
  .footer-grid { gap: 24px; }
}
