/* xlxr.css — shared styles for XLXREFLECTOR.ORG */
:root {
  --bg: #0a1322;
  --card: #1a2337;
  --text: #e2e8f0;
  --accent: #00d4ff;
  --accent2: #22ff88;
  --border: #2a3a55;
  --visited: #67f0ff;
  --red: #ff4d4d;
  --green: #22ff88;
}
[data-theme="light"] {
  --bg: #f0f4fa;
  --card: #ffffff;
  --text: #1e2937;
  --accent: #0066cc;
  --accent2: #008822;
  --border: #c0d0e8;
  --visited: #0044aa;
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: 'Segoe UI', system-ui, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background 0.4s ease;
}
body:not([data-theme="light"]) {
  background-image: linear-gradient(rgba(0,212,255,0.15) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,212,255,0.15) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 25s linear infinite;
}
body[data-theme="light"] {
  background-image: linear-gradient(rgba(0,102,204,0.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,102,204,0.07) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 30s linear infinite;
}
@keyframes gridMove { 0% { background-position: 0 0; } 100% { background-position: 50px 50px; } }
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: radial-gradient(circle, rgba(0,102,204,0.12) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: dotsMove 45s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
[data-theme="light"] body::before {
  background-image: radial-gradient(circle, rgba(0,80,160,0.09) 1px, transparent 1px);
  opacity: 0.55;
}
@keyframes dotsMove { 0% { background-position: 0 0; } 100% { background-position: 80px 80px; } }
@media (prefers-reduced-motion: reduce) {
  body, body::before { animation: none; }
}
.container { max-width: 920px; margin: 0 auto; padding: 1.5rem 1rem; position: relative; z-index: 1; }
nav {
  background: rgba(26,35,55,0.97);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] nav { background: rgba(255,255,255,0.97); }
.nav-container {
  max-width: 920px; margin: 0 auto; padding: 0 1rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem;
  position: relative;
}
.nav-container a {
  color: #cbd5e1; padding: 1rem 0.9rem; text-decoration: none; transition: all 0.3s;
}
[data-theme="light"] .nav-container a { color: #1e2937; }
.nav-container a:hover, .nav-container a.active {
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
}
.nav-container a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle {
  position: absolute;
  top: 1.1rem; right: 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 14px 6px 10px;
  border-radius: 30px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 200;
  transition: all 0.3s;
}
.theme-toggle:hover { transform: scale(1.05); }
.theme-label { font-size: 0.85rem; font-weight: 500; opacity: 0.9; }
.logo {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
}
.logo-accent { color: var(--accent2); }
.tagline { color: var(--accent); font-size: 1.45rem; margin: 0.5rem 0; }
.subtitle { color: #94a3b8; }
.nav-brand { flex-basis: 100%; text-align: center; padding: 0.6rem 0 0.2rem; }
.nav-brand .logo { font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 0; line-height: 1.15; }
.nav-brand .tagline { font-size: 1.05rem; margin: 0.15rem 0 0; }
.nav-brand .subtitle { font-size: 0.78rem; margin: 0.1rem 0 0; }
.nav-links { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; }
.brand-line { display: flex; align-items: center; justify-content: center; gap: 1.6rem; }
a { color: var(--accent); text-decoration: none; }
a:visited { color: var(--visited); }
a:hover { color: #ffffff; text-decoration: underline; }
[data-theme="light"] a:hover { color: #003366; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: #64748b;
}

/* ---------------------------------------------------------------------
   Page-specific components (formerly inline <style> blocks per page,
   now consolidated here so the HTML files carry no styling of their own)
   --------------------------------------------------------------------- */

/* Home: announcements, call-channel, downloads, live dashboard grid */
.announcement, .call-channel, .download-section {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.4rem;
  border: 1px solid var(--border);
}
.call-channel { border-left: 6px solid var(--accent); }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0;
}
.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}
.dashboard-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
}
.dashboard-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.peanut-card { text-align: left; }
.peanut-card .peanut-header { text-align: center; margin-bottom: 0.9rem; }
.peanut-status-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.peanut-status-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0; }
.peanut-status-list small { opacity: 0.65; }
.status-light {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: #666; box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.status-light.status-up { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.status-light.status-down { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.peanut-updated { font-size: 0.75rem; opacity: 0.6; margin-top: 0.7rem; text-align: center; }
.last-callsign {
  margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed var(--border);
  font-size: 0.8rem; opacity: 0.85; color: var(--accent2);
}
.last-callsign .lc-value { font-weight: 600; color: var(--accent2); }
.node-count {
  margin-top: 0.3rem;
  font-size: 0.8rem; opacity: 0.85; color: var(--accent2);
}
.node-count .nc-value { font-weight: 600; color: var(--accent2); }

/* Dos & Don'ts: rule cards */
.rule-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.3rem;
  border: 1px solid var(--border);
}
.do-not { border-left: 6px solid var(--red); }
.do     { border-left: 6px solid var(--green); }

/* Requirements: alert card + example block */
.alert-card {
  background: var(--card);
  border-left: 6px solid var(--red);
  padding: 1.6rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}
.example {
  background: var(--card);
  border-left: 6px solid var(--accent);
  padding: 1.4rem;
  margin: 1.5rem 0;
  border-radius: 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.2rem;
  text-align: center;
}
