/* 888bet app - Original Design System */
:root {
  --bg: #0a0e1a;
  --bg-soft: #111827;
  --bg-alt: #0f1629;
  --card: #141b2d;
  --card-hover: #1a2340;
  --line: rgba(255,255,255,.08);
  --text: #f0f2f5;
  --text-muted: #94a3b8;
  --primary: #e94560;
  --primary-dark: #c23152;
  --secondary: #0f3460;
  --accent: #16213e;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,.35);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.2);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans Bengali", sans-serif;
  --max-w: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: #ff6b81; }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(10,14,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 16px rgba(0,0,0,.4);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-wrap {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
}

.brand-text { min-width: 0; line-height: 1.05; }
.brand-text strong, .brand-text span {
  display: block;
  white-space: nowrap;
  font-size: 15px;
  color: var(--text);
}
.brand-text strong { font-weight: 800; font-size: 17px; color: var(--primary); }

.primary-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.8vw, 14px);
  overflow: hidden;
  flex-wrap: nowrap;
}

.primary-nav a {
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1;
  padding: 10px clamp(4px, 0.5vw, 8px);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover, .primary-nav a.active {
  color: #fff;
  border-bottom-color: var(--primary);
}

.header-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s;
  border: none;
  cursor: pointer;
}

.btn-register {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(233,69,96,.3);
}
.btn-register:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

.btn-login {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-login:hover { background: rgba(255,255,255,.06); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}

.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

/* ===== HERO ===== */
.hero-section {
  padding: 100px 0 60px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--accent) 50%, var(--secondary) 100%);
}

.hero-inner { padding-top: 60px; }
.hero-about, .hero-policy, .hero-faq, .hero-auth, .hero-404 {
  padding: 80px 0 50px;
  text-align: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(233,69,96,.15);
  border: 1px solid rgba(233,69,96,.3);
  color: #fca5a5;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 24px 0 12px;
}

h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }

.hero-lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero-img { border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-img-small { max-width: 400px; margin: 24px auto; }

/* ===== CONTENT SECTIONS ===== */
.content-section { padding: 72px 0; }
.alt-bg { background: var(--bg-alt); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 36px;
  align-items: start;
}

.content-grid.reverse { direction: rtl; }
.content-grid.reverse > * { direction: ltr; }

.prose { max-width: 820px; }
.centered-prose { max-width: 820px; margin: 0 auto; }

.prose p, .centered-prose p {
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 18px;
  color: var(--text-muted);
}

.prose h2, .centered-prose h2 { color: var(--text); }
.prose h3, .centered-prose h3 { color: var(--text); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header p { color: var(--text-muted); font-size: 17px; max-width: 700px; margin: 0 auto; }

.section-image { margin: 36px auto 0; text-align: center; }
.section-image img { max-width: 900px; margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.aside-img { border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }

/* ===== CARDS ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card, .step-card, .testimonial-card, .faq-item, .notice-card, .pricing-card, .related-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
}

.feature-card:hover, .step-card:hover, .related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pricing-card.highlight { border-color: var(--primary); transform: translateY(-6px); }
.pricing-badge { display: inline-block; background: var(--primary); color: #fff; padding: 4px 14px; border-radius: 999px; font-size: 13px; margin-bottom: 12px; }
.price-tag { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 8px 0 16px; }
.pricing-card ul { list-style: none; margin: 0 0 20px; }
.pricing-card li { padding: 6px 0; color: var(--text-muted); border-bottom: 1px solid var(--line); }
.pricing-card li::before { content: "\2713 "; color: var(--success); font-weight: 700; }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.stars { color: #fbbf24; letter-spacing: 2px; font-size: 18px; }
.user-meta { color: var(--text-muted); font-size: 14px; margin-top: 12px; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.faq-large .faq-item { padding: 28px; }
.faq-item h3 { font-size: 1.1rem; margin: 0 0 10px; color: var(--text); }
.faq-item p { color: var(--text-muted); line-height: 1.75; }

.feature-list, .tips-list { margin: 16px 0; padding-left: 20px; }
.feature-list li, .tips-list li { margin-bottom: 12px; color: var(--text-muted); line-height: 1.7; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: rgba(233,69,96,.08); color: var(--text); font-weight: 700; }
td { color: var(--text-muted); }

/* ===== BREADCRUMB ===== */
.breadcrumb { padding: 16px 20px; max-width: var(--max-w); margin: 0 auto; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.breadcrumb li::after { content: "/"; margin-left: 8px; color: var(--text-muted); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li[aria-current] { color: var(--text); }

/* ===== AUTH ===== */
.auth-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }

/* ===== NOTICE ===== */
.notice-card { margin-bottom: 20px; border-left: 3px solid var(--primary); }
.notice-card h3 { margin-top: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: #050810;
  border-top: 1px solid var(--line);
  padding: 60px 0 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo strong { color: var(--text); font-size: 17px; }
.footer-desc { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.footer-contact p { color: var(--text-muted); font-size: 14px; margin-bottom: 6px; }
.footer-contact a { color: var(--text-muted); }
.footer-contact a:hover { color: var(--primary); }

.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer-col h4 { color: var(--text); margin-bottom: 16px; font-size: 16px; }
.footer-link-item { margin-bottom: 8px; }
.footer-link-item a { color: var(--text-muted); font-size: 14px; transition: color .2s; }
.footer-link-item a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-bottom p { color: var(--text-muted); font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-inner {
    min-height: 68px;
    gap: 10px;
  }

  .brand-wrap { height: 48px; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .brand-text strong, .brand-text span { max-width: 86px; }

  .primary-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 999;
  }

  .primary-nav.is-open { display: flex; }

  .primary-nav a {
    max-width: none;
    width: 100%;
    padding: 14px 12px;
    text-overflow: initial;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .primary-nav a:last-child { border-bottom: none; }

  .header-actions { justify-content: flex-end; gap: 6px; }
  .header-actions .btn { min-height: 38px; padding: 0 12px; font-size: 13px; }

  .nav-toggle { display: inline-flex; }

  .hero-section { padding: 80px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .content-section { padding: 48px 0; }
  .content-grid { grid-template-columns: 1fr; }
  .content-grid.reverse { direction: ltr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 414px) {
  .header-inner { padding: 0 12px; gap: 6px; }
  .brand-wrap { width: 120px; min-width: 120px; max-width: 120px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}
