/* style.css
   90s aesthetic — chill, square, minimal, mellow red
   not performative, just kind of how a warframe fan site from 2003 might look
   fonts: VT323 (display), Share Tech Mono (body)
*/

/* ─────────────────────────────────────────
   variables
───────────────────────────────────────── */
:root {
  --bg:         #100808;   /* near-black with red tint */
  --surface:    #1c0c0c;   /* card backgrounds */
  --surface2:   #260f0f;   /* slightly lighter surface */
  --border:     #4a1515;   /* default border */
  --border-lit: #8a2020;   /* hover/active border */
  --red:        #c42020;   /* main accent red */
  --red-dim:    #7a1515;   /* subdued red */
  --red-bright: #e83030;   /* timer numbers, highlights */
  --text:       #c8a8a8;   /* body text, warm slightly pinkish */
  --text-dim:   #7a5a5a;   /* secondary text */
  --text-head:  #e8c8c8;   /* headings */
  --timer:      #ff5555;   /* countdown timer color */
  --good:       #558855;   /* "active / here" states */
  --bad:        #885555;   /* "inactive / not here" states */
}

/* ─────────────────────────────────────────
   reset + base
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* subtle scanline texture — very light, just a hint */
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  zoom: 1.7;
}

a { color: var(--red-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}

ul { padding-left: 1.2rem; }
li { margin: 0.25rem 0; line-height: 1.5; }

small { font-size: 0.8em; color: var(--text-dim); }
em { color: var(--text-dim); font-style: normal; }
strong { color: var(--text-head); }

/* ─────────────────────────────────────────
   header
───────────────────────────────────────── */
#site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 2px solid var(--red-dim);
}

#site-title {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  color: var(--red-bright);
  letter-spacing: 0.1em;
  line-height: 1;
}

#last-updated {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

#header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* external links (twitch, market) */
.ext-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  transition: border-color 0.1s, color 0.1s;
}
.ext-link:hover {
  color: var(--text-head);
  border-color: var(--border-lit);
  text-decoration: none;
}
.ext-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   hero — two column layout
───────────────────────────────────────── */
#hero {
  display: flex;
  min-height: 0;
  border-bottom: 1px solid var(--border);
}

.hero-col {
  flex: 1;
  padding: 1rem;
  min-width: 0; /* prevents overflow */
}

#hero-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* the big timer block at the top of each column */
.reset-block {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.reset-label {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

.reset-timer {
  font-family: 'VT323', monospace;
  font-size: 3.5rem;
  color: var(--timer);
  line-height: 1;
  /* subtle pulse on the timer numbers */
  animation: timer-pulse 2s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.85; }
}

.reset-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.col-divider {
  border-color: var(--border);
}

/* card stack inside each hero column */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ─────────────────────────────────────────
   cards — shared component
───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
}

.card-title {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.card-body th {
  color: var(--text-dim);
  text-align: left;
  padding: 0.15rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.card-body td {
  padding: 0.15rem 0.4rem;
  border-bottom: 1px solid var(--bg);
}

.inline-timer {
  font-size: 0.85rem;
  color: var(--timer);
  font-family: 'Share Tech Mono', monospace;
}

.hard-risk {
  color: #e05030;
  font-weight: bold;
}

/* ─────────────────────────────────────────
   open world cycles bar
───────────────────────────────────────── */
#cycles-section {
  border-bottom: 1px solid var(--border);
}

#cycles-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.cycle-card {
  flex: 1;
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.cycle-card:last-child { border-right: none; }

.cycle-name {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.cycle-state {
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  color: var(--text-head);
  line-height: 1.1;
}

.cycle-timer {
  font-size: 0.9rem;
  color: var(--timer);
  margin: 0.15rem 0;
}

.cycle-note {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* state-based coloring for cycle cards */
#card-cetus[data-state="night"] .cycle-state  { color: #8899cc; }
#card-cetus[data-state="day"] .cycle-state    { color: #ccaa55; }
#card-fortuna[data-state="warm"] .cycle-state { color: #cc6644; }
#card-fortuna[data-state="cold"] .cycle-state { color: #6699cc; }

/* ─────────────────────────────────────────
   sections (fissures, misc)
───────────────────────────────────────── */
#fissures-section,
#misc-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.section-header {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--red);
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin-bottom: 0.6rem;
}

/* fissure tabs */
.fissure-tabs {
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.3rem;
}

.tab-btn {
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.2rem 0.7rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
}
.tab-btn:hover  { border-color: var(--border-lit); color: var(--text); }
.tab-btn.active { background: var(--surface2); color: var(--text-head); border-color: var(--red-dim); }

/* fissure table */
.fissure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.fissure-table thead th {
  background: var(--surface);
  color: var(--text-dim);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  text-align: left;
}
.fissure-table tbody td {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--bg);
  border-bottom: 1px solid var(--surface);
}
.fissure-table tbody tr:hover td { background: var(--surface); }

/* misc row */
#misc-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
#misc-row .card { flex: 1; min-width: 240px; }

/* ─────────────────────────────────────────
   gizmos
───────────────────────────────────────── */
.gizmo {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
}

.gizmo-title {
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  color: var(--red-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.gizmo-body {
  font-size: 0.82rem;
  color: var(--text);
  min-height: 3rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.gizmo-btn {
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
}
.gizmo-btn:hover { border-color: var(--border-lit); color: var(--text-head); }



/* ─────────────────────────────────────────
   gif slots
───────────────────────────────────────── */
.gif-slot {
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  overflow: hidden;
}

/* replace the inner span with an actual <img src="your.gif"> to use */
.gif-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0.4rem;
  text-align: center;
}

/* header gif: small square in the top bar */
.gif-slot--header {
  width: 60px;
  height: 40px;
}

/* daily column gif: medium rectangle between the timer and the cards */
.gif-slot--daily {
  width: 100%;
  height: 80px;
  margin-bottom: 0.6rem;
}

/* cycles gif: fits in the row at the end */
.gif-slot--cycles {
  width: 120px;
  height: auto;
  align-self: stretch;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  border-style: none none none solid;
  border-color: var(--border);
}


/* misc gif slot — sits beside the lotus gizmo */
.gif-slot--misc {
  width: 180px;
  height: auto;
  align-self: stretch;
  flex-shrink: 0;
  min-height: 120px;
}

/* secret gif panel — hidden until easter egg triggered */
.gif-slot--secret {
  width: 280px;
  height: 160px;
  margin: 0 auto 0.5rem;
  border-color: var(--red-dim);
}

/* ─────────────────────────────────────────
   easter egg panel
───────────────────────────────────────── */
#easter-egg-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--surface);
  border: 1px solid var(--red-dim);
  padding: 0.75rem;
  z-index: 100;
  text-align: center;
}

#easter-egg-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
}
#easter-egg-close:hover { color: var(--text-head); }

#easter-egg-trigger {
  cursor: pointer;
  color: var(--border);
  font-size: 1rem;
  user-select: none;
  transition: color 0.2s;
}
/* no obvious hover color change — just slightly less dim, so it doesn't scream "click me" */
#easter-egg-trigger:hover { color: var(--red-dim); }

/* ─────────────────────────────────────────
   footer
───────────────────────────────────────── */
#site-footer {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
#site-footer a { color: var(--text-dim); }
#site-footer a:hover { color: var(--text); }

/* ─────────────────────────────────────────
   utility
───────────────────────────────────────── */
.hidden { display: none !important; }

/* ─────────────────────────────────────────
   scrollbar — subtle red tint, fits the theme
───────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--border-lit); }
