/* Cyberpunk hi-tech water quality dashboard - cockpit embrace layout.
   Sections: header / status / hero(3) / main-grid(3 cols: left | center
   stage+ship | right) / trend(bottom). Page scrolls slightly if needed. */

:root {
  --bg: #05070f;
  --panel: rgba(12, 18, 32, 0.55);
  --panel-deep: rgba(8, 12, 22, 0.78);
  --panel-border: rgba(0, 229, 255, 0.25);
  --text: #c8d6e5;
  --text-sub: #6b80a3;
  --text-muted: #4a5a75;
  --cyan: #00e5ff;
  --purple: #b14cff;
  --green: #00ff9d;
  --red: #ff3860;
  --warn: #ff9d00;
  --radius: 12px;
  --font-tech: 'Orbitron', 'Rajdhani', 'Courier New', monospace;
  --font-sans: 'Rajdhani', -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  overflow: auto;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(0, 60, 120, 0.28), transparent 60%),
    linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* full-screen container: min 100vh, can grow taller, allows slight scroll */
.app {
  width: 100vw;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 14px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ----- header ----- */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px 12px;
  position: relative;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  flex-shrink: 0;
}
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.7;
}
.header__title {
  font-family: var(--font-tech);
  font-size: 22px; font-weight: 700; letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.7), 0 0 18px rgba(0, 229, 255, 0.35);
  display: flex; align-items: center; gap: 8px;
}
.header__icon { font-size: 22px; filter: drop-shadow(0 0 6px var(--cyan)); }
.header__status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-tech);
  font-size: 11px; letter-spacing: 1px;
  color: var(--text-sub);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2a3a55; }
.dot--green { background: var(--green); box-shadow: 0 0 8px var(--green), 0 0 16px rgba(0,255,157,0.4); }
.dot--gray { background: #2a3a55; }
.dot--red { background: var(--red); box-shadow: 0 0 8px var(--red), 0 0 16px rgba(255,56,96,0.4); }

/* ----- top status row ----- */
.status-row {
  display: flex;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.06), inset 0 0 30px rgba(0, 229, 255, 0.03);
  overflow: hidden;
  flex-shrink: 0;
}
.status-cell { flex: 1; padding: 18px 12px; text-align: center; border-right: 1px solid rgba(0,229,255,0.12); }
.status-cell:last-child { border-right: none; }
.status-cell__label { font-family: var(--font-tech); font-size: 15px; letter-spacing: 1.5px; color: var(--text-sub); margin-bottom: 6px; text-transform: uppercase; }
.status-cell__value { font-family: var(--font-tech); font-size: 20px; font-weight: 700; color: var(--cyan); text-shadow: 0 0 8px rgba(0,229,255,0.4); word-break: break-all; }
.status-cell__value--sm { font-size: 17px; font-weight: 500; }

/* ----- card base (glassmorphism) ----- */
.card {
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.06), inset 0 0 30px rgba(0, 229, 255, 0.03);
  position: relative;
}
.card__header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.card__title {
  font-family: var(--font-tech);
  font-size: 18px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6), 0 0 16px rgba(0, 229, 255, 0.3);
}
.card__unit {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 400;
  color: var(--text-muted);
}

/* ----- HERO ROW: 3 large primary cards ----- */
.hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  flex-shrink: 0;
}
.card--hero {
  padding: 20px 24px 18px;
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.10), rgba(177, 76, 255, 0.04) 70%), var(--panel);
  border-color: rgba(0, 229, 255, 0.42);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.12), inset 0 0 40px rgba(0, 229, 255, 0.06);
}
.card--hero .card__title { font-size: 22px; }
.hero-value {
  font-family: var(--font-tech);
  font-size: 60px; font-weight: 700; letter-spacing: 2px; line-height: 1.1;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.6));
  margin-bottom: 6px;
  flex-shrink: 0;
}
.hero-spark { height: 62px; flex-shrink: 0; }

/* ----- MAIN GRID: 3 columns (left metrics | center stage | right metrics) ----- */
.main-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.8fr 1fr;
  gap: 16px;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.col .card--sat {
  flex: 1 1 0;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 14px;
}

/* ----- satellite card content (enlarged, no clipping) ----- */
.card--sat {
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.06), rgba(177, 76, 255, 0.03) 70%), var(--panel);
  border-color: rgba(0, 229, 255, 0.30);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.08), inset 0 0 30px rgba(0, 229, 255, 0.04);
  overflow: hidden;
}
.card--sat .card__title { font-size: 17px; }
.sat-value {
  font-family: var(--font-tech);
  font-size: 40px; font-weight: 700; line-height: 1.1;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 9px rgba(0, 229, 255, 0.5));
  margin-bottom: 6px;
  flex-shrink: 0;
}
.sat-spark {
  height: 52px;
  flex: 1 1 auto;
  min-height: 40px;
}

