/* ============================================================
   NovaToken dApp — modern dark web3 UI
   Pure CSS, no framework. Customize via the variables below.
   ============================================================ */

:root {
  --bg: #0b0f1a;
  --bg-2: #0e1424;
  --card: rgba(17, 24, 43, 0.72);
  --card-border: rgba(148, 163, 184, 0.14);
  --text: #e6eaf2;
  --muted: #8b96ab;
  --accent-1: #7c3aed;
  --accent-2: #06b6d4;
  --accent-grad: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --danger: #f43f5e;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 16px;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", var(--font-ui);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* soft aurora glow behind everything */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 12% 8%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(700px 500px at 88% 20%, rgba(6, 182, 212, 0.12), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(124, 58, 237, 0.08), transparent 60%),
    var(--bg);
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.accent { color: var(--accent-2); }

/* ===================== HEADER ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 15, 26, 0.72);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.brand h1 { font-family: var(--font-display); font-size: 19px; letter-spacing: 0.2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chain-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--muted);
}
.chain-badge.ok { color: var(--success); border-color: rgba(16, 185, 129, 0.35); }

/* ===================== BUTTONS & FORMS ===================== */

.btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0); }

.btn-primary { background: var(--accent-grad); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3); }
.btn-accent { background: linear-gradient(135deg, #06b6d4, #3b82f6); box-shadow: 0 6px 18px rgba(6, 182, 212, 0.3); }
.btn-ghost { background: rgba(148, 163, 184, 0.1); border: 1px solid var(--card-border); color: var(--text); }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.18); }
.btn-danger { background: var(--danger); }
.btn-danger.btn-outline { background: transparent; border: 1px solid rgba(244, 63, 94, 0.5); color: var(--danger); }
.btn-danger.btn-outline:hover { background: rgba(244, 63, 94, 0.1); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-ui);
}
.link-btn:hover { text-decoration: underline; }

input, select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12); }
input:disabled { opacity: 0.6; }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===================== BANNER / SETTINGS ===================== */

.banner { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; border-left: 3px solid var(--warning); }
.banner-icon { font-size: 26px; }
.banner h3 { font-family: var(--font-display); margin-bottom: 4px; }
.banner p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.banner code, .settings-panel code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(148, 163, 184, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--accent-2);
}

.settings-panel { margin-top: 22px; }
.settings-panel h3 { font-family: var(--font-display); margin-bottom: 14px; }
.settings-panel .row { margin-top: 16px; }

/* ===================== CARDS / SECTIONS ===================== */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(6, 182, 212, 0.3); }

.card-featured {
  border-color: rgba(124, 58, 237, 0.4);
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.12), rgba(17, 24, 43, 0.72));
}

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-head h3 { font-family: var(--font-display); font-size: 16.5px; }
.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.16);
  color: var(--accent-2);
  font-size: 16px;
}
.card p { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.card form .btn { width: 100%; margin-top: 14px; }
.card .btn { margin-top: 10px; width: 100%; }

.result { margin-top: 12px; font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); word-break: break-all; }

.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
  vertical-align: middle;
}
.tag-admin { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.section { margin-top: 46px; }
.section-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 18px; }
.section-title .muted { font-size: 13px; font-weight: 400; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ===================== HERO / STATS ===================== */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 28px;
  margin-top: 34px;
  align-items: center;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.hero-text h2 { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.5px; }
.hero-text h2 span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text p { font-size: 14.5px; margin-top: 10px; max-width: 46ch; }
.hero-links { margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.hero-links a { color: var(--accent-2); text-decoration: none; }
.hero-links a:hover { text-decoration: underline; }
#hero-address { font-family: var(--font-mono); font-size: 12.5px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.stat-small { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }

/* ===================== ADMIN ===================== */

#admin-section .cards-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.pause-status { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 13.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
.dot.paused { background: var(--danger); box-shadow: 0 0 8px rgba(244, 63, 94, 0.8); }

/* ===================== ACTIVITY TABLE ===================== */

.table-card { padding: 8px 20px 20px; overflow-x: auto; }
.activity-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.activity-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  padding: 14px 12px;
  border-bottom: 1px solid var(--card-border);
}
.activity-table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.07); }
.activity-table tr:last-child td { border-bottom: none; }
.activity-table .mono { font-family: var(--font-mono); font-size: 12px; }
.activity-table a { color: var(--accent-2); text-decoration: none; }
.activity-table a:hover { text-decoration: underline; }

.ev-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}
.ev-Transfer { background: rgba(6, 182, 212, 0.14); color: #67e8f9; }
.ev-Minted { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.ev-Burned { background: rgba(244, 63, 94, 0.14); color: #fda4af; }
.ev-Approval { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.ev-Paused { background: rgba(244, 63, 94, 0.14); color: #fda4af; }
.ev-Unpaused { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.ev-OwnershipTransferred, .ev-OwnershipTransferStarted { background: rgba(124, 58, 237, 0.16); color: #c4b5fd; }

/* ===================== FOOTER ===================== */

.site-footer { margin-top: 60px; border-top: 1px solid var(--card-border); background: rgba(11, 15, 26, 0.6); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 20px;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-inner a { color: var(--accent-2); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
#footer-address { font-family: var(--font-mono); }

/* ===================== TOASTS ===================== */

.toast-container {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: rgba(17, 24, 43, 0.96);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent-2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.22s ease;
  word-break: break-word;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--accent-2); }
.toast a { color: #67e8f9; }
.toast.out { opacity: 0; transform: translateX(12px); transition: all 0.25s ease; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===================== MISC ===================== */

[hidden] { display: none !important; }

.spin {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

::selection { background: rgba(124, 58, 237, 0.4); }
