/* =========================
   Volitionism — main.css
   Consolidated, consistent styling for:
   - index.html
   - definition.php
   - explanation.php
   ========================= */

/* ---- Reset / base ---- */
html, body {
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Theme ---- */
:root {
  --bg: #07080c;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);
  --line: rgba(255, 255, 255, 0.18);
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.10);
  --max: 980px;
  --radius: 18px;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 500px at 75% 15%, rgba(255,255,255,.08), transparent 55%),
    radial-gradient(600px 380px at 25% 10%, rgba(255,255,255,.05), transparent 55%),
    radial-gradient(900px 700px at 50% 100%, rgba(255,255,255,.04), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* ---- Layout container ---- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 20px 44px;

  /* Prevent margin-collapse surprises */
  display: flow-root;
}

/* ---- Typography ---- */
h1 {
  margin: 0 0 14px;
  text-align: center;
  letter-spacing: 0.10em;
  font-weight: 750;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.05;
}

p {
  margin: 0 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

/* When inside .content, paragraphs should be left-aligned for readability */
.content p {
  text-align: left;
  color: var(--muted);
  font-size: 15.5px;
}

/* Headings inside content */
.content h2 {
  margin: 22px 0 10px;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: rgba(255,255,255,.88);
}

/* Lists inside content */
.content ul {
  margin: 8px 0 16px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
  text-align: left;
}

.content li {
  margin: 6px 0;
}

/* Links */
a {
  color: rgba(255,255,255,.92);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

/* ---- Hero image ---- */
#mind_image{
  margin: 18px auto 0;
  padding: 0 18px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  box-shadow: 0 20px 80px rgba(0,0,0,.45);
  display: flex;
  align-items: stretch;
}

/* side gutters expand/contract with the viewport */
#mind_image .fade{
  flex: 1 1 0;
  min-width: 0;
}

/* center stays centered and does NOT compress unexpectedly */
#mind_image .center{
  flex: 0 0 auto;
  width: min(140px, 100%);
}

#mind_image img{
  display: inline-block;
  width: 100%;
  height: auto;
}

/* BLACK at the edge that touches the image, fading outward */
#mind_image .fade.left{
  /* left gutter: black at RIGHT edge (next to image) */
  background: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
}

#mind_image .fade.right{
  /* right gutter: black at LEFT edge (next to image) */
  background: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/* ---- Blog comment panel ---- */
#blogCommentForm input,
#blogCommentForm textarea {
  width: 100%;
  box-sizing: border-box;
}

/* ---- Content panel (used on definition/explanation pages) ---- */
.content {
  /* margin: 18px auto 22px; */
  max-width: 940px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  padding: 18px 18px 6px;
}

/* Make the page label line a touch stronger (the <p><strong>Learn more</strong></p>) */
p strong {
  color: rgba(255,255,255,.90);
}

/* ---- Tabs nav ---- */
.home-tabs {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.home-tabs .tab {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  background: var(--panel);
  color: rgba(255,255,255,.92);
  font-size: 14px;
  letter-spacing: 0.2px;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.home-tabs .tab:hover {
  background: var(--panel2);
  border-color: rgba(255,255,255,.30);
  transform: translateY(-1px);
}

.home-tabs .tab.active {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 0 0 6px rgba(255,255,255,.03);
  font-weight: 700;
}

#mind_image img {
    height: 200px;
    width: 140px;
}

#footer {
  padding-top: 18px;
}

table, form {
  margin-left: auto;
  margin-right: auto;
}

.grecaptcha-badge{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  z-index:2147483647 !important;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 520px) {
  .container {
    padding: 34px 16px 36px;
  }

  #mind_image,
  .content {
    border-radius: 14px;
  }

  .home-tabs .tab {
    padding: 10px 14px;
  }
}
/* ---- Contact form ---- */
.contact-form, .comment-form, .subscribe-form {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.contact-form label, .subscribe-form label, .comment-form label {
  display: grid;
  gap: 6px;
  text-align: left;
}

.contact-form span, .subscribe-form span, .comment-form span {
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

.contact-form input, .subscribe-form input:not([type="checkbox"]):not([type="radio"]), .comment-form input,
.contact-form textarea, .subscribe-form textarea, .comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.92);
  outline: none;
}

