/* ZoneWall - Main Stylesheet */
/* Font: Sora + Space Mono | Theme: Clean White + Blue Accent */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #10b981;
  --accent-dark: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-silver: 1px solid #c8d6e5;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 24px rgba(37,99,235,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Sora', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

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

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-silver);
  padding: 0 20px;
}
.nav-container {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 1.1rem;
  color: var(--text);
}
.brand-icon { font-size: 1.3rem; }
.nav-menu {
  display: flex; list-style: none; gap: 28px; align-items: center;
}
.nav-menu a {
  text-decoration: none; color: var(--text-muted); font-size: 0.9rem;
  font-weight: 500; transition: var(--transition);
}
.nav-menu a:hover { color: var(--primary); }
.nav-toggle {
  display: none; background: none; border: none;
  flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}
.btn-logout {
  background: #fee2e2; color: #dc2626 !important;
  padding: 6px 16px; border-radius: var(--radius-sm);
  font-size: 0.85rem !important;
}
.btn-logout:hover { background: #fecaca !important; color: #dc2626 !important; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: var(--border-silver);
    flex-direction: column; gap: 0;
    padding: 8px 0; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 24px; font-size: 1rem !important; }
}

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 50%, #f0fdf4 100%);
  padding: 80px 0 60px;
  min-height: 80vh; display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 700px 500px at 70% 50%, rgba(37,99,235,0.06) 0%, transparent 70%),
              radial-gradient(ellipse 500px 400px at 10% 80%, rgba(16,185,129,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 540px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  padding: 6px 16px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
  border: 1px solid rgba(37,99,235,0.15);
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 16px;
  background: linear-gradient(135deg, #0f172a 30%, #2563eb);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.1rem; color: var(--text-muted);
  margin-bottom: 36px; line-height: 1.7;
}

/* Login Card */
.login-card {
  background: var(--card-bg); border-radius: 16px;
  padding: 28px; border: var(--border-silver);
  box-shadow: var(--shadow-md);
}
.login-card h3 {
  font-size: 1rem; font-weight: 600;
  margin-bottom: 18px; color: var(--text);
}
.input-group {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 14px; background: #f8fafc;
  margin-bottom: 12px; transition: var(--transition);
}
.input-group:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.input-icon { color: var(--text-muted); font-size: 1rem; }
.input-group input {
  border: none; background: transparent; outline: none;
  padding: 13px 0; font-family: var(--font); font-size: 0.95rem;
  color: var(--text); width: 100%;
}
.input-group input::placeholder { color: var(--text-light); }
.login-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 12px; text-align: center; }

/* Buttons */
.btn-primary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 13px 22px; font-family: var(--font);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-full { width: 100%; }

.alert-error {
  background: #fee2e2; color: #dc2626;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; margin-bottom: 14px;
  border: 1px solid #fecaca;
}

/* ===== STATS ===== */
.stats-section { padding: 60px 0; background: #fff; border-top: var(--border-silver); border-bottom: var(--border-silver); }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.stat-card {
  text-align: center; padding: 32px 20px;
  border-radius: var(--radius); border: var(--border-silver);
  background: var(--bg); box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 2rem; margin-bottom: 12px; }
.stat-number { font-size: 2rem; font-weight: 800; font-family: var(--font-mono); color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr; } }

/* ===== HOW IT WORKS ===== */
.how-section { padding: 72px 0; }
.section-title {
  text-align: center; font-size: 1.75rem; font-weight: 800;
  margin-bottom: 48px; color: var(--text);
}
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step-card {
  padding: 32px 24px; border-radius: var(--radius);
  border: var(--border-silver); background: var(--card-bg);
  box-shadow: var(--shadow); position: relative;
  overflow: hidden; transition: var(--transition);
}
.step-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #bfdbfe; }
.step-num {
  position: absolute; top: 20px; right: 20px;
  font-family: var(--font-mono); font-size: 2.5rem;
  font-weight: 700; color: #e2e8f0; line-height: 1;
}
.step-icon { font-size: 1.8rem; margin-bottom: 14px; }
.step-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; }

