/* AIxMAR Design System - Midnight Geek Theme */
:root {
  --bg-primary: #050811;
  --bg-secondary: #0B0F19;
  --bg-tertiary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(31, 41, 55, 0.8);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 242, 155, 0.4);
  
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --accent-neon: #00F29B;
  --accent-neon-glow: rgba(0, 242, 155, 0.25);
  --accent-purple: #8B5CF6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  --accent-blue: #3B82F6;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

/* 背景動態微光 & 網格 */
.bg-glow {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.bg-glow-1 {
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, var(--accent-neon-glow), transparent 70%);
}

.bg-glow-2 {
  top: 300px;
  right: 5%;
  background: radial-gradient(circle, var(--accent-purple-glow), transparent 70%);
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1200px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography Utilities */
.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--accent-neon) 80%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-text {
  color: var(--accent-neon);
  text-shadow: 0 0 12px var(--accent-neon-glow);
}

/* 品牌 Logo */
.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: #FFFFFF;
}

.logo-ai {
  color: #FFFFFF;
}

.logo-x {
  color: var(--accent-neon);
  margin: 0 1px;
  position: relative;
  text-shadow: 0 0 10px var(--accent-neon-glow);
}

.logo-mar {
  color: var(--accent-purple);
}

/* 導覽列 */
.navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(5, 8, 17, 0.75);
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-neon);
  box-shadow: 0 0 8px var(--accent-neon);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 155, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 242, 155, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 155, 0); }
}

/* 按鈕系統 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-neon), #00c97e);
  color: #050811;
  box-shadow: 0 0 20px rgba(0, 242, 155, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 242, 155, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-accent {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.btn-accent:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: var(--accent-purple);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: #c4b5fd;
  margin-bottom: 24px;
}

.badge-arrow {
  color: var(--accent-neon);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 36px;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

/* Hero 雙核聯動展示區 (Demo Showcase) */
.demo-showcase {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-top: 20px;
  text-align: left;
}

.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.demo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.pulse-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-neon);
  box-shadow: 0 0 10px var(--accent-neon);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.3fr 100px 1fr;
  gap: 20px;
  align-items: center;
}

/* 終端機卡片 */
.terminal-card {
  background: #04060c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  background: #0d121f;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.terminal-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-neon);
  background: rgba(0, 242, 155, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.terminal-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 250px;
  line-height: 1.6;
}

.t-line {
  margin-bottom: 6px;
  word-break: break-all;
}

.t-prompt {
  color: var(--accent-neon);
  font-weight: 700;
  margin-right: 6px;
}

.t-indent {
  padding-left: 20px;
  color: #a5b4fc;
}

.text-info { color: #60a5fa; }
.text-purple { color: #c084fc; }
.text-neon { color: var(--accent-neon); }
.text-success { color: #34d399; font-weight: 600; }
.text-muted { color: var(--text-muted); }

/* 資料串流動畫 */
.stream-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.data-pulse {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-neon));
  border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-neon);
  position: relative;
  overflow: hidden;
}

.data-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: white;
  animation: streamAnim 1.8s infinite;
}

@keyframes streamAnim {
  0% { left: -100%; }
  100% { left: 100%; }
}

.stream-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.2;
}

.stream-label span {
  color: var(--accent-neon);
  font-weight: 700;
  font-family: var(--font-mono);
}

/* 手機模擬器 (Smartphone Frame) */
.phone-card {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 280px;
  height: 380px;
  background: #000000;
  border-radius: 36px;
  border: 4px solid #2d3748;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 90px;
  height: 18px;
  background: #2d3748;
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
  z-index: 10;
}

.phone-screen {
  flex: 1;
  padding: 20px 14px 10px;
  background: radial-gradient(circle at 50% 30%, #1e1b4b, #030712);
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-clock {
  font-size: 2.2rem;
  font-weight: 300;
  text-align: center;
  color: #FFFFFF;
  margin-top: 10px;
}

.phone-date {
  font-size: 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

/* 推播通知卡片 */
.push-notification {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.push-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.push-app-icon {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--accent-neon), var(--accent-purple));
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #000;
}

.push-app-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.push-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: auto;
}

.push-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.push-body {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
  margin-bottom: 8px;
}

.push-footer {
  display: flex;
  justify-content: flex-end;
}

.tag-metric {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 242, 155, 0.25);
  color: var(--accent-neon);
  border: 1px solid rgba(0, 242, 155, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
}

.phone-bottom-bar {
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  margin: auto auto 4px;
}

/* 核心雙引擎區塊 (Engines Section) */
.engines-section {
  padding: 100px 0;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(to bottom, transparent, rgba(11, 15, 25, 0.6));
}

.section-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--accent-neon);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 620px;
  margin-bottom: 50px;
}

.engines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.engine-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.engine-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-card-hover);
}

.engine-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.engine-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.icon-neon {
  background: rgba(0, 242, 155, 0.1);
  color: var(--accent-neon);
  border: 1px solid rgba(0, 242, 155, 0.25);
}

.icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.engine-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.pill-neon {
  background: rgba(0, 242, 155, 0.12);
  color: var(--accent-neon);
}

.pill-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
}

.engine-name {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.engine-lead {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.engine-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.engine-features li {
  display: flex;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.feat-check {
  color: var(--accent-neon);
  font-weight: 800;
}

.engine-features strong {
  color: var(--text-primary);
}

/* 開發者體驗區 (Developer Section) */
.dev-section {
  padding: 90px 0;
  border-top: 1px solid var(--border-color);
}

.dev-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.lang-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.lang-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-tab.active {
  background: var(--bg-tertiary);
  color: var(--accent-neon);
  font-weight: 600;
}

.code-box-wrapper {
  background: #04060c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.code-box-header {
  background: #0b101d;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-tab-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.code-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: auto;
}

/* Waitlist 區塊 */
.waitlist-section {
  padding: 90px 0;
  border-top: 1px solid var(--border-color);
}

.waitlist-box {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(0, 242, 155, 0.3);
  box-shadow: 0 0 50px rgba(0, 242, 155, 0.08);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.waitlist-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.waitlist-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 36px;
}

.waitlist-form {
  max-width: 560px;
  margin: 0 auto 24px;
}

.form-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-group input {
  flex: 1;
  min-width: 240px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--accent-neon);
  box-shadow: 0 0 16px var(--accent-neon-glow);
}

.form-message {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  color: var(--accent-neon);
}

.form-message.error {
  display: block;
  color: #f87171;
}

.waitlist-perks {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* 頁尾 (Footer) */
.footer {
  border-top: 1px solid var(--border-color);
  background: #03050a;
  padding: 60px 0 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 16px 0 20px;
  max-width: 320px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--accent-neon);
}

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

/* 響應式調整 (Responsive Design) */
@media (max-width: 992px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
  
  .stream-connector {
    transform: rotate(90deg);
    margin: 20px 0;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
}
