:root {
  --bg: #020617;
  --card: rgba(15, 23, 42, 0.7);
  --accent: #6ee7b7;
  --accent-glow: rgba(110, 231, 183, 0.3);
  --muted: #94a3b8;
  --text: #f8fafc;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at top right, #0f172a, #020617);
  color: var(--text);
  font-family: "Noto Sans TC", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 100px; 
}

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

header h1 {
  font-size: 1.5rem;
  letter-spacing: 1px;
  background: linear-gradient(to right, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 52px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  padding: 10px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(110,231,183,0.12);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--text);
}

.page-nav {
  display: flex;
  gap: 15px;
}

.page-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: 0.3s;
}

.page-nav a:hover, .page-nav a.active {
  color: var(--accent);
}

/* --- 主容器 --- */
.hero {
  background: radial-gradient(circle at top left, rgba(110,231,183,0.2), transparent 35%),
              linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
  text-align: center;
  padding: 45px 35px;
}

.hero-desc {
  color: var(--muted);
  margin-top: 18px;
  font-size: 1rem;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.rainbow-text {
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #ff3d81, #ffb347, #7cffcb, #3b82f6, #be22ff);
  background-size: 500% 100%;
  color: transparent;
  -webkit-background-clip: text;
  animation: rainbowShift 8s linear infinite;
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.section {
  margin-top: 30px;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #e2e8f0;
}

.info-grid,
.vertical-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.info-panel {
  background: rgba(10, 18, 34, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 28px;
  min-height: auto;
}

.info-panel h3 {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 1.05rem;
}

.info-list,
.spec-list {
  list-style: none;
  color: var(--text);
  line-height: 1.9;
}

.spec-list dt {
  font-weight: 700;
  color: var(--accent);
}

.spec-list dd {
  margin: 0 0 12px 0;
  color: var(--muted);
}

.grid .card {
  min-height: 160px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.link-card,
.action-card {
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}

.link-card:hover,
.action-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: rgba(110,231,183,0.12);
}

.action-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.action-card:hover {
  color: var(--text);
}

.action-card::after {
  content: "點擊前往";
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

.copy-card::after {
  content: "點擊複製";
}

.copy-button {
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.copy-button:hover {
  background: rgba(110,231,183,0.12);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card p,
.card span,
.card dt,
.card dd,
.card li {
  color: var(--text);
}

.card strong {
  color: var(--accent);
}

@media (max-width: 980px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 140px;
  }

  header {
    flex-direction: column;
    height: auto;
    padding: 15px;
  }

  .brand {
    align-items: center;
  }

  .hero {
    padding: 32px 22px;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .page-nav {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
  }

  .val {
    font-size: 2.8rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card {
    padding: 20px;
  }

  .controls {
    flex-direction: column;
  }

  .btn,
  #espIp {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .val {
    font-size: 2.2rem;
  }
}

.wrap {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto 40px;
  flex: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-glow);
}

.kpi {
  display: flex;
  flex-direction: column;
}

.kpi h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.val {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
  font-family: 'Consolas', monospace;
}

.unit {
  font-size: 1rem;
  color: var(--muted);
  margin-left: 5px;
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.btn {
  flex: 1; 
  min-width: 100px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.btn.solid {
  background: var(--accent);
  color: #020617;
  border: none;
}

#espIp {
  flex: 2;
  min-width: 200px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
  color: #fff;
}

.copyright-footer {
  padding: 30px;
  text-align: center;
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  body {
    padding-top: 140px; 

  header {
    flex-direction: column;
    height: auto;
    padding: 15px;
  }

  header h1 {
    margin-bottom: 10px;
  }

  .page-nav {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
  }

  .val {
    font-size: 2.8rem; 
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card {
    padding: 20px;
  }

  .controls {
    flex-direction: column;
  }

  .btn, #espIp {
    width: 100%; 
  }
}

@media (max-width: 380px) {
  .val {
    font-size: 2.2rem;
  }
}
