/* css/style-historical.css
   Astrobase Historical — clean glass list
   ALIGNMENT FIX ONLY:
   - do NOT center the whole page (header stays untouched)
   - center only the historical content to the page center
*/

/* =========================
   BASE / THEME
========================= */

*,
*::before,
*::after { box-sizing: border-box; }

:root{
  --bg0:#02030a;
  --bg1:#050711;
  --bg2:#151832;

  --ink:#f4f5ff;
  --muted:rgba(244,245,255,.68);

  --stroke:rgba(255,255,255,.10);

  --panel:rgba(8,10,26,.92);

  --maxw:980px;
  --rCard:16px;
  --sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

html, body{
  margin:0;
  padding:0;
  background: radial-gradient(circle at top, var(--bg2) 0%, var(--bg1) 55%, var(--bg0) 100%);
  color:var(--ink);
  font-family:var(--sans);
  overflow:auto;
}

/* =========================
   ALIGNMENT FIX (CONTENT ONLY)
   - header remains full-width & untouched
========================= */

.page-shell{
  min-height: 100vh;
  width: 100%;
  /* IMPORTANT: no flex / no align-items:center */
}

/* =========================
   LAYOUT
========================= */

.historical-shell{
  width: 100%;
  padding:16px;

  /* center the card area without affecting header */
  max-width: var(--maxw);
  margin: 0 auto;
}

.historical-main{ width:100%; }

.historical-card{
  width:100%;
  border-radius:var(--rCard);
  padding:14px;

  background: radial-gradient(circle at top left, rgba(84,112,255,.18), rgba(8,10,26,.96));
  box-shadow:
    0 20px 44px rgba(0,0,0,.75),
    0 0 0 1px rgba(255,255,255,.06);
}

/* =========================
   STATES
========================= */

.historical-error{
  margin:12px 10px 6px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,90,90,.35);
  background:rgba(80,10,18,.35);
}

.historical-empty{
  margin:12px 10px 6px;
  color:var(--muted);
}

/* =========================
   LIST HEADER (DESKTOP)
========================= */

.historical-list-header{
  padding:8px 12px;
  margin:6px 0 8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(to right, rgba(14,18,52,.85), rgba(7,10,32,.9));

  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.85;

  display:grid;
  grid-template-columns: 200px minmax(0, 1fr) 140px 110px;
  gap:12px;
}

/* =========================
   LIST / ROWS
========================= */

.historical-list{
  max-height: min(70vh, 640px);
  overflow-y:auto;

  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle at top, rgba(8,10,28,.85), rgba(2,4,16,.96));
  padding-bottom:16px;

  scrollbar-width:none;
  -ms-overflow-style:none;
}
.historical-list::-webkit-scrollbar{ width:0; height:0; }

.historical-row{
  display:grid;
  grid-template-columns: 200px minmax(0, 1fr) 140px 110px;
  gap:12px;

  padding:10px 12px;
  font-size:.92rem;

  border-top:1px solid rgba(255,255,255,.06);
}
.historical-row:first-child{ border-top:none; }
.historical-row:hover{ background: rgba(255,255,255,.03); }

/* =========================
   COLUMNS
========================= */

.col-date,
.col-main,
.col-tradition,
.col-actions{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}

.col-date{
  font-variant-numeric: tabular-nums;
  opacity:.92;
}

/* =========================
   ENTRY TITLE
========================= */

.entry-title-link{
  color:var(--ink);
  text-decoration:none;
  font-weight:700;

  font-size:1.05rem;
  line-height:1.35;

  display:block;

  white-space:normal;
  overflow:visible;
  text-overflow:unset;

  letter-spacing:.02em;
}

.entry-title-link:hover{
  text-decoration:underline;
}

/* =========================
   META
========================= */

.entry-meta{
  margin-top:4px;
  font-size:.80rem;
  color:rgba(244,245,255,.78);
}

.meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  align-items:center;
}

.meta-value{
  color:rgba(244,245,255,.88);
  font-weight:560;
}

.meta-sep{ opacity:.35; }

.meta-muted{
  opacity:.60;
  font-style:italic;
}

/* Featured pill */
.pill-featured{
  border-radius:999px;
  padding:2px 8px;
  font-size:.68rem;
  letter-spacing:.12em;
  text-transform:uppercase;

  border:1px solid rgba(255,214,130,.9);
  background: radial-gradient(circle at top, rgba(255,198,93,.95), rgba(96,65,18,.96));
  color:#0a0611;
}

/* =========================
   SIDE COLUMNS
========================= */

.col-tradition{
  font-size:.85rem;
  color:rgba(244,245,255,.75);
}

.col-actions{
  align-items:flex-end;
  gap:8px;
}

.muted{ opacity:.55; }

/* =========================
   BUTTON
========================= */

.btn-small{
  border-radius:999px;
  padding:6px 14px;
  font-size:.75rem;

  border:1px solid rgba(255,255,255,.22);
  background: rgba(8,10,28,.95);
  color: rgba(237,240,255,.92);

  cursor:pointer;
  text-transform:uppercase;
  letter-spacing:.05em;

  transition: background 140ms ease, box-shadow 140ms ease, transform 80ms ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn-small:hover{
  background: rgba(16,22,64,.98);
  box-shadow: 0 6px 16px rgba(0,0,0,.6);
}
.btn-small:active{ transform: translateY(1px); }

/* =========================
   MOBILE
========================= */

.mobile-only{ display:none; }
.desktop-only{ display:block; }

@media (max-width: 720px){
  .historical-shell{
    max-width: 100%;
    margin: 0;
    padding: 16px;
  }

  .historical-list-header{ display:none; }

  .historical-list{
    max-height:none;
    overflow:visible;
    background: transparent;
    border: none;
    padding-bottom: 0;
  }

  .historical-row{
    grid-template-columns: 1fr;
    gap:8px;

    border:1px solid rgba(255,255,255,.10);
    border-radius:14px;
    margin:10px 0;
    background: radial-gradient(circle at top, rgba(8,10,28,.80), rgba(2,4,16,.92));
  }

  .desktop-only{ display:none !important; }
  .mobile-only{ display:inline-block !important; }

  .col-actions{ display:none; }
  .col-tradition{ display:none; }

  .entry-meta{
    display:flex;
    flex-direction:column;
    gap:6px;
  }

  .display-link{
    align-self:flex-start;
    color: rgba(244,245,255,.92);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 560;
    letter-spacing: .02em;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .display-link:hover{
    color: rgba(165,189,255,.95);
  }
}


.meta-line a{
  white-space: nowrap;
}
