/* ============================================================================
   PHANTASM SOVEREIGNTY - DESIGN SYSTEM & GLOBAL STYLES
   ============================================================================
   
   Design Philosophy: Surrealist Void Aesthetic
   - Deep immersion through color and typography
   - Liquid light flows with neon accents
   - Möbius strip structural principles
   - Desire control and cross-reality transcendence
   
   Color Palette:
   - Primary: #1A0033 (虛無深紫 - Void Purple)
   - Accent: #FF007F (多巴胺螢光紅 - Dopamine Neon Red)
   - Highlight: #D4AF37 (神經突觸金 - Synaptic Gold)
   - Transition: #00FFFF (數位迷幻青 - Digital Cyan)
   
   Typography: High-tech, hypnotic sans-serif with glow effects
   ============================================================================ */

:root {
  --color-void-purple: #1A0033;
  --color-dopamine-red: #FF007F;
  --color-synaptic-gold: #D4AF37;
  --color-digital-cyan: #00FFFF;
  --color-dark-bg: #0a0015;
  --color-light-text: #f0f0f0;
  --color-muted-text: #b0b0b0;
  
  --font-display: 'Orbitron', 'Courier New', monospace;
  --font-body: 'Space Mono', 'Courier New', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-glitch: all 0.15s ease-out;
  --shadow-glow: 0 0 20px rgba(255, 0, 127, 0.3);
  --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-dark-bg);
  color: var(--color-light-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  color: var(--color-dopamine-red);
  text-shadow: 0 0 30px var(--color-dopamine-red), 0 0 60px rgba(255, 0, 127, 0.3);
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  color: var(--color-digital-cyan);
  text-shadow: 0 0 20px var(--color-digital-cyan);
}

h3 {
  font-size: 1.8rem;
  color: var(--color-synaptic-gold);
  text-shadow: 0 0 15px var(--color-synaptic-gold);
}

h4 {
  font-size: 1.4rem;
  color: var(--color-light-text);
}

p {
  margin-bottom: 1.2rem;
  color: var(--color-light-text);
  line-height: 1.8;
}

a {
  color: var(--color-digital-cyan);
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
}

a:hover {
  color: var(--color-dopamine-red);
  text-shadow: 0 0 10px var(--color-dopamine-red);
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.navbar {
  background: linear-gradient(135deg, var(--color-void-purple) 0%, rgba(26, 0, 51, 0.8) 100%);
  border-bottom: 2px solid var(--color-digital-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dopamine-red) !important;
  text-shadow: 0 0 15px var(--color-dopamine-red);
  letter-spacing: 0.1em;
}

.navbar-nav .nav-link {
  color: var(--color-light-text) !important;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--transition-smooth);
}

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

.navbar-nav .nav-link:hover {
  color: var(--color-digital-cyan) !important;
  text-shadow: 0 0 10px var(--color-digital-cyan);
}

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

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  padding: 0.8rem 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 0, 127, 0.2);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn-primary {
  background-color: var(--color-dopamine-red);
  color: white;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.5);
}

.btn-primary:hover {
  background-color: #ff1a8f;
  box-shadow: 0 0 30px rgba(255, 0, 127, 0.8);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-digital-cyan);
  color: var(--color-void-purple);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.btn-secondary:hover {
  background-color: #00e6ff;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-synaptic-gold);
  color: var(--color-synaptic-gold);
}

.btn-outline:hover {
  background-color: var(--color-synaptic-gold);
  color: var(--color-void-purple);
  box-shadow: 0 0 20px var(--color-synaptic-gold);
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-void-purple) 0%, #2d0052 50%, var(--color-dark-bg) 100%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite;
  z-index: 1;
}

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

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: fade-in-down 0.8s ease-out;
}

.hero-content p {
  font-size: 1.3rem;
  color: var(--color-digital-cyan);
  margin-bottom: 2rem;
  animation: fade-in-up 0.8s ease-out 0.2s both;
  text-shadow: 0 0 10px var(--color-digital-cyan);
}

.hero-content .btn {
  animation: fade-in-up 0.8s ease-out 0.4s both;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

section {
  padding: 5rem 2rem;
  position: relative;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-digital-cyan), transparent);
  opacity: 0.5;
}

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

.section-title h2 {
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-dopamine-red), transparent);
}

