/* Glcoin — glcoin.org stylesheet */

/* ── Theme toggle button ────────────────────────────────────── */

.theme-toggle {
  background:    none;
  border:        1px solid var(--border);
  border-radius: var(--radius);
  color:         var(--text-dim);
  cursor:        pointer;
  font-size:     1rem;
  line-height:   1;
  padding:       0.4rem 0.6rem;
  transition:    border-color 0.2s, color 0.2s;
  flex-shrink:   0;
}

.theme-toggle:hover {
  border-color: var(--gold);
  color:        var(--gold);
}

/* ── Light theme overrides ──────────────────────────────────── */

[data-theme="light"] {
  --bg:       #f4f6fb;
  --bg2:      #eaecf5;
  --bg3:      #dfe3ef;
  --border:   #c8d0e4;
  --text:     #0d1420;
  --text-dim: #4a5a78;
  --shadow:   0 4px 24px rgba(0,0,0,0.12);
}

[data-theme="light"] nav {
  background: rgba(244,246,251,0.95);
}

[data-theme="light"] .nav-links {
  background: rgba(244,246,251,0.98);
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  color: var(--text);
}

@font-face {
  font-family: 'Ubuntu';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Ubuntu-Italic.ttf') format('truetype');
}

@font-face {
  font-family: 'Ubuntu';
  font-style:  italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Ubuntu-BoldItalic.ttf') format('truetype');
}

