/* ================================================================
   OnlyFaucet — Light & Bright Theme v4
   ================================================================ */

/* Force light theme on everything */
:root, html, body {
  color-scheme: light;
}

:root {
  --primary:    #0284c7;
  --primary-h:  #0369a1;
  --primary-l:  #e0f2fe;
  --primary-d:  #075985;
  --secondary:  #7c3aed;
  --accent:     #f59e0b;
  --success:    #16a34a;
  --danger:     #dc2626;
  --warning:    #d97706;

  --bg:         #f1f5f9;
  --bg-white:   #ffffff;
  --surface:    #ffffff;
  --surface2:   #f8fafc;
  --border:     #e2e8f0;
  --border-l:   #f1f5f9;

  --text:       #0f172a;
  --text-2:     #334155;
  --muted:      #64748b;
  --muted-l:    #94a3b8;

  --sidebar-w:  240px;
  --topbar-h:   60px;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.12);
  --font:       'Poppins', sans-serif;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font) !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Override any Bootstrap dark defaults */
body, .container, .row, [class*="col-"] {
  background-color: transparent;
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-h); text-decoration: none; }

h1,h2,h3,h4,h5,h6 { color: var(--text); font-family: var(--font); }
p { color: var(--text-2); }
.text-muted { color: var(--muted) !important; }
small { color: var(--muted); }

/* ================================================================
   LAYOUT — App shell with sidebar
   ================================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ---- Sidebar ---- */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 300;
  overflow-y: auto;
  transition: transform .25s ease;
  box-shadow: var(--shadow-md);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  background: var(--bg-white);
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-name { font-size: 14px; font-weight: 800; color: var(--text) !important; line-height: 1.2; }
.logo-sub  { font-size: 10px; color: var(--muted) !important; letter-spacing: .4px; }

.sidebar-nav { padding: 10px 10px; flex: 1; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted-l);
  padding: 8px 10px 4px; display: block;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2) !important;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  margin-bottom: 2px;
  text-decoration: none !important;
  white-space: nowrap;
}
.sidebar-link i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; color: var(--muted); transition: color .15s; }
.sidebar-link:hover { background: var(--primary-l) !important; color: var(--primary) !important; }
.sidebar-link:hover i { color: var(--primary) !important; }
.sidebar-link.active { background: var(--primary-l) !important; color: var(--primary) !important; font-weight: 600; }
.sidebar-link.active i { color: var(--primary) !important; }
.sidebar-link.sl-sub { padding-left: 14px; font-size: 12px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }

.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); background: var(--bg-white); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
}
.su-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.su-email { font-size: 11px; color: var(--muted) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 299;
  backdrop-filter: blur(2px);
}

/* ---- Main area ---- */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Mobile topbar */
.app-topbar {
  display: none;
  height: var(--topbar-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 100;
}
.topbar-toggle { background: none; border: none; cursor: pointer; color: var(--text-2); font-size: 22px; padding: 4px; line-height: 1; }
.topbar-brand  { font-size: 16px; font-weight: 800; color: var(--text) !important; flex: 1; }

/* Guest top nav */
.site-topnav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 100;
}
.site-topnav .container {
  display: flex; align-items: center;
  height: var(--topbar-h); gap: 16px;
}
.topnav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.tn-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800;
}
.tn-name { font-size: 16px; font-weight: 800; color: var(--text) !important; }

@media (max-width: 991px) {
  .app-sidebar { transform: translateX(-100%); box-shadow: none; }
  .app-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay.open { display: block; }
  .app-main { margin-left: 0; }
  .app-topbar { display: flex; }
}

/* ================================================================
   ANNOUNCEMENT BAR
   ================================================================ */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff !important;
  font-size: 12px; font-weight: 600;
  padding: 7px 0; text-align: center;
}

/* ================================================================
   STATS STRIP
   ================================================================ */
.stats-strip {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.stat-box { text-align: center; }
.stat-box .sv {
  font-size: 22px; font-weight: 800;
  color: var(--primary) !important;
  display: block; line-height: 1.2;
}
.stat-box .sl {
  font-size: 11px; color: var(--muted) !important;
  text-transform: uppercase; letter-spacing: .7px; margin-top: 2px;
}
.stat-divider { width: 1px; background: var(--border); align-self: stretch; }
.online-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--success);
  margin-right: 4px; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ================================================================
   HERO (guest landing)
   ================================================================ */
.site-hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 36px;
  text-align: center;
}
.site-hero h1 { font-size: 34px; font-weight: 800; color: var(--text) !important; margin-bottom: 8px; }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { font-size: 15px; color: var(--muted) !important; margin-bottom: 20px; }
.coin-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.coin-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  background: var(--bg-white); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-2) !important;
}

/* ================================================================
   CARDS
   ================================================================ */