/* ============================================================================
   CARDS & COMPONENTS
   ============================================================================ */

.card {
  background: linear-gradient(135deg, rgba(26, 0, 51, 0.8) 0%, rgba(45, 0, 82, 0.6) 100%);
  border: 1px solid var(--color-digital-cyan);
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.4), 0 0 50px rgba(255, 0, 127, 0.2);
  border-color: var(--color-dopamine-red);
}

.card-header {
  background: linear-gradient(90deg, var(--color-void-purple), rgba(26, 0, 51, 0.5));
  border-bottom: 1px solid var(--color-digital-cyan);
  padding: 1.5rem;
}

.card-title {
  color: var(--color-digital-cyan);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 1.5rem;
}

.card-text {
  color: var(--color-muted-text);
  line-height: 1.8;
}

/* ============================================================================
   GRID LAYOUTS
   ============================================================================ */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.pillar-card {
  background: linear-gradient(135deg, rgba(26, 0, 51, 0.9) 0%, rgba(45, 0, 82, 0.7) 100%);
  border: 2px solid var(--color-digital-cyan);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

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

.pillar-card:hover {
  border-color: var(--color-dopamine-red);
  box-shadow: 0 0 30px rgba(255, 0, 127, 0.4);
  transform: translateY(-10px);
}

.pillar-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-synaptic-gold);
  text-shadow: 0 0 15px var(--color-synaptic-gold);
}

.pillar-title {
  color: var(--color-dopamine-red);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.pillar-desc {
  color: var(--color-muted-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================================
   CONTENT SECTIONS
   ============================================================================ */

.content-block {
  background: linear-gradient(135deg, rgba(26, 0, 51, 0.7) 0%, rgba(45, 0, 82, 0.5) 100%);
  border-left: 4px solid var(--color-dopamine-red);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0;
}

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

.content-block p {
  color: var(--color-muted-text);
}

.tech-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.spec-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-synaptic-gold);
  padding: 1.5rem;
  text-align: center;
}

.spec-label {
  color: var(--color-synaptic-gold);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.spec-value {
  color: var(--color-digital-cyan);
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 0 10px var(--color-digital-cyan);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
  background: linear-gradient(135deg, var(--color-void-purple) 0%, rgba(26, 0, 51, 0.9) 100%);
  border-top: 2px solid var(--color-digital-cyan);
  padding: 3rem 2rem 1rem;
  margin-top: 5rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.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-digital-cyan);
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.footer-section p, .footer-section a {
  color: var(--color-muted-text);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--color-dopamine-red);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
  color: var(--color-muted-text);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes glitch {
  0% {
    clip-path: inset(40% 0 61% 0);
    transform: translate(-2px, -2px);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
    transform: translate(2px, 2px);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
    transform: translate(-2px, 2px);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
    transform: translate(2px, -2px);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
    transform: translate(-2px, -2px);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
    transform: translate(2px, 2px);
  }
}

.glitch-effect {
  animation: glitch 0.3s ease-in-out;
}

@keyframes rgb-split {
  0% {
    text-shadow: 
      -2px 0 #FF007F,
      2px 0 #00FFFF,
      0 0 10px rgba(0, 255, 255, 0.5);
  }
  50% {
    text-shadow: 
      -2px 0 #00FFFF,
      2px 0 #FF007F,
      0 0 10px rgba(255, 0, 127, 0.5);
  }
  100% {
    text-shadow: 
      -2px 0 #FF007F,
      2px 0 #00FFFF,
      0 0 10px rgba(0, 255, 255, 0.5);
  }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  section {
    padding: 3rem 1rem;
  }
  
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar-nav .nav-link {
    margin: 0.5rem 0;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
  text-align: center;
}

.text-gold {
  color: var(--color-synaptic-gold);
  text-shadow: 0 0 10px var(--color-synaptic-gold);
}

.text-cyan {
  color: var(--color-digital-cyan);
  text-shadow: 0 0 10px var(--color-digital-cyan);
}

.text-red {
  color: var(--color-dopamine-red);
  text-shadow: 0 0 10px var(--color-dopamine-red);
}

.glow-box {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.mt-5 { margin-top: 3rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }

.pt-5 { padding-top: 3rem; }
.pb-5 { padding-bottom: 3rem; }
.pt-4 { padding-top: 2rem; }
.pb-4 { padding-bottom: 2rem; }