@media (max-width: 700px) { .steps-grid { grid-template-columns: 1fr; } }

/* ===== PAYMENTS TABLE ===== */
.payments-section { padding: 60px 0; background: #fff; border-top: var(--border-silver); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: var(--border-silver); }
.pay-table { width: 100%; border-collapse: collapse; }
.pay-table th {
  background: #f1f5f9; padding: 12px 16px;
  text-align: left; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); font-weight: 600;
  border-bottom: var(--border-silver);
}
.pay-table td {
  padding: 12px 16px; font-size: 0.875rem;
  border-bottom: 1px solid #f1f5f9; color: var(--text);
}
.pay-table tr:last-child td { border-bottom: none; }
.pay-table tr:hover td { background: #f8fafc; }
.amount-col { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.currency-badge {
  display: inline-block; background: var(--primary-light);
  color: var(--primary); padding: 2px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; font-family: var(--font-mono);
}
.empty-row { text-align: center; color: var(--text-muted); padding: 32px !important; font-size: 0.875rem; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ===== FOOTER ===== */
.footer {
  background: #1e293b; color: #94a3b8;
  text-align: center; padding: 24px;
  font-size: 0.85rem; margin-top: auto;
}
.footer a { color: #7dd3fc; text-decoration: none; }

/* ===== DASHBOARD ===== */
.dashboard-body { background: var(--bg); }
.dash-container { max-width: 1100px; margin: 0 auto; padding: 36px 20px; }

/* Full Width Balance Card */
.balance-card-full {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0284c7 100%);
  border-radius: 18px; padding: 36px 40px;
  margin-bottom: 32px;
  box-shadow: 0 8px 40px rgba(37,99,235,0.28);
  position: relative; overflow: hidden;
}
.balance-card-full::before {
  content: ''; position: absolute;
  top: -60px; right: -60px; width: 220px; height: 220px;
  background: rgba(255,255,255,0.06); border-radius: 50%;
}
.balance-card-full::after {
  content: ''; position: absolute;
  bottom: -80px; left: 40%; width: 300px; height: 300px;
  background: rgba(255,255,255,0.04); border-radius: 50%;
}
.balance-card-inner {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1; flex-wrap: wrap; gap: 24px;
}
.balance-left { flex: 1; min-width: 240px; }
.balance-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.balance-label { color: rgba(255,255,255,0.75); font-size: 0.9rem; font-weight: 500; }
.reload-btn {
  background: rgba(255,255,255,0.15); border: none;
  color: #fff; width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; font-size: 1rem;
  transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.reload-btn:hover { background: rgba(255,255,255,0.25); transform: rotate(180deg); }
.balance-amount {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; font-family: var(--font-mono);
  color: #fff; line-height: 1; margin-bottom: 8px;
}
.bal-unit { font-size: 1rem; opacity: 0.65; font-weight: 400; }
.balance-usd { font-size: 1rem; color: rgba(255,255,255,0.75); margin-bottom: 6px; }
.balance-info { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

.balance-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 20px;
}
.balance-stats { display: flex; gap: 28px; }
.bstat { text-align: center; }
.bstat-val { font-size: 1.2rem; font-weight: 700; color: #fff; font-family: var(--font-mono); }
.bstat-lbl { font-size: 0.72rem; color: rgba(255,255,255,0.6); margin-top: 3px; }

.btn-withdraw-open {
  background: #fff; color: var(--primary);
  border: none; border-radius: 10px;
  padding: 14px 32px; font-family: var(--font);
  font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: var(--transition); white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-withdraw-open:hover { background: #eff6ff; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
  border: var(--border-silver);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 16px; border-bottom: var(--border-silver);
}
.modal-head h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: #f1f5f9; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 0.9rem; color: var(--text-muted); transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }
.modal-body { padding: 20px 24px 24px; }
.modal-field { margin-bottom: 16px; }
.modal-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.modal-input-static {
  padding: 11px 14px; background: #f1f5f9;
  border-radius: var(--radius-sm); font-size: 0.875rem;
  color: var(--text); border: var(--border-silver); font-weight: 500;
}
.modal-balance-display {
  display: flex; align-items: baseline; gap: 8px;
  padding: 11px 14px; background: var(--primary-light);
  border-radius: var(--radius-sm); border: 1px solid rgba(37,99,235,0.2);
}
.modal-coins { font-size: 1.6rem; font-weight: 800; font-family: var(--font-mono); color: var(--primary); }
.modal-coins-label { font-size: 0.8rem; color: var(--primary); opacity: 0.7; font-weight: 600; }
.modal-convert-box {
  background: #f8fafc; border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 16px;
  border: var(--border-silver);
}
.convert-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.875rem; padding: 4px 0;
}
.convert-row.small { font-size: 0.78rem; color: var(--text-muted); }
.convert-row strong { font-family: var(--font-mono); color: var(--accent); font-size: 1rem; }
.modal-submit-btn { margin-top: 4px; }

@media (max-width: 700px) {
  .balance-card-full { padding: 24px 20px; }
  .balance-card-inner { flex-direction: column; align-items: flex-start; }
  .balance-right { align-items: flex-start; width: 100%; }
  .balance-stats { width: 100%; justify-content: space-between; }
  .btn-withdraw-open { width: 100%; justify-content: center; }
}

.select-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font);
  font-size: 0.9rem; background: #f8fafc; color: var(--text);
  margin-bottom: 12px; outline: none; cursor: pointer;
  transition: var(--transition);
}
.select-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.convert-preview {
  background: var(--primary-light); color: var(--primary);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-family: var(--font-mono);
  margin-bottom: 14px; min-height: 40px;
}
.wd-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 10px; }

.section-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px; padding-top: 8px;
}
.section-head h2 { font-size: 1.2rem; font-weight: 700; }
.section-head span { color: var(--text-muted); font-size: 0.875rem; }

/* Offerwall */
.offerwall-card {
  border-radius: var(--radius); border: var(--border-silver);
  overflow: hidden; margin-bottom: 40px; box-shadow: var(--shadow);
}
.offerwall-iframe { width: 100%; height: 600px; display: block; }
.offerwall-wrapper { position: relative; min-height: 200px; }
.offerwall-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 24px; gap: 16px;
  color: var(--text-muted); font-size: 0.9rem;
  background: #f8fafc;
}
.ow-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  animation: owspin 0.8s linear infinite;
}
@keyframes owspin { to { transform: rotate(360deg); } }
.offerwall-error {
  padding: 60px 24px; text-align: center;
  background: #fff8f0; color: var(--text-muted);
}
.offerwall-error h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 10px; }
.offerwall-error p { font-size: 0.9rem; line-height: 1.6; max-width: 380px; margin: 0 auto 20px; }
.btn-retry {
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 24px; font-family: var(--font);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.btn-retry:hover { background: var(--primary-dark); }
.offerwall-not-configured {
  padding: 60px 24px; text-align: center;
  background: #f8fafc; color: var(--text-muted);
}
.offerwall-not-configured h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 10px; }
.offerwall-not-configured p { font-size: 0.9rem; line-height: 1.6; max-width: 400px; margin: 0 auto; }

/* Tabs */
.tabs-wrap { margin-bottom: 40px; }
.tab-pills { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-pill {
  padding: 9px 22px; border-radius: 999px; cursor: pointer;
  font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  transition: var(--transition);
}
.tab-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.input-field {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.9rem;
  background: #f8fafc; color: var(--text);
  margin-bottom: 12px; outline: none; transition: var(--transition);
}
.input-field:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

@media (max-width: 700px) { .offerwall-iframe { height: 400px; } }
.admin-login-body {
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.admin-login-wrap { width: 100%; max-width: 380px; padding: 20px; }
.admin-login-card {
  background: #fff; border-radius: 16px; padding: 36px;
  border: var(--border-silver); box-shadow: var(--shadow-md); text-align: center;
}
.admin-logo { font-size: 3rem; margin-bottom: 12px; }
.admin-login-card h2 { margin-bottom: 24px; font-size: 1.3rem; }
