/* content/style.css */

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

:root{
  --bg: #ffffff;
  --chrome: #ffffff;     /* header/footer */
  --panel: #ffffff;      /* content area card */
  --text: #0b0b0b;
  --muted: #4b4b4b;

  --border: rgba(0,0,0,0.12);
  --shadow: rgba(0,0,0,0.06);
  --focus: rgba(0,0,0,0.25);

  --maxw: 1100px;
  --pad: 18px;

  /* Retina overlay colors (LIGHT THEME) */
  --retina-tint: rgba(0,0,0,0.35);
  --retina-line: rgba(0,0,0,0.10);

  --svg-bg: #ffffff;
  --svg-core: #ffffff;
  --svg-accent: #0a7a2a;   /* darker green for light */
  --svg-accent2: #00aa44;
}

html[data-theme="dark"]{
  --bg: #121212;
  --chrome: #000000;
  --panel: #0f0f10;

  --text: #f2f2f2;
  --muted: #b7b7b7;

  --border: rgba(255,255,255,0.14);
  --shadow: rgba(0,0,0,0.55);
  --focus: rgba(255,255,255,0.28);

  --retina-tint: rgba(255,255,255,0.06);
  --retina-line: rgba(255,255,255,0.10);

  --svg-bg: #001100;
  --svg-core: #000000;
  --svg-accent: #00aa00;
  --svg-accent2: #00ff44;
}

html, body{ height: 100%; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);

  overflow-x: hidden;
  overflow-y: auto;
}

/* =========================================================
   Radar background + retina overlay (DO NOT push content)
   ========================================================= */

.container{
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  position: relative;
  z-index: 1; /* above the background layers */
}

.page-bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.radar-svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.14;
}

.retina-grid{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;

  background-color: var(--retina-tint);
  background-image:
    linear-gradient(to right, var(--retina-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--retina-line) 1px, transparent 1px);
  background-size: 4px 4px;
}


/* Put real content above both layers */
.site-header,
.site-main,
.site-footer{
  position: relative;
  z-index: 2;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

/* Logo */
.logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo-img{
  height: 88px;
  width: auto;
  display: block;
}

/* Nav (desktop) */
.top-nav{
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Plain text menu items */
.nav-link{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  transition: color 120ms ease, text-decoration-color 120ms ease;
  text-decoration: none;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  text-decoration-color: transparent;
}
.nav-link:hover{
  color: var(--text);
  text-decoration-color: var(--border);
}
.nav-link.is-active{
  color: var(--text);
  text-decoration-color: var(--text);
  font-weight: 600;
}

/* Theme toggle */
.theme-toggle{
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px var(--shadow);
}
.theme-icon{ font-size: 18px; line-height: 1; }

/* Burger (hidden on desktop) */
.menu-toggle{
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px var(--shadow);
}
.menu-icon{ font-size: 18px; line-height: 1; }

/* Focus */
.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
.nav-link:focus-visible,
.footer-link:focus-visible,
.logo:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* Main */
.site-main{
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--pad);
  display: flex;
  align-items: center;
}

.content-card{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 14px 34px var(--shadow);
}

.content-card h1{
  margin: 0 0 10px 0;
  font-size: 22px;
  letter-spacing: -0.2px;
}
.content-card p{
  margin: 0 0 10px 0;
  color: var(--muted);
  line-height: 1.55;
}

.cta-row{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Minimal buttons inside content */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
}
.btn.primary{
  background: rgba(0,0,0,0.06);
}
html[data-theme="dark"] .btn.primary{
  background: rgba(255,255,255,0.08);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  background: var(--chrome);
  padding: 14px var(--pad);
}

/* New 3-column grid */
.footer-grid{
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;

  color: var(--muted);
  font-size: 13px;
}

.footer-left{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Network globe link (left) */
.net-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.net-link:hover{
  color: var(--text);
}

.net-link:visited{ color: inherit; }

.net-icon{
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: transparent;
}

.globe-ico{
  width: 30px;
  height: 30px;
  display: block;
  color: var(--muted);
}

.net-link:hover .globe-ico{
  color: var(--text);
}

.net-text{
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.rpc-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rpc-item{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 12px;
  column-gap: 4px;
  align-items: center;
  min-width: 0;
}

.rpc-label{
  opacity: 0.85;
  white-space: nowrap;
}

.rpc-addr{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  opacity: 0.95;
  padding-right: 2px;
}

/* Status dot */
.rpc-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px var(--chrome), 0 0 0 3px var(--border);
}

.rpc-dot.is-ok{ background: rgba(90, 235, 160, 0.95); }
.rpc-dot.is-bad{ background: rgba(255, 120, 120, 0.95); }
.rpc-dot.is-unknown{ background: rgba(140, 140, 140, 0.55); }

.footer-center{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.footer-copy{ opacity: 0.9; }

.footer-right{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Social icon buttons (square corners, theme safe) */
.social-link{
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;

  border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;

  color: var(--muted);
  text-decoration: none;

  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.social-link:hover{
  transform: translateY(-1px);
  color: var(--text);
  background: rgba(0,0,0,0.04);
}

html[data-theme="dark"] .social-link:hover{
  background: rgba(255,255,255,0.08);
}

.social-icon{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Footer: prevent the Qhash link from turning blue / underlined */
.footer-center a{
  color: inherit;
  text-decoration: none;
}

.footer-center a:visited{
  color: inherit;
}

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

/* Mobile: burger + dropdown nav */
@media (max-width: 640px){
  .header-inner{
    grid-template-columns: auto auto auto;
    grid-template-areas:
      "logo burger theme"
      "nav  nav    nav";
    align-items: center;
  }

  .logo{ grid-area: logo; }
  .menu-toggle{ grid-area: burger; display: inline-flex; justify-self: center; }
  .theme-toggle{ grid-area: theme; justify-self: end; background: var(--panel); }
  .top-nav{ grid-area: nav; }

  .top-nav{
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
  }

  .site-header.nav-open .top-nav{
    display: flex;
  }

  .nav-link{ padding: 6px 0; }

  .site-main{ padding-top: 18px; }

  /* footer mobile */
  .site-footer{
    padding: 12px var(--pad);
  }

  .footer-grid{
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }

  .footer-left{
    align-items: center;
  }

  .net-link{
    justify-content: center;
  }

  .rpc-list{
    width: 100%;
  }

  .rpc-item{
    width: 100%;
    max-width: 520px;
    grid-template-columns: auto minmax(0,1fr) 12px;
  }

  .footer-center{
    justify-content: center;
  }

  .footer-right{
    justify-content: center;
    flex-wrap: wrap;
  }

  .rpc-item{ column-gap: 3px; }
  .rpc-addr{ padding-right: 0; }
}

/* Flex-gap fallback (rare) */
@supports not (gap: 10px){
  .footer-right > a + a{ margin-left: 10px; }
  .footer-center > * + *{ margin-left: 10px; }
}



.content-card{
  /* keep your existing border/shadow/padding */
  background: rgba(255,255,255,0.45);  /* only the background is transparent */
}

html[data-theme="dark"] .content-card{
  background: rgba(15,15,16,0.45);
}
