/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #0b0e11;
  --bg-secondary:  #131720;
  --bg-card:       #1a1f2e;
  --bg-card-hover: #1e2436;
  --border:        rgba(255,255,255,.07);
  --yellow:        #f0b90b;
  --yellow-dim:    rgba(240,185,11,.15);
  --green:         #0ecb81;
  --green-dim:     rgba(14,203,129,.12);
  --red:           #f6465d;
  --red-dim:       rgba(246,70,93,.12);
  --blue:          #2196f3;
  --blue-dim:      rgba(33,150,243,.12);
  --text-primary:  #eaecef;
  --text-secondary:#848e9c;
  --text-muted:    #5a6170;
  --font:          'Inter', system-ui, sans-serif;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow:        0 4px 24px rgba(0,0,0,.4);
  --shadow-glow:   0 0 40px rgba(240,185,11,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
.gradient-text {
  background: linear-gradient(135deg, var(--yellow) 0%, #ff9f0a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-green  { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red    { color: var(--red); }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--yellow);
  color: #1a1200;
}
.btn-primary:hover { background: #ffd234; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(240,185,11,.3); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }

.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  background: #229ED9;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  margin-top: .75rem;
  transition: all .2s;
}
.btn-telegram:hover { background: #1e8dc1; transform: translateY(-1px); }

.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,14,17,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(240,185,11,.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* =========================================
   LANGUAGE SELECTOR
   ========================================= */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: .45rem .8rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  font-family: var(--font);
  white-space: nowrap;
}
.lang-btn:hover { border-color: var(--yellow); color: var(--yellow); }

.lang-flag { font-size: 1rem; line-height: 1; }
.lang-code { font-size: .82rem; letter-spacing: .02em; }
.lang-arrow { transition: transform .2s; flex-shrink: 0; }
.lang-btn[aria-expanded="true"] .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0,0,0,.55);
  list-style: none;
  padding: .35rem 0;
  min-width: 160px;
  z-index: 200;
  animation: revealUp .18s ease;
}
.lang-dropdown.open { display: block; }

.lang-option {
  padding: .55rem 1rem;
  font-size: .9rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.lang-option:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }
.lang-option.active { color: var(--yellow); font-weight: 600; }

/* RTL support */
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .step-reverse { direction: ltr; }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(240,185,11,.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(14,203,129,.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
}

/* Hero avatar */
.hero-avatar-wrap {
  margin-bottom: 1.5rem;
}

.hero-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--yellow);
  box-shadow: 0 0 32px rgba(240,185,11,.35);
}

.badge {
  display: inline-block;
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(240,185,11,.3);
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* =========================================
   STATS GRID
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-green { border-color: rgba(14,203,129,.25); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(14,203,129,.05) 100%); }

.stat-label {
  font-size: .78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .35rem;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--green);
}
.stat-card:not(.stat-green) .stat-value { color: var(--text-primary); }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   INFO STRIP
   ========================================= */
.info-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.info-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.info-icon { font-size: 1.4rem; }

.info-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.info-lbl {
  font-size: .78rem;
  color: var(--text-secondary);
}

.info-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* =========================================
   SECTION HEADER
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: .75rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* =========================================
   RULES SECTION
   ========================================= */
.rules-section {
  padding: 5rem 0;
  background: var(--bg-primary);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.rule-card {
  display: flex;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform .2s, box-shadow .2s;
}
.rule-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.rule-info    { border-left: 3px solid var(--blue); }
.rule-warning { border-left: 3px solid var(--yellow); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(240,185,11,.04) 100%); }
.rule-telegram { border-left: 3px solid #229ED9; background: linear-gradient(135deg, var(--bg-card) 0%, rgba(34,158,217,.06) 100%); }
.rule-danger  { border-left: 3px solid var(--red); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(246,70,93,.05) 100%); }

.rule-icon { font-size: 1.6rem; flex-shrink: 0; }

.rule-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .45rem;
  color: var(--text-primary);
}

.rule-content p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =========================================
   GUIDE SECTION
   ========================================= */
.guide-section {
  padding: 5rem 0;
  background: var(--bg-secondary);
}

/* ---- Guide Tabs ---- */
.guide-tabs {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 3rem;
}

.guide-tab {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  padding: .65rem 1.75rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  font-family: var(--font);
}
.guide-tab:hover { border-color: var(--yellow); color: var(--text-primary); }
.guide-tab.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #000;
}

/* ---- Tab panels ---- */
.tab-panel { animation: revealUp .4s ease both; }
.tab-panel.hidden { display: none; }

/* ---- Web step cards ---- */
.web-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 780px;
  margin: 0 auto;
}

.web-step-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  align-items: start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.web-step-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.45); }

.web-step-icon {
  font-size: 1.75rem;
  line-height: 1;
  text-align: center;
  padding-top: .25rem;
}

.web-step-body { display: flex; flex-direction: column; gap: .5rem; }

.web-step-num {
  font-size: .75rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.web-step-body h3 { font-size: 1.1rem; font-weight: 700; }
.web-step-body p  { font-size: .9rem; color: var(--text-secondary); line-height: 1.7; }

.link-yellow { color: var(--yellow); text-decoration: none; }
.link-yellow:hover { text-decoration: underline; }

.web-step-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: .75rem;
  display: block;
}

