/* ============================================
   Deep-Space Sovereignty & Quantum Privacy Authority
   脈衝星美學 - 全球私人深空通訊平台
   ============================================ */

:root {
  /* 核心色系 */
  --color-space-black: #0B0E14;
  --color-signal-cyan: #00E5FF;
  --color-pulsar-gold: #FFD700;
  --color-neutron-gray: #4A4A4A;
  
  /* 補充色系 */
  --color-deep-blue: #001a33;
  --color-light-gray: #E0E0E0;
  --color-white: #FFFFFF;
  
  /* 字體堆疊 */
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'Space Mono', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-space-black);
  color: var(--color-light-gray);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   通用元素樣式
   ============================================ */

a {
  color: var(--color-signal-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-pulsar-gold);
  text-shadow: 0 0 10px var(--color-signal-cyan);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-signal-cyan);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 2rem;
  border-bottom: 2px solid var(--color-signal-cyan);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.8rem;
  font-weight: 600;
}

h4 {
  font-size: 1.3rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

code {
  font-family: var(--font-mono);
  background-color: var(--color-deep-blue);
  color: var(--color-signal-cyan);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background-color: var(--color-deep-blue);
  border-left: 3px solid var(--color-signal-cyan);
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
  color: var(--color-signal-cyan);
}

/* ============================================
   導航欄
   ============================================ */

.navbar {
  background-color: rgba(11, 14, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-signal-cyan);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-signal-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.navbar-brand:hover {
  text-shadow: 0 0 15px var(--color-signal-cyan);
}

.nav-link {
  color: var(--color-light-gray);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin: 0 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-signal-cyan);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-signal-cyan);
}

.nav-link.active::after {
  width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-space-black) 0%, var(--color-deep-blue) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  color: var(--color-signal-cyan);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px var(--color-signal-cyan);
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 30px var(--color-signal-cyan);
  }
  50% {
    text-shadow: 0 0 50px var(--color-signal-cyan), 0 0 80px rgba(0, 229, 255, 0.5);
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-pulsar-gold);
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--color-light-gray);
  margin-bottom: 2rem;
  line-height: 1.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.signal-status {
  display: inline-block;
  background-color: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--color-signal-cyan);
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin: 0.5rem;
  animation: signalPulse 2s ease-in-out infinite;
}

@keyframes signalPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
  }
}

/* ============================================
   按鈕樣式
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 2px solid var(--color-signal-cyan);
  background-color: transparent;
  color: var(--color-signal-cyan);
  font-family: var(--font-mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  margin: 0.5rem;
}

.btn:hover {
  background-color: var(--color-signal-cyan);
  color: var(--color-space-black);
  box-shadow: 0 0 20px var(--color-signal-cyan);
}

.btn-primary {
  background-color: var(--color-signal-cyan);
  color: var(--color-space-black);
  border-color: var(--color-signal-cyan);
}

.btn-primary:hover {
  background-color: var(--color-pulsar-gold);
  border-color: var(--color-pulsar-gold);
  box-shadow: 0 0 20px var(--color-pulsar-gold);
}

.btn-gold {
  border-color: var(--color-pulsar-gold);
  color: var(--color-pulsar-gold);
}

.btn-gold:hover {
  background-color: var(--color-pulsar-gold);
  color: var(--color-space-black);
  box-shadow: 0 0 20px var(--color-pulsar-gold);
}

/* ============================================
   四大訊階維度卡片
   ============================================ */

.pillars-section {
  padding: 4rem 2rem;
  background-color: var(--color-space-black);
  position: relative;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pillar-card {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
  border: 1px solid var(--color-signal-cyan);
  padding: 2rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.pillar-card:hover::before {
  left: 100%;
}

.pillar-card:hover {
  border-color: var(--color-pulsar-gold);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
  transform: translateY(-5px);
}

.pillar-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.pillar-card h3 {
  color: var(--color-signal-cyan);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.pillar-card p {
  color: var(--color-light-gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   內容區塊
   ============================================ */

.content-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  border-bottom: 2px solid var(--color-signal-cyan);
  display: inline-block;
  padding-bottom: 0.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.content-card {
  background-color: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--color-neutron-gray);
  padding: 2rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.content-card:hover {
  border-color: var(--color-signal-cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.content-card h3 {
  color: var(--color-signal-cyan);
  margin-bottom: 1rem;
}

.content-card p {
  color: var(--color-light-gray);
  line-height: 1.8;
}

/* ============================================
   規格表格
   ============================================ */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: rgba(0, 229, 255, 0.02);
}

.specs-table thead {
  background-color: rgba(0, 229, 255, 0.1);
}

.specs-table th {
  color: var(--color-signal-cyan);
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--color-signal-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
}

.specs-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-neutron-gray);
  color: var(--color-light-gray);
}

.specs-table tbody tr:hover {
  background-color: rgba(0, 229, 255, 0.05);
}

/* ============================================
   波形干涉效果
   ============================================ */

.wave-interference {
  position: relative;
  height: 200px;
  margin: 2rem 0;
  background: linear-gradient(180deg, var(--color-space-black) 0%, var(--color-deep-blue) 100%);
  border-radius: 4px;
  overflow: hidden;
}

.wave-interference svg {
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

/* ============================================
   頁腳
   ============================================ */

footer {
  background-color: rgba(11, 14, 20, 0.95);
  border-top: 1px solid var(--color-signal-cyan);
  padding: 3rem 2rem;
  margin-top: 4rem;
  box-shadow: 0 -10px 30px rgba(0, 229, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--color-signal-cyan);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--color-light-gray);
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: var(--color-signal-cyan);
  text-shadow: 0 0 10px var(--color-signal-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--color-neutron-gray);
  padding-top: 2rem;
  text-align: center;
  color: var(--color-neutron-gray);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ============================================
   響應式設計
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .nav-link {
    margin: 0.5rem;
    font-size: 0.85rem;
  }
  
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   動畫效果
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* ============================================
   模態窗口
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--color-deep-blue);
  border: 2px solid var(--color-signal-cyan);
  padding: 2rem;
  border-radius: 4px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-signal-cyan);
  padding-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  border: none;
  padding: 0;
  color: var(--color-signal-cyan);
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-signal-cyan);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: var(--color-pulsar-gold);
  text-shadow: 0 0 10px var(--color-pulsar-gold);
}

/* ============================================
   物理組件詳解
   ============================================ */

.component-detail {
  background-color: rgba(0, 229, 255, 0.03);
  border-left: 3px solid var(--color-signal-cyan);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.component-detail h4 {
  color: var(--color-signal-cyan);
  margin-bottom: 0.8rem;
}

.component-detail p {
  color: var(--color-light-gray);
  margin-bottom: 0.5rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-neutron-gray);
}

.spec-label {
  color: var(--color-pulsar-gold);
  font-family: var(--font-mono);
  font-weight: 600;
}

.spec-value {
  color: var(--color-signal-cyan);
  font-family: var(--font-mono);
}

/* ============================================
   滾動動畫
   ============================================ */

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