.of-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.of-card * { color: inherit; }
.hover-lift { transition: transform .2s, box-shadow .2s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Coin cards */
.coin-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.coin-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--coin-color, var(--primary));
}
.coin-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--coin-color, var(--primary)) !important; }
.coin-name   { font-size: 14px; font-weight: 700; color: var(--text) !important; margin: 4px 0 2px; }
.coin-symbol-badge { font-size: 11px; color: var(--muted) !important; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.coin-reward { font-size: 18px; font-weight: 800; color: var(--primary) !important; }
.coin-interval { font-size: 11px; color: var(--muted) !important; }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.page-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 16px; border-bottom: 1px solid var(--border-l); margin-bottom: 24px;
}
.page-hdr h2 { font-size: 20px; font-weight: 700; color: var(--text) !important; margin: 0; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary-glow {
  background: linear-gradient(135deg, var(--primary), #0ea5e9) !important;
  color: #fff !important; border: none;
  border-radius: var(--radius-sm); font-weight: 600;
  box-shadow: 0 4px 14px rgba(2,132,199,.3);
  transition: all .2s; text-decoration: none;
}
.btn-primary-glow:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(2,132,199,.4); color: #fff !important; }

.btn-claim {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff !important; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(2,132,199,.3);
  transition: all .2s;
}
.btn-claim:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(2,132,199,.4); }
.btn-claim:disabled { background: var(--border) !important; color: var(--muted-l) !important; cursor: not-allowed; box-shadow: none; }

.btn-shortlink {
  background: linear-gradient(135deg, var(--secondary), #a855f7);
  color: #fff !important; border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; padding: 8px 14px; cursor: pointer; transition: all .15s;
}
.btn-shortlink:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-shortlink:disabled { background: var(--border) !important; color: var(--muted-l) !important; cursor: not-allowed; }

.btn-challenge {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--success), #15803d);
  color: #fff !important; border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.btn-challenge:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(22,163,74,.35); }
.btn-challenge:disabled { background: var(--border) !important; color: var(--muted-l) !important; cursor: not-allowed; }

/* ================================================================
   FAUCET PAGE
   ================================================================ */
.faucet-hero {
  background: linear-gradient(135deg, #f0f9ff, #faf5ff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.faucet-hero h4 { font-size: 18px; font-weight: 800; color: var(--text) !important; }
.reward-amount { font-size: 26px; font-weight: 800; color: var(--primary) !important; line-height: 1.1; }
.interval-badge {
  display: inline-block; background: #fef3c7; color: var(--warning) !important;
  border: 1px solid #fde68a; border-radius: 20px;
  padding: 3px 12px; font-size: 12px; font-weight: 600; margin-top: 6px;
}
.countdown-display {
  font-size: 48px; font-weight: 800; color: var(--warning) !important;
  letter-spacing: 2px; line-height: 1; font-variant-numeric: tabular-nums;
}
.countdown-display.ready { color: var(--success) !important; }
.countdown-label { font-size: 11px; color: var(--muted) !important; text-transform: uppercase; letter-spacing: .8px; }

/* ================================================================
   SHORTLINKS
   ================================================================ */
.sl-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius); padding: 16px;
  text-align: center; box-shadow: var(--shadow); transition: box-shadow .2s;
}
.sl-card:hover { box-shadow: var(--shadow-md); }
.sl-name { font-size: 13px; font-weight: 700; color: var(--text) !important; margin-bottom: 4px; }
.sl-reward { font-size: 18px; font-weight: 800; color: var(--primary) !important; margin-bottom: 2px; }
.sl-limit { font-size: 11px; color: var(--muted) !important; margin-bottom: 10px; }

/* ================================================================
   CHALLENGES
   ================================================================ */
.challenge-header {
  background: linear-gradient(135deg, var(--success), #15803d);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 22px 24px; text-align: center; color: #fff !important;
}
.challenge-header * { color: #fff !important; }
.challenge-body {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.today-reward-box {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm); padding: 14px; text-align: center; margin-bottom: 18px;
}
.today-reward-box .reward-label { font-size: 11px; color: var(--muted) !important; text-transform: uppercase; letter-spacing: .8px; }
.today-reward-box .reward-val   { font-size: 26px; font-weight: 800; color: var(--success) !important; }
.req-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--surface2);
  border: 1px solid var(--border-l); border-radius: var(--radius-sm); margin-bottom: 10px;
}
.req-left { display: flex; align-items: center; gap: 10px; }
.req-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.req-icon.ok { background: #dcfce7; color: var(--success) !important; }
.req-icon.no { background: #fee2e2; color: var(--danger) !important; }
.req-badge { background: #fef3c7; color: var(--warning) !important; border: 1px solid #fde68a; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.of-progress { background: #e2e8f0; border-radius: 10px; height: 8px; overflow: hidden; }
.of-progress-bar { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .4s; }

/* Bootstrap progress override */
.progress { background: #e2e8f0 !important; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--secondary)) !important; }

/* ================================================================
   FORMS
   ================================================================ */
.of-label { font-size: 12px; font-weight: 600; color: var(--text-2) !important; text-transform: uppercase; letter-spacing: .7px; display: block; margin-bottom: 6px; }
.of-input, .of-select {
  width: 100%; background: var(--bg-white) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  font-size: 14px !important; font-family: var(--font) !important;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.of-input:focus, .of-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(2,132,199,.15) !important;
}
.of-input::placeholder { color: var(--muted-l) !important; }
.of-captcha { display: flex; justify-content: center; margin: 16px 0; }

/* ================================================================
   LOGIN
   ================================================================ */
.login-wrap {
  min-height: 100vh; background: linear-gradient(135deg, #f0f9ff, #faf5ff);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  background: var(--bg-white) !important; border: 1px solid var(--border);
  border-radius: 18px; padding: 36px 32px; max-width: 440px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.login-notice {
  background: #fff7ed; border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px; font-size: 12px; color: var(--text-2) !important;
  margin-bottom: 18px; line-height: 1.6;
}
.login-notice li { margin-bottom: 4px; color: var(--text-2) !important; }

/* ================================================================
   REFERRAL
   ================================================================ */
.ref-link-box {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface2) !important; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.ref-link-box input { flex: 1; border: none; background: transparent; font-size: 12px; color: var(--text-2) !important; outline: none; }

/* ================================================================
   TABLES
   ================================================================ */
.card-table-wrap { background: var(--surface) !important; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.of-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.of-table th { background: var(--surface2) !important; color: var(--muted) !important; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.of-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-l); color: var(--text-2) !important; vertical-align: middle; }
.of-table tr:last-child td { border-bottom: none; }
.of-table tr:hover td { background: var(--surface2) !important; }

/* ================================================================
   BADGES / TAGS
   ================================================================ */
.tag-primary { background: #e0f2fe !important; color: var(--primary) !important; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.tag-success { background: #dcfce7 !important; color: var(--success) !important; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.tag-warning { background: #fef3c7 !important; color: var(--warning) !important; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.tag-danger  { background: #fee2e2 !important; color: var(--danger)  !important; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.tag-muted   { background: #f1f5f9 !important; color: var(--muted)   !important; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; display: inline-block; }
.tag-violet  { background: #f5f3ff !important; color: var(--secondary) !important; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; display: inline-block; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert { border-radius: var(--radius-sm) !important; font-size: 13px !important; font-weight: 500; border: none !important; }
.alert-success { background: #dcfce7 !important; color: #166534 !important; border-left: 3px solid var(--success) !important; }
.alert-danger  { background: #fee2e2 !important; color: #991b1b !important; border-left: 3px solid var(--danger)  !important; }
.alert-warning { background: #fef3c7 !important; color: #92400e !important; border-left: 3px solid var(--warning) !important; }
.alert-info    { background: #e0f2fe !important; color: #075985 !important; border-left: 3px solid var(--primary) !important; }
.btn-close { filter: none !important; color: var(--text) !important; }
@keyframes slideIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.animate-in { animation: slideIn .25s ease; }

/* ================================================================
   BANNERS
   ================================================================ */
.banner-leaderboard {
  width: 100%; background: #f8fafc; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); display: flex;
  align-items: center; justify-content: center; min-height: 90px; padding: 6px 0;
}
.banner-square {
  display: flex; justify-content: center; align-items: center;
  margin: 14px auto; min-height: 250px; max-width: 336px;
  background: var(--surface2); border: 1px dashed var(--border); border-radius: var(--radius);
}
.banner-square-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.banner-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg,#f1f5f9,#f1f5f9 10px,#fff 10px,#fff 20px);
  border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted-l); font-size: 12px; text-align: center; padding: 12px;
}
.banner-placeholder .bp-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; opacity: .5; margin-top: 4px; }

/* ================================================================
   FOOTER
   ================================================================ */
.main-footer { background: var(--bg-white) !important; border-top: 1px solid var(--border); padding: 28px 0; }
.main-footer p { color: var(--muted) !important; font-size: 13px; margin: 0; }

/* ================================================================
   UTILITIES
   ================================================================ */
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.section-title { font-size: 15px; font-weight: 700; color: var(--text) !important; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .site-hero h1 { font-size: 26px; }
  .countdown-display { font-size: 36px; }
  .reward-amount { font-size: 20px; }
  .login-card { padding: 24px 16px; }
  .faucet-hero { padding: 20px 16px; }
  .of-card { padding: 16px; }
}
