/* The Forever Beyond — shared vintage theme + responsive layer */

:root {
  --tfb-bg: #000000;
  --tfb-text: #ffffff;
  --tfb-link: #ffff00;
  --tfb-visited: #00ff00;
  --tfb-active: #00ff00;
  --tfb-max-width: 900px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--tfb-bg);
  color: var(--tfb-text);
}

body.tfb-page {
  min-height: 100vh;
}

a:link { color: var(--tfb-link); }
a:visited { color: var(--tfb-visited); }
a:active,
a:hover { color: var(--tfb-active); }

hr { border-color: var(--tfb-link); }

img { max-width: 100%; height: auto; }

table {
  max-width: 100%;
  border-color: var(--tfb-link);
}
td, th { word-break: break-word; }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.tfb-content {
  max-width: var(--tfb-max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.tfb-table-scroll { overflow-x: auto; }
.tfb-table-scroll table { width: auto; }
.tfb-nowrap { white-space: nowrap; }
.tfb-nowrap-cells td, .tfb-nowrap-cells th { white-space: nowrap; }

/* ---- Nav ---- */

.tfb-nav {
  background: #000;
  border-bottom: 2px solid var(--tfb-link);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tfb-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
}

.tfb-nav-brand {
  color: var(--tfb-link);
  font-weight: bold;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.tfb-nav-brand:hover { color: var(--tfb-active); }

.tfb-nav-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tfb-nav-toggle {
  display: none;
  cursor: pointer;
  color: var(--tfb-link);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--tfb-link);
  user-select: none;
}

.tfb-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  padding: 0 1rem 0.75rem;
  margin: 0;
}

.tfb-nav-links a {
  color: var(--tfb-link);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  white-space: nowrap;
}
.tfb-nav-links a:hover { color: var(--tfb-active); text-decoration: underline; }

@media (max-width: 700px) {
  .tfb-nav-toggle { display: inline-block; }

  .tfb-nav-links {
    display: none;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.5rem 1rem 1rem;
  }

  .tfb-nav-check:checked ~ .tfb-nav-links { display: flex; }
}

/* ---- Forms ---- */

.tfb-content form input[type="text"],
.tfb-content form input[type="password"],
.tfb-content form textarea,
.tfb-content form select {
  background: #111;
  color: var(--tfb-text);
  border: 1px solid var(--tfb-link);
  padding: 0.3rem;
  max-width: 100%;
  font-family: inherit;
}

.tfb-content form input[type="submit"],
.tfb-content form input[type="reset"] {
  background: #222;
  color: var(--tfb-link);
  border: 1px solid var(--tfb-link);
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}
.tfb-content form input[type="submit"]:hover,
.tfb-content form input[type="reset"]:hover { color: var(--tfb-active); border-color: var(--tfb-active); }

@media (max-width: 500px) {
  .tfb-content table:not(.tfb-nowrap) { font-size: 0.9rem; }
}
