/* =============================================================================
   BTC TIME SERVICE - MASTER STYLESHEET
   v0.0.6
   style.css
   Tuesday 14th July 2026 01:47 UTC
   
   Unified CSS for: Time Display + FAQ + Legals + Donate Pages
   Theme: Green Terminal / CRT Scanline Aesthetic + Rollovers
   
   120726 update:  `margin: 0 auto`,hugging the left, it's usually because the `body` (the parent) isn't explicitly telling its children how to align
   turned the `body` into a Flexbox container
   120726 full retro CRT terminal look

   ============================================================================= */


/* --- RESET & BASE --- */
/* CRT */
body {
  font-family: 'Courier New', Courier, monospace;
  background: #000;
  color: #ddd;
  margin: 0;
  padding: 20px;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  width: 100%;
}

/* INTERLACE - Static horizontal lines (background only) */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  background: linear-gradient(#888 50%, #000 50%);
  background-size: 100% 4px;
  background-repeat: repeat-y;
  opacity: 0.08;
}

/* ENVELOPE - Vignette + moving scanline (background only) */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* MOVING SCANLINE - Bright bar scrolling down */
@keyframes crt-scanline {
  0% { top: 0; }
  100% { top: 100%; }
}

/* SUBTLE FLICKER */
@keyframes crt-flicker {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.06; }
}

/* CRT FLICKER ANIMATION */
@keyframes crt-flicker {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  100% { opacity: 0.97; }
}

/* CONTAINER - Phosphor glow terminal screen */
.container {
  max-width: 1000px;
  width: 90%;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 20px;
  margin-bottom: 20px;
  display: block;
  border: 2px solid #00ff88;
  padding: 20px;
  box-shadow: 
    0 0 30px rgba(0, 255, 136, 0.3),
    0 0 60px rgba(0, 255, 136, 0.15),
    inset 0 0 20px rgba(0, 255, 136, 0.05);
  background: rgba(0, 20, 0, 0.85);
  backdrop-filter: blur(3px);
  text-shadow: 0 0 2px rgba(0, 255, 136, 0.8);
}

.container.static-page {
  max-width: 900px;
  width: 95%;
  margin: 0 auto;
  border: 2px solid #00ff88;
  padding: 30px;
  box-shadow: 
    0 0 30px rgba(0, 255, 136, 0.3),
    0 0 60px rgba(0, 255, 136, 0.15),
    inset 0 0 20px rgba(0, 255, 136, 0.05);
  background: rgba(0, 20, 0, 0.9);
  float: none !important;
  text-shadow: 0 0 2px rgba(0, 255, 136, 0.8);
}

/* --- NAV --- */
nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
  padding: 10px 0;
  border-top: 1px dashed #004422;
  border-bottom: 1px dashed #004422;
  flex-wrap: wrap;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #00ff88;
  font-size: 0.85em;
  transition: all 0.2s;
  background: rgba(0, 255, 136, 0.05);
  border-radius: 3px;
}

