/* ========================================================
   OG Crypto Faucet - Classic Clean Design System
   Clean white aesthetic, high contrast, ad-friendly layout
   ======================================================== */

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --success-hover: #15803d;
  --warning: #d97706;
  --danger: #dc2626;
  --gold: #f59e0b;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= Top Navigation Bar ================= */
.navbar {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.brand-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--bg-alt);
  color: var(--primary);
}

.nav-badge {
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 9999px;
  margin-left: 4px;
  font-weight: 700;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-balance-badge {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.875rem;
}

/* ================= Layout Structure ================= */
.main-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
  flex: 1;
}

/* Sponsor Ad Containers */
.ad-slot-header {
  margin: 0 auto 20px auto;
  max-width: 728px;
  height: 90px;
  background: #ffffff;
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  overflow: hidden;
}

.ad-slot-footer {
  margin: 24px auto;
  max-width: 728px;
  min-height: 90px;
  background: #ffffff;
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 2px;
}

/* 3-Column Faucet Layout */
.faucet-grid {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .faucet-grid {
    grid-template-columns: 1fr;
  }
  .side-ad-column {
    display: none;
  }
}

.side-ad-column {
  background: var(--bg-card);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ================= Cards & Modules ================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Faucet Main Box */
.faucet-box {
  text-align: center;
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}

.faucet-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}

.faucet-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.faucet-stats-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.stat-pill {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.stat-pill strong {
  color: var(--primary);
}

/* Timer Display */
.timer-container {
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.timer-digits {
  font-size: 3rem;
  font-weight: 900;
  font-family: monospace;
  color: var(--text-main);
  letter-spacing: 2px;
}

.timer-ready {
  color: var(--success);
}

.timer-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Antibot Challenge Box */
.antibot-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  padding: 18px;
  margin: 20px 0;
  text-align: center;
}

.antibot-instruction {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.antibot-instruction span {
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  color: #92400e;
}

.antibot-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.antibot-btn {
  background: #ffffff;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.antibot-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.antibot-btn.clicked {
  background: #94a3b8;
  border-color: #94a3b8;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.6;
}

.antibot-reset-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: underline;
}

/* Cloudflare Turnstile container */
.turnstile-box {
  margin: 16px 0;
  display: flex;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: var(--success-hover);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-claim {
  font-size: 1.35rem;
  padding: 14px 40px;
  width: 100%;
  max-width: 320px;
  margin-top: 10px;
}

.btn-disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

/* Refresh reminder bar */
.refresh-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 0.9rem;
  display: none;
}

/* ================= Tables ================= */
.table-container {
  overflow-x: auto;
  margin: 16px 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.table th {
  background-color: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.table tr:hover {
  background-color: #f8fafc;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.95rem;
  display: none;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Honeypot hidden fields */
.trap-field {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
  pointer-events: none;
}

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 24px 16px;
  margin-top: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

/* Admin Dashboard Specific */
.admin-badge {
  background: #fee2e2;
  color: #b91c1c;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card .val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 4px;
}

.stat-card .lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