.subscribe-form .radio-group {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

/* Each radio+label row */
.subscribe-form .radio-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;

  /* override leaked styles */
  width: auto;
  text-align: left;
  margin-bottom: 0.5rem;
}

/* Radio itself */
.subscribe-form input[type="radio"] {
  margin: 0;
  width: auto;
  display: inline-block;
  flex: 0 0 auto;
}

.contact-form input:focus, .subscribe-form input:focus, .comment-form input:focus,
.contact-form textarea:focus, .subscribe-form textarea:focus, .comment-form textarea:focus {
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.07);
}

.form-btn{
  margin-top: 6px;
  justify-self: start;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  cursor: pointer;
}

.form-btn:hover{
  background: rgba(255,255,255,.14);
}

.form-alert{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
}
    /* Admin-only additions */
    .admin-meta {
      text-align:center;
      color: rgba(255,255,255,.65);
      font-size: 13px;
      margin-bottom: 14px;
    }
    table.admin-table {
      width: 100%;
      border-collapse: collapse;
      margin: 14px auto 0;
      overflow: hidden;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,.18);
      background: rgba(255,255,255,.03);
    }
    table.admin-table th, table.admin-table td {
      padding: 10px 12px;
      border-bottom: 1px solid rgba(255,255,255,.10);
      text-align: left;
      color: rgba(255,255,255,.86);
      font-size: 14px;
      vertical-align: top;
    }
    table.admin-table th {
      color: rgba(255,255,255,.92);
      background: rgba(255,255,255,.06);
      font-weight: 650;
      letter-spacing: .02em;
    }
    table.admin-table tr:last-child td { border-bottom: none; }

    .actions {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }
    .link-btn {
      display: inline-block;
      padding: 8px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.22);
      background: rgba(255,255,255,.10);
      color: rgba(255,255,255,.92);
      text-decoration: none;
      font-size: 13px;
      cursor: pointer;
    }
    .link-btn:hover { background: rgba(255,255,255,.14); }

    .danger {
      border-color: rgba(255,140,140,.28);
    }
    .form-alert.success { border-color: rgba(140,255,170,.25); }
    .form-alert.error   { border-color: rgba(255,140,140,.25); }

    /* Keep delete form from inheriting grid layout rules */
    form.inline { display: inline; margin: 0; }
    
    .topic-tabs {
      display: flex;
      gap: 10px;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      margin: 16px auto 0;
      max-width: 940px;
    }

    .topic-tabs a {
      display: inline-block;
      padding: 10px 14px;
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 999px;
      text-decoration: none;
      background: rgba(255,255,255,.06);
      color: rgba(255,255,255,.92);
      font-size: 14px;
      letter-spacing: 0.2px;
      transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
      max-width: 100%;
    }

    .topic-tabs a:hover {
      background: rgba(255,255,255,.10);
      border-color: rgba(255,255,255,.30);
      transform: translateY(-1px);
    }

    .topic-tabs a.active {
      background: rgba(255,255,255,.14);
      border-color: rgba(255,255,255,.42);
      box-shadow: 0 0 0 6px rgba(255,255,255,.03);
      font-weight: 700;
    }

    .topic-meta {
      margin-top: 6px;
      text-align: left;
      color: rgba(255,255,255,.65);
      font-size: 13px;
    }

    .topic-blurb {
      margin-top: 10px;
      text-align: left;
      color: rgba(255,255,255,.75);
      font-size: 15px;
      line-height: 1.7;
    }

    /* Make long bodies readable; preserve line breaks without forcing monospace */
    .topic-body {
      white-space: pre-wrap;
    }

    /* If there are many topics, give tabs a gentle scrolling behavior on very small screens */
    @media (max-width: 520px) {
      .topic-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 6px 6px 10px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 14px;
        background: rgba(255,255,255,.03);
      }
      .topic-tabs a {
        flex: 0 0 auto;
      }
    }