/* ============================================================
   TeknoPays Reborn — Main Stylesheet
   Mobile-first, modern, premium crypto dashboard style
   ============================================================ */

/* ============================================================
   TeknoPays Reborn — Main Stylesheet
   Mobile-first, modern, premium crypto dashboard style
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');


:root {
  --primary:    #1a73e8;
  --primary-dk: #1557b0;
  --success:    #34a853;
  --warning:    #fbbc04;
  --danger:     #ea4335;
  --bg:         #f5f7fa;
  --card-bg:    #ffffff;
  --text:       #1e2330;
  --text-muted: #6b7280;
  --border:     #e8ecf0;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 2px 16px rgba(26,115,232,.10);
  --shadow-md:  0 4px 32px rgba(26,115,232,.14);
  --header-h:   60px;
  --bottom-h:   64px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.guest-page {
  padding-bottom: 0;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }
img { max-width: 100%; }

/* ── Typography ───────────────────────────────────────────── */
.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.section-title {
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
}
.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}
.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.badge-balance {
  background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: background .2s;
}
.badge-balance:hover { background: linear-gradient(135deg, #d2e3fc, #a8c7fa); color: var(--primary-dk); }

/* ── Bottom Nav ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--bottom-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(0,0,0,.07);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .65rem;
  font-weight: 500;
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  min-width: 52px;
}
.bottom-nav-item i { font-size: 1.35rem; }
.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--primary);
  background: #e8f0fe;
}
.faucet-nav {
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  color: #fff !important;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  margin-top: -20px;
  box-shadow: 0 4px 16px rgba(26,115,232,.4);
}
.faucet-nav.active, .faucet-nav:hover {
  background: linear-gradient(135deg, #0d47a1, #1a73e8);
  color: #fff !important;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content { min-height: calc(100vh - var(--header-h) - var(--bottom-h)); }

.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem .85rem 1.5rem;
}
.page-container.wide { max-width: 800px; }

/* ── Cards ────────────────────────────────────────────────── */
.tkp-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.tkp-card:hover { box-shadow: var(--shadow-md); }

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto .5rem;
}
.stat-card .stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.stat-card .stat-label {
  font-size: .73rem;
  color: var(--text-muted);
}

/* ── Balance Hero ─────────────────────────────────────────── */
.balance-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 24px rgba(26,115,232,.3);
  position: relative;
  overflow: hidden;
}
.balance-hero::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.balance-hero .balance-label { font-size: .8rem; opacity: .85; font-weight: 500; }
.balance-hero .balance-amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: .2rem 0;
}
.balance-hero .balance-currency { font-size: .85rem; opacity: .8; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all .22s;
  font-size: .9rem;
}
.btn-lg { padding: .75rem 1.4rem; font-size: 1rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  border: none;
  color: #fff;
  box-shadow: 0 3px 12px rgba(26,115,232,.3);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #1557b0, var(--primary));
  color: #fff;
  box-shadow: 0 4px 18px rgba(26,115,232,.4);
  transform: translateY(-1px);
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #1e8e3e);
  border: none;
  color: #fff;
  box-shadow: 0 3px 12px rgba(52,168,83,.3);
}
.btn-success:hover { transform: translateY(-1px); color: #fff; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ── Forms ────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: .92rem;
  padding: .65rem .9rem;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
  outline: none;
}
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .4rem; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #f5f7fa 100%);
  padding: 1rem;
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-logo .brand-icon {
  width: 54px;
  height: 54px;
  font-size: 1.6rem;
  margin: 0 auto .5rem;
}
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
.auth-sub { color: var(--text-muted); font-size: .88rem; }

