/* ============================================================
   Star Trek Fan Site — LCARS-inspired theme
   Designed for Synology Web Station / Apache
   ============================================================ */

:root {
  --bg: #0a0a12;
  --bg-alt: #0f0f1a;
  --panel: #151525;
  --text: #e8e8f0;
  --muted: #9a9ab0;
  --gold: #ffcc00;
  --gold-dim: #c9a000;
  --orange: #ff9900;
  --red: #cc3333;
  --blue: #4499cc;
  --teal: #33aacc;
  --purple: #9966cc;
  --lcars-orange: #ff9900;
  --lcars-pink: #cc6699;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Header / Nav ---------- */
.lcars-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 3px solid var(--gold);
  padding: 0.4rem 0;
}

.lcars-bar {
  height: 28px;
  flex-shrink: 0;
  border-radius: 0 14px 14px 0;
}

.lcars-bar.left {
  width: 48px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  margin-right: 0.75rem;
  border-radius: 0 14px 14px 0;
}

.lcars-bar.right {
  width: 80px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  margin-left: auto;
  border-radius: 14px 0 0 14px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem 0;
}

.nav-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 160px 120px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 200px 50px, rgba(255,200,100,0.7), transparent),
    radial-gradient(1px 1px at 250px 160px, #fff, transparent),
    radial-gradient(1px 1px at 300px 90px, rgba(255,255,255,0.5), transparent);
  background-size: 350px 200px;
  animation: drift 120s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: 350px 200px; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.delta {
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 18px rgba(255, 204, 0, 0.45));
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255, 204, 0, 0.35);
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.tagline em {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.mission {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn-engage {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--bg);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  padding: 0.85rem 2.2rem;
  border-radius: 4px 20px 4px 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(255, 153, 0, 0.4);
}

.btn-engage:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 153, 0, 0.6);
}

.btn-engage:active {
  transform: scale(0.98);
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section.alt {
  background: var(--bg-alt);
  max-width: none;
  padding-left: max(1.5rem, calc((100% - 1100px) / 2 + 1.5rem));
  padding-right: max(1.5rem, calc((100% - 1100px) / 2 + 1.5rem));
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gold-dim);
  padding-bottom: 0.75rem;
}

.lcars-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  background: var(--orange);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 0 12px 12px 0;
  padding: 0 0.6rem;
}

.section-header h2 {
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.series-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.35rem 1.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 204, 0, 0.12);
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: rgba(255, 204, 0, 0.4);
  transform: translateY(-3px);
}

.card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.card-accent.gold   { background: var(--gold); }
.card-accent.red    { background: var(--red); }
.card-accent.purple { background: var(--purple); }
.card-accent.teal   { background: var(--teal); }
.card-accent.blue   { background: var(--blue); }
.card-accent.orange { background: var(--orange); }

.card h3 {
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.card p:last-child {
  font-size: 0.92rem;
  color: var(--text);
}

/* ---------- Ships ---------- */
.ship-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.ship-btn {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ship-btn:hover,
.ship-btn.active {
  background: var(--gold);
  color: var(--bg);
}

.ship-display {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid rgba(255, 204, 0, 0.15);
}

.ship-info h3 {
  color: var(--gold);
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.ship-info .registry {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.ship-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 204, 0, 0.15);
}

.ship-stats li {
  font-size: 0.9rem;
}

.ship-stats strong {
  color: var(--gold);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Crew ---------- */
.crew-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.crew-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid rgba(255, 204, 0, 0.1);
  transition: border-color 0.25s;
}

.crew-card:hover {
  border-color: rgba(255, 204, 0, 0.35);
}

.rank {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  color: var(--bg);
}

.rank.gold { background: var(--gold); }
.rank.blue { background: var(--blue); }
.rank.red  { background: var(--red); }

.crew-card h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.crew-card p {
  font-size: 0.85rem;
  color: var(--muted);
}

.quote-small {
  margin-top: 0.6rem !important;
  font-style: italic;
  color: var(--gold) !important;
  font-size: 0.82rem !important;
}

/* ---------- Quotes ---------- */
.quote-box {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  background: var(--panel);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  border-left: 5px solid var(--gold);
}

blockquote {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 1rem;
}

cite {
  display: block;
  color: var(--gold);
  font-style: normal;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.55rem 1.4rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ---------- About ---------- */
.about-content {
  max-width: 640px;
}

.about-content p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.about-content strong {
  color: var(--text);
}

.disclaimer {
  font-size: 0.85rem;
  opacity: 0.75;
  border-top: 1px solid rgba(255, 204, 0, 0.15);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

.live-long {
  font-size: 1.15rem;
  color: var(--gold) !important;
  margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.lcars-footer-bar {
  height: 8px;
  background: linear-gradient(90deg,
    var(--orange) 0%,
    var(--gold) 30%,
    var(--purple) 60%,
    var(--teal) 100%);
  border-radius: 4px;
  margin: 0 auto 1.25rem;
  max-width: 400px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .lcars-bar.left { width: 24px; }
  .lcars-bar.right { width: 36px; }
  .nav-link { font-size: 0.75rem; padding: 0.3rem 0.6rem; }
  .hero { min-height: 70vh; }
  .quote-box { padding: 1.75rem 1.25rem; }
  blockquote { font-size: 1.05rem; }
}