/* ----- CENTER STAGE: radar water map + grand hologram ship ----- */
.stage {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.32);
  background: linear-gradient(180deg, rgba(5,8,18,0.92), rgba(8,12,24,0.7));
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.1), inset 0 0 60px rgba(0,229,255,0.05);
}
.stage-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  display: block;
}

/* central hologram: grand glowing line-drawn ship silhouette */
.ship-holo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(44vh, 380px); height: min(44vh, 380px);
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.holo-svg {
  width: 100%; height: 100%;
  filter:
    drop-shadow(0 0 5px rgba(0, 229, 255, 0.9))
    drop-shadow(0 0 14px rgba(0, 229, 255, 0.55))
    drop-shadow(0 0 26px rgba(177, 76, 255, 0.32));
}
.holo-beacon { animation: holoBeacon 1.4s infinite ease-in-out; }
@keyframes holoBeacon {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px #00e5ff); }
  50%      { opacity: 0.25; filter: none; }
}
.holo-ripple {
  transform-box: fill-box; transform-origin: center;
  animation: holoRipple 3s infinite ease-out; opacity: 0;
}
@keyframes holoRipple {
  0%   { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}
.holo-flow {
  stroke-dasharray: 6 8; stroke-dashoffset: 0;
  animation: holoFlow 2.5s infinite linear;
}
@keyframes holoFlow { to { stroke-dashoffset: -28; } }

/* ----- FLOATING TREND PANEL (compact support band) ----- */
.trend-panel {
  background: var(--panel-deep);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow:
    0 -8px 32px rgba(0, 229, 255, 0.10),
    0 0 30px rgba(0, 229, 255, 0.08),
    inset 0 0 50px rgba(0, 229, 255, 0.04);
  padding: 20px 24px 20px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.trend-panel__title {
  font-family: var(--font-tech);
  font-size: 20px; font-weight: 600; letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  margin-bottom: 12px;
}

/* chart wrapper + cockpit corner brackets */
.trend-chart-wrap { position: relative; }
.trend-corner {
  position: absolute; width: 14px; height: 14px;
  border: 0 solid var(--cyan);
  filter: drop-shadow(0 0 4px var(--cyan));
  pointer-events: none; z-index: 1;
}
.trend-corner--tl { top: 0;    left: 0;    border-top-width: 2px;    border-left-width: 2px; }
.trend-corner--tr { top: 0;    right: 0;   border-top-width: 2px;    border-right-width: 2px; }
.trend-corner--bl { bottom: 0; left: 0;    border-bottom-width: 2px; border-left-width: 2px; }
.trend-corner--br { bottom: 0; right: 0;   border-bottom-width: 2px; border-right-width: 2px; }

/* range tabs embedded inside the chart */
.range-tabs { display: flex; gap: 4px; }
.range-tabs--inside {
  position: absolute;
  top: 4px; right: 8px;
  z-index: 4;
  background: rgba(5, 7, 15, 0.55);
  padding: 5px;
  border-radius: 16px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.range-tab {
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.06);
  color: var(--text-sub);
  font-family: var(--font-tech);
  font-size: 14px; letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
}
.range-tab.is-active {
  background: rgba(0, 229, 255, 0.22);
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}
.trend-chart { width: 100%; height: 400px; }

/* ----- footer ----- */
.footer {
  text-align: center;
  font-family: var(--font-tech);
  font-size: 10px; letter-spacing: 2px;
  color: var(--text-muted);
  padding: 8px 0 44px;
  text-transform: uppercase;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer__brand {
  line-height: 1.4;
}
.footer__beian {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: none;
  line-height: 1.6;
}
.footer__beian-link {
  color: #8da2c7;
  text-decoration: none;
  transition: color .2s ease;
}
.footer__beian-link:hover {
  color: #00e5ff;
  text-decoration: underline;
}
.footer__beian--sticky {
  position: static;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  padding: 2px 0 0;
}

/* ----- responsive: narrow screens reflow ----- */
@media (max-width: 980px) {
  html, body { overflow: auto; height: auto; min-height: 100vh; }
  .app { height: auto; min-height: 100vh; overflow: visible; }
  .main-grid { grid-template-columns: 1fr; }
  .stage { height: 300px; }
  .col { flex-direction: row; flex-wrap: wrap; }
  .col .card--sat { flex: 1 1 45%; min-height: 160px; }
}
@media (max-width: 680px) {
  .hero-value { font-size: 42px; }
  .sat-value { font-size: 30px; }
  .trend-chart { height: 300px; }
  .col { flex-direction: column; }
  .col .card--sat { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .hero-row { grid-template-columns: 1fr; }
  .hero-value { font-size: 34px; }
  .stage { height: 240px; }
}
