*, *::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);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* ── Typography ── */
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.2; }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 140px; border-radius: var(--radius); margin-bottom: 12px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  width: calc(100% - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  border-left: 4px solid var(--primary);
  font-weight: 600;
  font-size: 14px;
}
.toast.success { border-left-color: var(--primary); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--warning); }
.toast i { font-size: 18px; }
.toast.success i { color: var(--primary); }
.toast.error i   { color: var(--danger); }
.toast.info i    { color: var(--warning); }
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* ── Glassmorphism Card ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,200,150,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,200,150,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}
.badge-primary { background: rgba(0,200,150,0.12); color: var(--primary); }
.badge-danger   { background: rgba(255,71,87,0.12); color: var(--danger); }
.badge-warning  { background: rgba(255,165,2,0.12); color: var(--warning); }
.badge-success  { background: rgba(0,200,150,0.12); color: var(--primary); }
.badge-info     { background: rgba(0,180,216,0.12); color: #00B4D8; }
.badge-hot      { background: var(--danger); color: #fff; }
.badge-new      { background: var(--primary); color: #fff; }
.badge-vip      { background: linear-gradient(135deg, #FFD700, #FFA502); color: #fff; }

/* ── Form Elements ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: calc(var(--radius) - 4px);
  background: #fff;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,200,150,0.15); }
.form-control::placeholder { color: #aaa; }
textarea.form-control { resize: vertical; min-height: 100px; }
.input-group { position: relative; }
.input-group .form-control { padding-left: 44px; }
.input-group .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 16px; }

/* ── Sticky Header (Public) ── */
.public-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 36px; border-radius: 8px; }
.site-logo span { font-size: 20px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-nav { display: flex; align-items: center; gap: 12px; }
.header-nav a { font-weight: 600; font-size: 14px; color: var(--text); padding: 8px 14px; border-radius: 8px; transition: all 0.2s; }
.header-nav a:hover { background: var(--card-bg); color: var(--primary); }
.nav-toggle { display: none; font-size: 22px; padding: 6px; color: var(--text); }

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, #0a2f1f 0%, #003d2b 40%, #005740 70%, #003d2b 100%);
  padding: 80px 20px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,200,150,0.15) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: clamp(28px,5vw,52px); color: #fff; margin-bottom: 16px; line-height: 1.15; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 18px; color: rgba(255,255,255,0.75); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.floating-coins { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; overflow: hidden; }
.coin {
  position: absolute;
  font-size: 32px;
  animation: floatCoin linear infinite;
  opacity: 0.25;
}
@keyframes floatCoin {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.25; }
  90%  { opacity: 0.25; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ── Stats Counter ── */
.stats-section { padding: 60px 20px; background: var(--card-bg); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { text-align: center; padding: 28px 20px; background: #fff; border-radius: var(--radius); box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.stat-card .stat-icon { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.stat-card .stat-number { font-size: 28px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.stat-card .stat-label { font-size: 13px; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Section titles ── */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: clamp(22px,4vw,36px); margin-bottom: 8px; }
.section-header p { color: #888; font-size: 16px; }
.section-header .underline {
  width: 60px; height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 2px; margin: 12px auto 0;
}
.section { padding: 60px 20px; }
.container { max-width: 1100px; margin: 0 auto; }

/* ── How It Works ── */
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; }
.step-card { text-align: center; padding: 32px 24px; background: var(--card-bg); border-radius: var(--radius); position: relative; }
.step-number { width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; margin: 0 auto 16px; }
.step-card i { font-size: 36px; color: var(--primary); margin-bottom: 16px; display: block; }
.step-card h3 { font-size: 18px; margin-bottom: 8px; }
.step-card p { color: #888; font-size: 14px; line-height: 1.7; }

/* ── Task Cards (Public) ── */
.tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px; }
.task-card-pub {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.3s;
  overflow: hidden;
}
.task-card-pub:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,200,150,0.15); }
.task-card-pub .task-ribbon {
  position: absolute; top: 0; right: 0;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 12px;
  border-bottom-left-radius: 8px;
  letter-spacing: 0.5px;
}
.task-card-pub .task-ribbon.new { background: var(--primary); }
.task-card-pub .task-ribbon.vip { background: linear-gradient(135deg,#FFD700,#FFA502); }
.task-reward { font-size: 22px; font-weight: 900; color: var(--primary); margin: 12px 0; }
.task-cat-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(0,200,150,0.1); color: var(--primary); font-weight: 700; }

/* ── Top Earners ── */
.earners-list { display: flex; flex-direction: column; gap: 16px; max-width: 700px; margin: 0 auto; }
.earner-card { display: flex; align-items: center; gap: 16px; background: var(--card-bg); padding: 16px 20px; border-radius: var(--radius); }
.earner-rank { font-size: 22px; font-weight: 900; min-width: 36px; color: var(--primary); }
.earner-rank.top-1 { color: #FFD700; }
.earner-rank.top-2 { color: #C0C0C0; }
.earner-rank.top-3 { color: #CD7F32; }
.earner-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 18px; overflow: hidden; flex-shrink: 0; }
.earner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.earner-info { flex: 1; }
.earner-name { font-weight: 700; font-size: 15px; }
.earner-level { font-size: 12px; color: #888; }
.earner-amount { font-weight: 900; font-size: 18px; color: var(--primary); }

/* ── Withdraw Proof Gallery ── */
.proof-grid { columns: 2; gap: 16px; }
@media (min-width: 640px) { .proof-grid { columns: 3; } }
@media (min-width: 900px) { .proof-grid { columns: 4; } }
.proof-item { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.proof-item img { width: 100%; display: block; transition: transform 0.3s; }
.proof-item:hover img { transform: scale(1.05); }

/* ── FAQ Accordion ── */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { background: var(--card-bg); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; cursor: pointer; font-weight: 700; font-size: 15px; gap: 12px; }
.faq-q i.toggle { transition: transform 0.3s; font-size: 14px; color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-q i.toggle { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: #666; font-size: 14px; line-height: 1.8; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-inner { padding: 0 20px 18px; }

/* ── Footer ── */
.public-footer { background: #0a1628; color: #ccc; padding: 60px 20px 30px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; max-width: 1100px; margin: 0 auto 40px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand .site-logo span { -webkit-text-fill-color: #fff; }
.footer-brand p { font-size: 14px; color: #888; line-height: 1.8; }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 16px; transition: all 0.2s; }
.social-links a:hover { background: var(--primary); color: #fff; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #888; font-size: 14px; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: #666; }

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a2f1f, #003d2b);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card { background: #fff; border-radius: 20px; padding: 36px 32px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-text { font-size: 28px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: #888; font-size: 14px; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #888; }
.auth-footer a { color: var(--primary); font-weight: 700; }
.captcha-box { background: var(--card-bg); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.captcha-q { font-weight: 700; color: var(--text); font-size: 16px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.alert-error { background: rgba(255,71,87,0.1); color: var(--danger); border: 1px solid rgba(255,71,87,0.2); }
.alert-success { background: rgba(0,200,150,0.1); color: var(--primary); border: 1px solid rgba(0,200,150,0.2); }

/* ── Announcement Banner ── */
.announcement-bar { padding: 10px 20px; text-align: center; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.announcement-bar a { color: inherit; text-decoration: underline; }

/* ── Pagination ── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--card-bg); font-weight: 700; font-size: 14px; color: var(--text); transition: all 0.2s; }
.page-btn.active { background: var(--primary); color: #fff; }
.page-btn:hover:not(.active) { background: var(--primary); color: #fff; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 20px; padding: 28px; max-width: 480px; width: 100%; animation: slideUp 0.3s ease; max-height: 90vh; overflow-y: auto; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; }
.modal-close { font-size: 20px; color: #aaa; cursor: pointer; transition: color 0.2s; }
.modal-close:hover { color: var(--danger); }

/* ── Image Lightbox ── */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000; display: none; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; font-size: 28px; color: #fff; cursor: pointer; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .auth-card { padding: 28px 20px; }
  .hero { padding: 60px 16px 80px; }
  .header-nav .btn { display: none; }
  .nav-toggle { display: block; }
}

/* ── Footer (enhanced) ──────────────────────────────────────────────────── */
.public-footer { position: relative; }
.public-footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}
.footer-dev {
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 14px 0 2px;
  display: flex; justify-content: center; align-items: center; text-align: center;
}
.footer-dev-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin: 0 auto; float: none; position: static;
  padding: 7px 16px; border-radius: 99px; text-decoration: none;
  font-size: 12px; line-height: 1.2; font-weight: 700; color: #cfd8e3; white-space: nowrap;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  transition: all .3s;
}
.footer-dev-link b {
  font-weight: 900; letter-spacing: .4px;
  background: linear-gradient(90deg, #00e5b0, #7dffd9);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-dev-link i { color: #29b6f6; font-size: 14px; }
.footer-dev-link:hover {
  transform: translateY(-2px); color: #fff;
  border-color: rgba(0,229,176,.5); background: rgba(0,229,176,.1);
  box-shadow: 0 10px 30px rgba(0,200,150,.25);
}

/* ── Brand logo (image only — set from Admin → Settings) ─────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.brand-logo { display: block; height: 36px; width: auto; max-width: 200px; object-fit: contain; border-radius: 8px; }
.brand-logo-lg { height: 56px; max-width: 240px; margin: 0 auto; }
.brand-logo-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 36px; border-radius: 10px; font-size: 16px;
  border: 2px dashed rgba(128,128,128,.45); color: rgba(128,128,128,.7);
}
.brand-logo-placeholder.brand-logo-lg { width: 72px; height: 56px; font-size: 22px; margin: 0 auto; }
.auth-logo .brand-logo-wrap { display: flex; justify-content: center; margin-bottom: 8px; }