:root {
  --bg:         #090e1a;
  --bg2:        #0e1628;
  --bg3:        #141e35;
  --border:     #1e2d4a;
  --gold:       #A78BFA;
  --gold-dark:  #8B5CF6;
  --gold-glow:  rgba(167,139,250,0.18);
  --text:       #e4e8f4;
  --text-dim:   #7a8baa;
  --green:      #22c55e;
  --red:        #ef4444;
  --orange:     #f59e0b;
  --font:       'Segoe UI', 'Inter', system-ui, sans-serif;
  --mono:       'Fira Mono', 'Consolas', monospace;
  --radius:     8px;
  --shadow:     0 4px 24px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  min-height:  100vh;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Skip-link ─────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 200;
  transform: translateY(-100%);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

/* ── Navigation ────────────────────────────────────────── */

nav {
  position:        sticky;
  top:             0;
  z-index:         100;
  background:      rgba(9,14,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom:   1px solid var(--border);
  padding:         0 2rem;
}

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

.nav-logo {
  display:     flex;
  align-items: center;
  gap:         0.6rem;
  font-family: 'Ubuntu', var(--font);
  font-style:  italic;
  font-size:   1.25rem;
  font-weight: 700;
  color:       var(--text);
  letter-spacing: 0;
}

.nav-logo-rest { color: var(--text); }

.nav-logo-img {
  width:       34px;
  height:      34px;
  object-fit:  contain;
  filter:      drop-shadow(0 0 6px rgba(167,139,250,0.4));
}

.nav-links {
  display:    flex;
  gap:        2rem;
  list-style: none;
}

.nav-links a {
  color:       var(--text-dim);
  font-size:   0.92rem;
  font-weight: 500;
  transition:  color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); text-decoration: none; }

.nav-pill {
  padding:       0.45rem 1.1rem;
  background:    var(--gold);
  color:         var(--bg) !important;
  border-radius: 20px;
  font-weight:   700;
}

.nav-pill:hover { background: var(--gold-dark); text-decoration: none; }

/* ── Hamburger ──────────────────────────────────────────── */

.nav-hamburger {
  display:        none;
  flex-direction: column;
  gap:            5px;
  background:     none;
  border:         none;
  cursor:         pointer;
  padding:        8px 6px;
  min-width:      44px;
  min-height:     44px;
}

.nav-hamburger span {
  display:       block;
  width:         24px;
  height:        2px;
  background:    var(--text);
  border-radius: 2px;
  transition:    all 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Main container ─────────────────────────────────────── */

.container {
  max-width: 1140px;
  margin:    0 auto;
  padding:   0 2rem;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding:    7rem 2rem 6rem;
  text-align: center;
  position:   relative;
  overflow:   hidden;
}

.hero::before {
  content:  '';
  position: absolute;
  inset:    0;
  background: radial-gradient(ellipse 80% 55% at 50% 0%,
              rgba(167,139,250,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width:         110px;
  height:        110px;
  object-fit:    contain;
  margin-bottom: 2rem;
  filter:        drop-shadow(0 0 24px rgba(167,139,250,0.45));
  animation:     logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

.hero-badge {
  display:       inline-block;
  padding:       0.3rem 1rem;
  border:        1px solid var(--gold);
  border-radius: 20px;
  font-size:     0.78rem;
  color:         var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom:  1.5rem;
  opacity: 0.85;
}

.hero h1 {
  font-family: 'Ubuntu', var(--font);
  font-style:  italic;
  font-size:   3.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent { color: var(--gold); }

.hero p {
  font-size:  1.12rem;
  color:      var(--text-dim);
  max-width:  580px;
  margin:     0 auto 2.5rem;
  line-height: 1.75;
}

.btn-row {
  display:    flex;
  gap:        1rem;
  justify-content: center;
  flex-wrap:  wrap;
}

.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           0.5rem;
  padding:       0.7rem 1.8rem;
  border-radius: var(--radius);
  font-size:     1rem;
  font-weight:   500;
  cursor:        pointer;
  border:        none;
  transition:    all 0.2s;
  min-height:    44px;
}

.btn-primary {
  background: var(--gold);
  color:      var(--bg);
  box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-primary:hover {
  background:      var(--gold-dark);
  text-decoration: none;
  color:           var(--bg);
  transform:       translateY(-1px);
  box-shadow:      0 4px 16px var(--gold-glow);
}

.btn-outline {
  background: transparent;
  color:      var(--text);
  border:     1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color:        var(--gold);
  text-decoration: none;
  transform:    translateY(-1px);
}

.btn-sm {
  padding:    0.4rem 1rem;
  font-size:  0.85rem;
  min-height: 36px;
}

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

.btn-danger:hover { background: #c0392b; }

.btn-warn {
  background: var(--orange);
  color:      #fff;
}

.btn-warn:hover { background: #c08010; }

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

.btn-success:hover { background: #16a34a; }

/* ── Stats bar ──────────────────────────────────────────── */

.stats-bar {
  display:   flex;
  gap:       1px;
  background: var(--border);
  border:    1px solid var(--border);
  border-radius: var(--radius);
  overflow:  hidden;
  margin:    3.5rem auto 0;
  max-width: 740px;
}

.stat-cell {
  flex:       1;
  text-align: center;
  padding:    1rem 0.75rem;
  background: var(--bg2);
}

.stat-cell .num {
  font-size:   1.6rem;
  font-weight: 800;
  color:       var(--gold);
  line-height: 1;
}

.stat-cell .lbl {
  font-size: 0.75rem;
  color:     var(--text-dim);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── Section ────────────────────────────────────────────── */

.section {
  padding: 5rem 2rem;
}

.section-title {
  font-family:   'Ubuntu', var(--font);
  font-style:    italic;
  font-size:     2rem;
  font-weight:   700;
  margin-bottom: 0.5rem;
}

.section-sub {
  color:         var(--text-dim);
  margin-bottom: 2.5rem;
  max-width:     520px;
  line-height:   1.7;
}

/* ── Card grid ──────────────────────────────────────────── */

.card-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:                   1.5rem;
}

.card {
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1.5rem;
  transition:    border-color 0.2s;
}

.card:hover {
  border-color: var(--gold);
}

.card-icon {
  font-size:     1.6rem;
  margin-bottom: 0.8rem;
}

.card h3 {
  font-size:     1rem;
  margin-bottom: 0.5rem;
}

.card p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

/* ── Roadmap ────────────────────────────────────────────── */

.roadmap {
  display:       flex;
  flex-direction: column;
  gap:           0;
  max-width:     720px;
  position:      relative;
}

.roadmap::before {
  content:    '';
  position:   absolute;
  left:       1.5rem;
  top:        0;
  bottom:     0;
  width:      2px;
  background: var(--border);
}

.rm-item {
  display:     flex;
  gap:         1.5rem;
  padding:     1.5rem 0 1.5rem 0;
  position:    relative;
}

.rm-dot {
  width:         3rem;
  height:        3rem;
  min-width:     3rem;
  border-radius: 50%;
  background:    var(--bg2);
  border:        2px solid var(--border);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-weight:   800;
  font-size:     0.78rem;
  color:         var(--text-dim);
  z-index:       1;
  position:      relative;
}

.rm-dot.active {
  border-color: var(--gold);
  color:        var(--gold);
  background:   rgba(167,139,250,0.08);
}

.rm-body { padding-top: 0.4rem; }
.rm-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.rm-body p  { color: var(--text-dim); font-size: 0.88rem; line-height: 1.65; }
.rm-tag {
  display:       inline-block;
  margin-bottom: 0.4rem;
  padding:       0.15rem 0.65rem;
  border-radius: 12px;
  font-size:     0.7rem;
  font-weight:   700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background:    rgba(167,139,250,0.12);
  color:         var(--gold);
}

/* ── Table ──────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border:     1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width:           100%;
  border-collapse: collapse;
  font-size:       0.88rem;
}

thead { background: var(--bg3); }

th {
  padding:        0.8rem 1rem;
  text-align:     left;
  color:          var(--text-dim);
  font-size:      0.78rem;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom:  1px solid var(--border);
}

td {
  padding:       0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(167,139,250,0.04); }

.addr {
  font-family: var(--mono);
  font-size:   0.82rem;
  color:       var(--text-dim);
}

/* ── Badges ─────────────────────────────────────────────── */

.badge {
  display:       inline-block;
  padding:       0.2rem 0.65rem;
  border-radius: 12px;
  font-size:     0.75rem;
  font-weight:   600;
  letter-spacing: 0.04em;
}

.badge-approved  { background: rgba(34,197,94,0.12);  color: var(--green); }
.badge-pending   { background: rgba(167,139,250,0.15); color: var(--gold); }
.badge-revoked   { background: rgba(239,68,68,0.12);  color: var(--red); }
.badge-suspended { background: rgba(245,158,11,0.15); color: var(--orange); }
.badge-online    { background: rgba(34,197,94,0.12);  color: var(--green); }
.badge-offline   { background: rgba(239,68,68,0.12);  color: var(--red); }

/* ── Form ───────────────────────────────────────────────── */

.form-wrap {
  max-width:     620px;
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       2.5rem;
}

.form-group { margin-bottom: 1.4rem; }

label {
  display:       block;
  margin-bottom: 0.4rem;
  font-size:     0.88rem;
  font-weight:   600;
  color:         var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width:         100%;
  background:    var(--bg3);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  color:         var(--text);
  font-family:   var(--font);
  font-size:     0.92rem;
  padding:       0.7rem 1rem;
  outline:       none;
  transition:    border-color 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus { border-color: var(--gold); }

textarea { resize: vertical; min-height: 80px; }

.hint {
  margin-top: 0.35rem;
  font-size:  0.78rem;
  color:      var(--text-dim);
}

/* ── Alerts / flash ─────────────────────────────────────── */

.flash-list { list-style: none; margin-bottom: 1.5rem; }

.flash {
  padding:       0.9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  font-size:     0.92rem;
}

.flash-success { background: rgba(34,197,94,0.10);  border: 1px solid var(--green); }
.flash-error   { background: rgba(239,68,68,0.10);  border: 1px solid var(--red); }

/* ── Code block ─────────────────────────────────────────── */

.code-block {
  background:    var(--bg3);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1rem 1.2rem;
  font-family:   var(--mono);
  font-size:     0.82rem;
  color:         var(--gold);
  overflow-x:    auto;
  word-break:    break-all;
}

/* ── Admin action row ───────────────────────────────────── */

.action-row {
  display:   flex;
  gap:       0.6rem;
  flex-wrap: wrap;
}

/* ── Sign helper panel ──────────────────────────────────── */

.sign-panel {
  background:    rgba(167,139,250,0.06);
  border:        1px solid rgba(167,139,250,0.25);
  border-radius: var(--radius);
  padding:       1rem 1.2rem;
  margin-top:    0.6rem;
  display:       none;
}

.sign-panel.open { display: block; }

/* ── Page header ────────────────────────────────────────── */

.page-header {
  padding:    3.5rem 2rem 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header h1 { font-size: 2.2rem; font-weight: 800; }
.page-header p  { color: var(--text-dim); margin-top: 0.5rem; }

/* ── Footer ─────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding:    2.5rem 2rem;
  text-align: center;
  color:      var(--text-dim);
  font-size:  0.85rem;
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--gold); }

.footer-inner {
  max-width: 1140px;
  margin:    0 auto;
  display:   flex;
  flex-direction: column;
  gap:       0.5rem;
  align-items: center;
}

/* ── Network indicator ──────────────────────────────────── */

.node-status {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  font-size:   0.82rem;
  color:       var(--text-dim);
}

.dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
}

.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-red   { background: var(--red);   box-shadow: 0 0 6px var(--red); }

/* ── Tabs ───────────────────────────────────────────────── */

.tabs {
  display:       flex;
  gap:           0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.tab {
  padding:     0.75rem 1.5rem;
  cursor:      pointer;
  font-size:   0.88rem;
  font-weight: 600;
  color:       var(--text-dim);
  border-bottom: 3px solid transparent;
  transition:  all 0.2s;
  min-height:  44px;
}

.tab:hover    { color: var(--text); }
.tab.active   { color: var(--gold); border-color: var(--gold); }

.tab-panel    { display: none; }
.tab-panel.active { display: block; }

/* ── Step list ──────────────────────────────────────────── */

.steps { counter-reset: step; list-style: none; }

.steps li {
  position:    relative;
  padding-left: 2.8rem;
  margin-bottom: 1.5rem;
  counter-increment: step;
}

.steps li::before {
  content:       counter(step);
  position:      absolute;
  left:          0;
  top:           0;
  width:         1.9rem;
  height:        1.9rem;
  background:    var(--gold);
  color:         var(--bg);
  border-radius: 50%;
  font-weight:   800;
  font-size:     0.85rem;
  display:       flex;
  align-items:   center;
  justify-content: center;
}

.steps li strong { display: block; margin-bottom: 0.2rem; }
.steps li p      { color: var(--text-dim); font-size: 0.88rem; }

/* ── Divider ────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Reduced motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
  .theme-toggle { transition: none; }
  .nav-links a { transition: none; }
  .nav-hamburger span { transition: none; }
  input[type="text"]:focus,
  input[type="number"]:focus,
  textarea:focus { transition: none; }
  .tab { transition: none; }
  .meter-fill { transition: none; }
}

/* ── Footer legal ──────────────────────────────────────── */

.footer-legal {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Info card (network metrics) ────────────────────────── */

.info-card {
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1.5rem;
}

.info-card h4 {
  font-size:     0.85rem;
  font-weight:   700;
  color:         var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom:  1rem;
  padding-bottom: 0.5rem;
  border-bottom:  1px solid var(--border);
}

.info-row {
  display:         flex;
  justify-content: space-between;
  align-items:     baseline;
  gap:             0.5rem;
  margin-bottom:   0.5rem;
}

.info-label {
  font-size: 0.88rem;
  color:     var(--text-dim);
}

.info-value {
  font-size:     0.92rem;
  font-weight:   700;
  color:         var(--text);
  text-align:    right;
  font-family:   var(--font);
  white-space:   nowrap;
}

.info-mono {
  font-family: var(--mono);
  font-size:   0.82rem;
  color:       var(--gold);
}

.info-chain {
  text-transform: capitalize;
}

/* ── Meter bar ──────────────────────────────────────────── */

.meter {
  width:         100%;
  height:        6px;
  background:    var(--bg3);
  border-radius: 3px;
  overflow:      hidden;
}

.meter-fill {
  height:         100%;
  background:     var(--gold);
  border-radius:  3px;
  transition:     width 0.3s;
  min-width:      0;
}

.meter-label {
  margin-top:   0.3rem;
  font-size:    0.75rem;
  color:        var(--text-dim);
  text-align:   right;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero h1       { font-size: 2.2rem; }
  .stats-bar     { flex-wrap: wrap; max-width: 100%; }
  .stat-cell     { flex: 1 1 33%; min-width: 120px; }
  .form-wrap     { padding: 1.5rem; }
  .nav-hamburger { display: flex; }

  .nav-links {
    display:        none;
    position:       absolute;
    top:            64px;
    left:           0;
    right:          0;
    flex-direction: column;
    gap:            0.2rem;
    background:     rgba(9,14,26,0.98);
    border-bottom:  1px solid var(--border);
    padding:        1rem 2rem 1.5rem;
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 0.5rem 0; font-size: 1rem; }

  .nav-pill {
    display:    inline-block;
    margin-top: 0.5rem;
    width:      fit-content;
  }
}
