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

:root {
  --primary-color: #ff6b35;
  --secondary-color: #1e2328;
  --accent-color: #00d4ff;
  --text-light: #ffffff;
  --text-dark: #2c2c2c;
  --text-muted: #777777;
  --bg-dark: #1a1a1a;
  --bg-darker: #0f0f0f;
  --bg-light: #f5f5f5;
  --border-color: #333333;
  --warning-color: #ffb800;
  --success-color: #00ff88;
  --gradient-industrial: linear-gradient(135deg, #1e2328 0%, #2c3e50 100%);
  --gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

body {
  font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background: var(--bg-darker);
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
}

/* 動畫偏好設定 - 減少動畫造成的性能影響 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

.main-header {
  background: var(--gradient-industrial);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 2px solid var(--primary-color);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.version-badge {
  background: var(--gradient-accent);
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::before {
  width: 100%;
}

.nav-links a:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.hero-section {
  background: var(--bg-darker);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: slideInLeft 1s ease-out;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
}

.btn {
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.primary-btn {
  background: var(--gradient-accent);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.secondary-btn {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--accent-color);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 1s ease-out;
}

.tech-diagram {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  max-width: 300px;
  margin: 0 auto;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1.5rem;
  background: var(--gradient-industrial);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-dark);
  transition: all 0.3s ease;
  width: 100%;
  min-height: 100px;
}

.process-step:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.step-icon {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.process-arrow {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: bold;
  margin: 0.3rem 0;
}

.features-section {
  padding: 100px 0;
  background: var(--bg-dark);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 4rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-accent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--gradient-industrial);
  padding: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

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

.feature-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.feature-icon i {
  display: block;
  transition: all 0.3s ease;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tech-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-section {
  padding: 100px 0;
  background: var(--bg-darker);
}

.architecture-diagram {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.arch-layer {
  background: var(--gradient-industrial);
  padding: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.arch-layer:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-glow);
}

.arch-layer h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arch-components {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.component {
  background: var(--bg-darker);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.component:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.comparison-section {
  padding: 100px 0;
  background: var(--bg-dark);
}

.comparison-table {
  background: var(--gradient-industrial);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border-color);
}

.table-header {
  background: var(--bg-darker);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table-header > div,
.table-row > div {
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border-color);
}

.feature-col {
  text-align: left !important;
  font-weight: 600;
}

.highlight-col {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary-color);
  font-weight: 700;
}

.table-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.roadmap-section {
  padding: 100px 0;
  background: var(--bg-darker);
}

.roadmap-timeline {
  max-width: 800px;
  margin: 0 auto 4rem;
  position: relative;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-marker {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--border-color);
  border: 3px solid var(--bg-darker);
  margin-right: 2rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.timeline-marker i {
  color: var(--bg-darker);
  transition: all 0.3s ease;
}

.timeline-item.completed .timeline-marker {
  background: var(--success-color);
}

.timeline-item.completed .timeline-marker i {
  color: var(--bg-darker);
}

.timeline-item.active .timeline-marker {
  background: var(--warning-color);
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.5);
}

.timeline-item.active .timeline-marker i {
  color: var(--bg-darker);
}

.timeline-item .timeline-marker {
  background: var(--text-muted);
}

.timeline-item .timeline-marker i {
  color: var(--bg-darker);
}

.timeline-content {
  background: var(--gradient-industrial);
  padding: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  flex: 1;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--primary-color);
}

.timeline-content h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1rem;
}

.status-badge.completed {
  background: var(--success-color);
  color: var(--bg-darker);
}

.status-badge.active {
  background: var(--warning-color);
  color: var(--bg-darker);
}

.status-badge.planned {
  background: var(--text-muted);
  color: var(--text-light);
}

.target-metrics h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.metric-card {
  background: var(--gradient-industrial);
  padding: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.metric-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.main-footer {
  background: var(--gradient-industrial);
  border-top: 2px solid var(--primary-color);
}

.footer-section {
  width: 100%;
}

.footer-top {
  padding: 2rem 0 1rem 0;
}

.footer-bottom {
  padding: 1rem 0 2rem 0;
}

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

.footer-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-contact p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

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

/* 平板橫向 */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 極小螢幕手機 */
@media (max-width: 320px) {
  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.4rem 0.5rem;
    font-size: 0.65rem;
    justify-items: center;
    max-width: 290px;
    margin: 0 auto;
  }

  .nav-links a {
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  /* 極小螢幕表格優化 */
  .table-header,
  .table-row {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    font-size: 0.6rem;
  }

  .table-header > div,
  .table-row > div {
    padding: 0.6rem 0.1rem;
  }

  .feature-col {
    font-size: 0.55rem;
  }

  .product-col {
    font-size: 0.5rem;
  }

  /* Footer 超小螢幕優化 */
  .footer-top {
    padding: 1.5rem 0 0.8rem 0;
  }

  .footer-bottom {
    padding: 0.8rem 0 1.5rem 0;
  }

  .footer-info h3 {
    font-size: 1rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
  }

  .footer-info p {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .footer-contact p {
    font-size: 0.65rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
  }
}

/* 小螢幕手機 */
@media (min-width: 321px) and (max-width: 480px) {
  .nav-container {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.6rem 0.8rem;
    font-size: 0.7rem;
    justify-items: center;
    max-width: 350px;
    margin: 0 auto;
  }

  .nav-links a {
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
  }

  /* 表格優化 */
  .table-header,
  .table-row {
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    font-size: 0.65rem;
  }

  .table-header > div,
  .table-row > div {
    padding: 0.8rem 0.2rem;
  }

  .feature-col {
    font-size: 0.6rem;
  }

  .product-col {
    font-size: 0.55rem;
  }
}

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-section {
    padding: 160px 0 60px;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .metric-card {
    padding: 1.5rem;
  }
}

/* 一般手機和小平板 */
@media (min-width: 481px) and (max-width: 768px) {
  * {
    max-width: 100%;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.8rem 1.2rem;
    font-size: 0.8rem;
    justify-items: center;
    max-width: 380px;
    margin: 0 auto;
  }

  .nav-links a {
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
  }

  .hero-section {
    padding: 180px 0 80px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .tech-diagram {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .process-arrow {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .table-header,
  .table-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-size: 0.7rem;
  }

  .table-header > div,
  .table-row > div {
    padding: 1rem 0.3rem;
    word-break: break-word;
  }

  .feature-col {
    text-align: left !important;
    font-size: 0.65rem;
  }

  .product-col {
    font-size: 0.6rem;
  }

  /* Footer 手機版優化 */
  .footer-top {
    padding: 2rem 0 1rem 0;
  }

  .footer-bottom {
    padding: 1rem 0 2rem 0;
  }

  .footer-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
  }

  .footer-info p {
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
    hyphens: auto;
    padding: 0 1rem;
  }

  .footer-contact p {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    word-break: break-word;
    hyphens: auto;
    padding: 0 1rem;
  }

  .roadmap-timeline::before {
    left: 1.25rem;
  }

  .timeline-marker {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    margin-right: 1.5rem;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .architecture-diagram {
    gap: 1rem;
  }

  .arch-layer {
    padding: 1.5rem;
  }

  .arch-components {
    gap: 0.5rem;
  }

  .comparison-table {
    font-size: 0.9rem;
  }

  .table-header > div,
  .table-row > div {
    padding: 1rem 0.5rem;
  }
}