/* ── Offerwall ────────────────────────────────────────────── */
.offerwall-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  margin-bottom: 1rem;
}
.offerwall-header {
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  padding: .75rem 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.offerwall-body {
  background: #fff;
  height: 520px;
}
.offerwall-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Reward History ───────────────────────────────────────── */
.reward-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.reward-item:last-child { border-bottom: none; }
.reward-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.reward-icon.faucet    { background: #e8f0fe; color: var(--primary); }
.reward-icon.offerwall { background: #e6f4ea; color: var(--success); }
.reward-icon.referral  { background: #fef7e0; color: var(--warning); }
.reward-icon.daily_bonus { background: #fce8e6; color: var(--danger); }
.reward-icon.admin     { background: #f3e8ff; color: #7c3aed; }
.reward-amount { font-weight: 700; font-size: .9rem; color: var(--success); }
.reward-meta   { font-size: .75rem; color: var(--text-muted); }

/* ── Faucet ───────────────────────────────────────────────── */
.faucet-claim-area {
  text-align: center;
  padding: 2rem 1rem;
}
.faucet-btn-wrap {
  position: relative;
  display: inline-block;
}
.faucet-drop-btn {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  border: none;
  color: #fff;
  font-size: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(26,115,232,.4);
  cursor: pointer;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.faucet-drop-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  opacity: 0;
  transition: opacity .3s;
}
.faucet-drop-btn:hover::before { opacity: 1; }
.faucet-drop-btn:active { transform: scale(.95); }
.faucet-drop-btn.disabled {
  background: linear-gradient(135deg, #9e9e9e, #757575);
  box-shadow: none;
  cursor: not-allowed;
}
.faucet-amount-badge {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success);
  margin: 1rem 0 .3rem;
}
.countdown-timer {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

/* ── Leaderboard ──────────────────────────────────────────── */
.lb-item {
  display: flex;
  align-items: center;
  padding: .7rem .9rem;
  border-radius: var(--radius-sm);
  margin-bottom: .4rem;
  background: #fff;
  border: 1px solid var(--border);
  gap: .75rem;
}
.lb-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.lb-rank.gold   { background: #fef7e0; color: #b06000; }
.lb-rank.silver { background: #f1f3f4; color: #5f6368; }
.lb-rank.bronze { background: #fce8e6; color: #c53929; }

/* ── Referral ─────────────────────────────────────────────── */
.ref-link-box {
  background: #f5f7fa;
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-family: monospace;
  font-size: .85rem;
  word-break: break-all;
  color: var(--primary);
}

/* ── Shimmer Loading ──────────────────────────────────────── */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.shimmer-line { height: 16px; margin-bottom: 8px; }
.shimmer-block { height: 80px; }

/* ── Toast ────────────────────────────────────────────────── */
.toast { border-radius: 12px; font-size: .88rem; font-weight: 500; }
.toast.bg-success { background: var(--success) !important; }
.toast.bg-danger  { background: var(--danger)  !important; }
.toast.bg-warning { background: var(--warning) !important; color: #333 !important; }
.toast.bg-info    { background: var(--primary) !important; }

/* ── Withdraw ─────────────────────────────────────────────── */
.wd-limit-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.wd-limit-fill { height: 100%; background: linear-gradient(90deg, var(--success), #1e8e3e); border-radius: 3px; transition: width .6s ease; }

/* ── Admin ────────────────────────────────────────────────── */
.admin-sidebar {
  width: 220px;
  background: #1e2330;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
  padding: 1.5rem 0 1rem;
}
.admin-sidebar-brand {
  padding: 0 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: .5rem;
  color: #fff;
  font-weight: 700;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  text-decoration: none;
  transition: all .2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.admin-content {
  margin-left: 220px;
  padding: 1.5rem;
  min-height: 100vh;
}
.stat-mini {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.stat-mini.green  { border-color: var(--success); }
.stat-mini.yellow { border-color: var(--warning); }
.stat-mini.red    { border-color: var(--danger); }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
}

/* ── Utilities ────────────────────────────────────────────── */
.gap-sm { gap: .5rem !important; }
.text-green { color: var(--success) !important; }
.text-red   { color: var(--danger)  !important; }
.fw-600 { font-weight: 600 !important; }
.small-muted { font-size: .78rem; color: var(--text-muted); }
.rounded-xl { border-radius: var(--radius) !important; }
.badge-type {
  font-size: .68rem;
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: 20px;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .35s ease both; }
.fade-in-up:nth-child(1) { animation-delay: .0s; }
.fade-in-up:nth-child(2) { animation-delay: .06s; }
.fade-in-up:nth-child(3) { animation-delay: .12s; }
.fade-in-up:nth-child(4) { animation-delay: .18s; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(26,115,232,.4); }
  70% { box-shadow: 0 0 0 16px rgba(26,115,232,0); }
  100% { box-shadow: 0 0 0 0 rgba(26,115,232,0); }
}
.pulse { animation: pulse-ring 2s infinite; }

/* ── Responsive Tweaks ────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem 1.1rem; }
  .balance-hero .balance-amount { font-size: 1.6rem; }
  .page-container { padding: .85rem .7rem 1.5rem; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
}

/* ── 404 / Error ──────────────────────────────────────────── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  flex-direction: column;
  padding: 2rem;
}
.error-code {
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.site-footer-guest { background: #fff; border-top: 1px solid var(--border); }
.footer-link { color: var(--text-muted); font-size: .83rem; }
.footer-link:hover { color: var(--primary); }
