/* ══════════════════════════════════════════════════════════════
   CC Web — Base Reset, Typography, Scrollbar
   ══════════════════════════════════════════════════════════════ */

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

html { height: 100%; overflow: hidden; }

body {
  font-family: var(--sans);
  background: var(--bg-void);
  color: var(--text-high);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scanline overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-max);
}

code, pre {
  font-family: var(--mono);
  font-size: 12px;
}

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

/* ── Selection ── */
::selection {
  background: rgba(0,195,255,0.25);
  color: var(--text-max);
}

/* ── Scrollbar (WebKit) ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }
::-webkit-scrollbar-corner { background: transparent; }

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

/* ── Focus ── */
:focus-visible {
  outline: 1px solid var(--neon-blue);
  outline-offset: 2px;
}

/* ── Input base ── */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

input[type="text"], input[type="password"], textarea {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-max);
  transition: border-color var(--t-fast);
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: var(--neon-blue);
}

/* ── Button base ── */
button {
  cursor: pointer;
  user-select: none;
}

/* ── Utility ── */
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