.steps { display: flex; flex-direction: column; gap: 4rem; }

.step {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: center;
}

.step-reverse { direction: rtl; }
.step-reverse > * { direction: ltr; }

.step-num {
  font-size: 4rem;
  font-weight: 900;
  color: var(--yellow);
  opacity: .25;
  line-height: 1;
  margin-bottom: .5rem;
}

.step-text h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.step-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.step-tip {
  display: flex;
  gap: .5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .88rem;
  color: var(--text-secondary);
}

.step-highlight {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--yellow-dim);
  border: 1px solid rgba(240,185,11,.3);
  border-radius: 8px;
  padding: .6rem 1rem;
  margin-top: .5rem;
}

.highlight-label { font-size: .82rem; color: var(--text-secondary); }
.highlight-value  { font-size: 1rem; font-weight: 700; color: var(--yellow); font-family: monospace; }

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  margin-top: .75rem;
}

.mini-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.ms-label { font-size: .75rem; color: var(--text-muted); }
.ms-val   { font-size: 1rem; font-weight: 700; }

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .5rem;
}

.check-list li {
  font-size: .9rem;
  padding: .5rem .75rem;
  border-radius: 8px;
}

.check-yes { background: var(--green-dim); color: var(--text-primary); }
.check-no  { background: var(--red-dim);   color: var(--text-primary); }

/* Step image */
.step-image-wrap {
  display: flex;
  justify-content: center;
}

.step-img {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  object-fit: contain;
  background: var(--bg-card);
}

/* Fallback when image not found */
.step-img[src=""] , .step-img:not([src]) {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(240,185,11,.04) 50%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.cta-inner p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 2.5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(240,185,11,.4);
}

.footer-disclaimer {
  max-width: 620px;
  font-size: .82rem;
  color: var(--text-secondary);
  background: rgba(246,70,93,.07);
  border: 1px solid rgba(246,70,93,.2);
  border-radius: 8px;
  padding: .75rem 1rem;
  line-height: 1.6;
}

.footer-copy {
  font-size: .8rem;
  color: var(--text-muted);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  /* Navbar */
  .nav-logo > span { display: none; }
  .nav-actions { gap: .4rem; }
  .lang-code { display: none; }
  .lang-arrow { display: none; }
  .lang-btn { padding: .4rem .5rem; }
  .nav-cta .nav-label { display: none; }
  .nav-actions .btn-outline { padding: .45rem .5rem; }
  .nav-actions .btn-primary { font-size: .78rem; padding: .45rem .75rem; }

  /* Layout */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .info-strip-inner { gap: 1rem; }
  .info-divider { display: none; }

  .step, .step-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 1.5rem;
  }
  .step-reverse { direction: ltr; }
  .step-image-wrap { order: -1; }
  .step-img { max-width: 100%; }

  .rules-grid { grid-template-columns: 1fr; }
  .web-step-card { grid-template-columns: 40px 1fr; gap: 1rem; padding: 1.25rem; }
  .guide-tab { padding: .55rem 1.1rem; font-size: .88rem; }

  .hero { padding: 3.5rem 0 3rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2rem; }
  .step-num { font-size: 2.8rem; }
  /* Rút gọn CTA thành icon + emoji trên màn hình nhỏ */
  .nav-actions .btn-primary { font-size: .75rem; padding: .4rem .6rem; }
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 32px rgba(240,185,11,.35); }
  50%       { box-shadow: 0 0 52px rgba(240,185,11,.6); }
}
@keyframes badgePop {
  0%   { opacity: 0; transform: scale(.6); }
  70%  { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(240,185,11,.3); }
  50%       { box-shadow: 0 4px 32px rgba(240,185,11,.6); }
}

/* Hero — plays on page load */
.hero-avatar-wrap { animation: floatY 3.5s ease-in-out infinite; }
.hero-avatar      { animation: pulseGlow 3s ease-in-out infinite; }
.badge            { animation: badgePop .6s cubic-bezier(.34,1.56,.64,1) .2s both; }
.hero-title       { animation: heroSlideUp .7s ease .35s both; }
.hero-desc        { animation: heroSlideUp .7s ease .5s both; }
.hero-actions     { animation: heroSlideUp .7s ease .65s both; }
.stats-grid       { animation: heroSlideUp .7s ease .8s both; }

/* Animated gradient */
.gradient-text {
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

/* Scroll reveal — initially hidden */
.reveal, .reveal-left, .reveal-right { opacity: 0; }

.reveal.visible       { animation: revealUp    .65s cubic-bezier(.22,.61,.36,1) both; }
.reveal-left.visible  { animation: revealLeft  .65s cubic-bezier(.22,.61,.36,1) both; }
.reveal-right.visible { animation: revealRight .65s cubic-bezier(.22,.61,.36,1) both; }

/* Hover lift effects */
.stat-card { transition: transform .25s ease, box-shadow .25s ease, background .2s; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.rule-card { transition: transform .25s ease, box-shadow .25s ease, background .2s; }
.step-image-wrap { transition: transform .3s ease; }
.step-image-wrap:hover { transform: scale(1.025); }

/* CTA button glow */
.btn-primary { animation: btnGlow 2.5s ease-in-out infinite; }
.btn-primary:hover { animation: none; }