nav a:hover {
  background: #00ff88;
  color: #000;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* --- HEADINGS --- */
h1, h2, h3 {
  color: #fff;
  border-bottom: 1px solid #004422;
  padding-bottom: 10px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.2em;
  letter-spacing: 1px;
}

h2 {
  color: #ffd700;
  margin-top: 30px;
  font-size: 1.5em;
}

h3 {
  color: #00ff88;
  margin-top: 20px;
  font-size: 1.2em;
}

/* --- TIME DISPLAY --- */
.iso-line {
  text-align: center;
  color: #00ff88;
  font-size: 2.2em;
  font-weight: bold;
  margin: 10px 0;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* --- BOXES --- */
.box {
  border: 1px solid #00ff88;
  padding: 15px;
  margin: 10px 0;
  background: rgba(0, 255, 136, 0.03);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.box:hover {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.label {
  color: #bbb;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

/* --- PRICE --- */
.price {
  font-size: 2.4em;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
  transition: color 0.5s, text-shadow 0.5s;
}

.price-green { color: #00ff88; text-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
.price-red { color: #ff4444; text-shadow: 0 0 10px rgba(255, 68, 68, 0.3); }
.price-yellow { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

/* --- TREND --- */
.trend-indicator {
  text-align: center;
  font-size: 3.2em;
  margin: 5px 0;
  color: #fff;
}

.trend-text {
  font-size: 0.25em;
  vertical-align: middle;
  color: #aaa;
}

/* --- DATA GRID --- */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.data-item {
  border-top: 1px solid #222;
  padding-top: 5px;
  font-size: 0.9em;
  transition: background 0.2s, border-radius 0.2s;
}

.data-item:hover {
  background: rgba(0, 255, 136, 0.05);
  border-radius: 4px;
}

/* --- CHART --- */
.chart-container {
  border: 1px solid #00ff88;
  padding: 15px;
  margin: 10px 0;
  background: rgba(0, 255, 136, 0.03);
  overflow-x: auto;
}

svg {
  width: 100%;
  height: auto;
  max-height: 300px;
  display: block;
}

/* --- OHLC TABLE --- */
.ohlc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8em;
  margin-top: 10px;
}

.ohlc-table th {
  color: #888;
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid #333;
}

.ohlc-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #111;
  color: #ccc;
  transition: background 0.2s;
}

.ohlc-table tr:hover td {
  background: rgba(0, 255, 136, 0.05);
}

/* --- TEXT --- */
p {
  margin-bottom: 15px;
  color: #ccc;
}

.highlight {
  color: #00ff88;
  font-weight: bold;
}

ul {
  list-style-type: square;
  padding-left: 20px;
  margin-bottom: 15px;
}

li {
  margin-bottom: 8px;
  color: #ccc;
  transition: background 0.2s;
  padding: 2px 4px;
  border-radius: 3px;
}

li:hover {
  background: rgba(0, 255, 136, 0.03);
}

ul li::marker {
  color: #00ff88;
}

/* --- WARNING --- */
.warning {
  color: #ff4444;
  border: 1px solid #ff4444;
  padding: 10px;
  margin: 15px 0;
  background: rgba(255, 68, 68, 0.05);
  border-radius: 4px;
}

.warning-center {
  text-align: center;
}

/* --- DONATE --- */
.donate-address {
  font-family: monospace;
  background: #111;
  padding: 10px;
  border-radius: 4px;
  word-break: break-all;
  color: #ffd700;
}

.copy-btn {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid #00ff88;
  color: #00ff88;
  padding: 3px 8px;
  font-size: 0.75em;
  cursor: pointer;
  border-radius: 3px;
  margin-left: 5px;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #00ff88;
  color: #000;
}

/* --- FOOTER --- */
footer {
  margin-top: 30px;
  text-align: center;
  color: #aaa;
  font-size: 0.8em;
  border-top: 1px solid #222;
  padding-top: 15px;
  width: 100%; /* Ensure footer takes full width of container */
}

footer .links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
  padding: 10px 0;
  border-top: 1px dashed #004422;
  border-bottom: 1px dashed #004422;
  flex-wrap: wrap;
}

footer .links a {
  color: #fff;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #00ff88;
  font-size: 0.85em;
  transition: all 0.2s;
  background: rgba(0, 255, 136, 0.05);
  border-radius: 3px;
}

footer .links a:hover {
  background: #00ff88;
  color: #000;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.utc_time_static {
  color: #fff;
  font-size: 1.1em;
  margin-top: 10px;
}

/* --- DONATE CTA --- */
.donate-cta {
  text-align: center;
  margin-top: 20px;
}

.donate-cta .highlight {
  display: block;
  margin-bottom: 10px;
}

.donate-cta a {
  font-size: 3.2em;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  padding: 10px 30px;
  border: 2px solid #ffd700;
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.1);
  transition: all 0.3s;
}

.donate-cta a:hover {
  background: #ffd700;
  color: #000 !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

a {
  color: #4da6ff;
  text-decoration: none;
}

a:visited {
  color: #8cb3ff;
}

a:hover {
  text-decoration: underline;
  color: #66b3ff;
}

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

.live-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* --- NEW AUDIO PLAYER STYLES (Centered & Styled) --- */
.audio-player-inline {
  text-align: center;
  margin: 20px auto; /* Centers the block itself */
  padding: 15px;
  border: 1px solid #00ff88;
  background: rgba(0, 255, 136, 0.03);
  border-radius: 6px;
  max-width: 400px; /* Keeps it compact */
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.audio-player-inline:hover {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.audio-player-inline .audio-label {
  font-size: 0.8em;
  color: #00ff88;
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.audio-player-inline audio {
  width: 100%;
  height: 35px;
  outline: none;
}

/* --- ASCII FOOTER --- */
.ascii-footer {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65em;
  color: #00ff88;
  line-height: 1.1;
  text-align: center;
  overflow-x: auto;
  white-space: pre;
  opacity: 0.7;
  margin: 20px 0;
  padding: 5px;
}

/* --- SERVER SYNC STATUS --- */
#server-sync {
  font-size: 1.1em;
  color: #18ff62;
  margin-top: 5px;
}

@media screen and (max-width: 600px) {
  .audio-player-inline audio { width: 100%; height: 30px; }
  .ascii-footer { font-size: 0.45em; }
  .donate-cta a { font-size: 2em; }
}

/* --- PRINT STYLES --- */
@media print {
  body::before, body::after { display: none; }
  .container { box-shadow: none; border: 1px solid #000; }
  nav, footer, .audio-player-inline { display: none; }
}

/* --- GREEN PHOSPHOR TERMINAL FONTS --- */
body, p, li, td, th, .label, .utc_time_static, .audio-label,
footer, nav a, footer .links a, .data-item span {
  color: #18ff62 !important;
}

h1, h2, h3, .iso-line, .highlight, .box, .chart-container,
.ohlc-table th, nav a, footer .links a {
  color: #18ff62 !important;
}

nav a, footer .links a {
  border-color: #18ff62 !important;
}

nav a:hover, footer .links a:hover {
  background: #18ff62 !important;
  color: #000 !important;
}

a, a:visited {
  color: #18ff62 !important;
}

a:hover {
  color: #00ff88 !important;
}

.copy-btn {
  color: #18ff62 !important;
  border-color: #18ff62 !important;
}

.copy-btn:hover {
  background: #18ff62 !important;
  color: #000 !important;
}

.donate-cta a {
  border-color: #18ff62 !important;
  color: #18ff62 !important;
}

.donate-cta a:hover {
  background: #18ff62 !important;
  color: #000 !important;
}

/* --- FIX: Prevent horizontal scroll & center content --- */
body {
  overflow-x: hidden; /* Hides horizontal scrollbar globally */
}

.container {
  max-width: 900px; /* Reduced from 1000px to fit better */
  width: 100%;
  margin: 20px auto; /* Centers the container perfectly */
  overflow-x: hidden; /* Ensures container doesn't spill */
  box-sizing: border-box; /* Includes padding in width calculation */
}

/* Force ASCII art to wrap or shrink instead of scrolling */
.ascii-footer {
  overflow-x: hidden; /* Changed from 'auto' to 'hidden' */
  white-space: pre-wrap; /* Allows wrapping if too wide */
  word-break: break-all; /* Breaks long strings if needed */
  text-align: center;
  font-size: 0.6em; /* Slightly smaller to fit */
  line-height: 1.2;
}

/* --- FIX: Ensure hidden LLM data is truly invisible (black on black) --- */
.cf_time_static, .unix_time_static {
  color: #000000 !important; /* Force black */
  background-color: #000000 !important; /* Ensure no background bleed */
  opacity: 0 !important; /* Extra insurance to hide it */
  pointer-events: none;
  user-select: none;
}

/* --- TIMES SERVED Rolling Analogue Style --- */
.timesserved {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 15px auto;
  font-family: 'Courier New', Courier, monospace;
  color: #18ff62;
  text-shadow: 0 0 5px rgba(24, 255, 98, 0.5);
}

.timesserved span {
  display: block;
  text-align: center;
  margin-bottom: 4px;
  font-size: 1.85em;
  color: #18ff62;
  text-shadow: 0 0 5px rgba(24, 255, 98, 0.5);
}

.timesserved .digits-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.timesserved .digit {
  background: #001100; /* Dark background initially */
  border: 1px solid #004422;
  border-radius: 3px;
  min-width: 24px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  /* Transition for background and transform */
  transition: all 0.3s ease-out, background-color 0.2s ease-in-out;
  opacity: 0; /* Start hidden */
  transform: translateY(-15px); /* Start slightly above */
}

/* The Glow State */
.timesserved .digit.glow {
  background: #003300; /* Lighter green background */
  box-shadow: 0 0 10px rgba(24, 255, 98, 0.6), inset 0 0 5px rgba(24, 255, 98, 0.3);
  border-color: #18ff62;
  color: #fff;
  opacity: 1;
  transform: translateY(0);
}

/* Optional: Fade out after a delay if you want them to disappear? 
   Currently, they stay visible. If you want them to disappear after showing:
   Add a class 'fade-out' via JS later. 
   But usually, counters stay visible. 
   If you mean "glow ON then dim back to dark", see JS logic below.
*/