/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  /* Colors — Dark (default, brighter) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #101018;
  --bg-tertiary: #16161f;
  --bg-card: rgba(22, 22, 35, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --navbar-scrolled-bg: rgba(10, 10, 15, 0.85);

  --text-primary: #f5f5fa;
  --text-secondary: #c0c0d4;
  --text-muted: #8e8ea8;

  --accent-primary: #7c6cf0;
  --accent-secondary: #b165ff;
  --accent-tertiary: #9ba3ff;
  --accent-gradient: linear-gradient(135deg, #7c6cf0, #b165ff, #9ba3ff);
  --accent-gradient-alt: linear-gradient(135deg, #b165ff, #f06292);

  --positive: #4eeab5;
  --positive-bg: rgba(78, 234, 181, 0.12);
  --negative: #ff8a8a;
  --negative-bg: rgba(255, 138, 138, 0.12);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(124, 108, 240, 0.35);

  --icon-opacity: 0.85;

  /* Typography */
  --font-primary: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: 120px 0;
  --container-max: 1200px;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 108, 240, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   LIGHT THEME
   ======================================== */
[data-theme="light"] {
  --bg-primary: #f4f2f7;
  --bg-secondary: #eae7f0;
  --bg-tertiary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-glass-hover: rgba(255, 255, 255, 0.8);
  --navbar-scrolled-bg: rgba(244, 242, 247, 0.88);

  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted: #7a7a96;

  --accent-primary: #6c5ce7;
  --accent-secondary: #9b59e0;
  --accent-tertiary: #6c5ce7;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #9b59e0, #7c6cf0);
  --accent-gradient-alt: linear-gradient(135deg, #9b59e0, #e84393);

  --positive: #0fa874;
  --positive-bg: rgba(15, 168, 116, 0.1);
  --negative: #e04545;
  --negative-bg: rgba(224, 69, 69, 0.08);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.1);
  --border-accent: rgba(108, 92, 231, 0.25);

  --icon-opacity: 1;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s ease, color 0.4s ease;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

input, button {
  font-family: inherit;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-base);
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  padding: 10px 0;
  background: var(--navbar-scrolled-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
}

.logo-icon {
  font-size: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text {
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
  transition: var(--transition-base);
}

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

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

.nav-cta {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-tertiary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.nav-cta:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  position: relative;
  flex-shrink: 0;
  margin-left: 8px;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-tertiary);
  transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
}

.lang-btn:hover {
  border-color: var(--accent-primary);
}

#currentLangFlag {
  font-size: 1.1rem;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.lang-menu.show {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.lang-option:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-primary);
}

.lang-option span:first-child {
  font-size: 1.1rem;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: orbFloat 20s ease-in-out infinite;
  transition: opacity 0.5s ease;
}

[data-theme="light"] .hero-orb {
  opacity: 0.3;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.5), transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35), transparent 70%);
  bottom: 10%;
  left: -10%;
  animation-delay: -7s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.3), transparent 70%);
  top: 40%;
  left: 50%;
  animation-delay: -13s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
}

[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  animation: fadeInUp 1s ease-out;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  color: var(--accent-tertiary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.title-line {
  display: block;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}

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

.btn-ghost:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-primary);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  display: flex;
  align-items: baseline;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--border-medium);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent-primary);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* ========================================
   SECTION COMMON
   ======================================== */
.section {
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent-tertiary);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition-base);
}

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

.about-card:hover::before {
  opacity: 1;
}

.about-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(108, 92, 231, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-tertiary);
  margin-bottom: 20px;
  opacity: var(--icon-opacity);
}

.about-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   EVOLUTION SECTION
   ======================================== */
.evolution-section {
  background: var(--bg-primary);
  overflow: hidden;
}

.evolution-timeline {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.timeline-marker {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  justify-content: center;
  padding-top: 28px;
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

.timeline-content {
  flex: 1;
}

.timeline-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  position: relative;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.glow-card {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  max-width: 100%;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.era-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.era-old {
  background: var(--negative-bg);
  color: var(--negative);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.era-new {
  background: var(--positive-bg);
  color: var(--positive);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.timeline-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.timeline-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}

.feature-row.negative {
  color: var(--negative);
}

.feature-row.negative span {
  color: var(--text-secondary);
}

.feature-row.positive {
  color: var(--positive);
}

.feature-row.positive span {
  color: var(--text-secondary);
}

/* Machine Visuals */
.old-machine-visual,
.new-devices-visual {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.visual-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.machine-box {
  width: 80px;
  height: 120px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  gap: 6px;
  opacity: 0.7;
}

.machine-screen {
  width: 90%;
  height: 35%;
  background: rgba(248, 113, 113, 0.22);
  border-radius: 4px;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.machine-slot {
  width: 60%;
  height: 8px;
  background: rgba(248, 113, 113, 0.18);
  border-radius: 2px;
}

.machine-base {
  width: 100%;
  height: 12px;
  background: rgba(248, 113, 113, 0.14);
  border-radius: 0 0 4px 4px;
  margin-top: auto;
}

.new-devices-visual {
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.new-devices-visual .visual-label {
  width: 100%;
  text-align: center;
}

.device {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
  border-radius: var(--radius-sm);
}

.device-tablet {
  width: 56px;
  height: 72px;
  padding: 6px;
}

.device-card-machine {
  width: 48px;
  height: 56px;
  padding: 6px;
}

.device-phone {
  width: 36px;
  height: 64px;
  padding: 4px;
}

.device-screen-sm {
  width: 100%;
  height: 100%;
  background: rgba(52, 211, 153, 0.22);
  border-radius: 3px;
}

.device-slot-sm {
  width: 70%;
  height: 6px;
  background: rgba(52, 211, 153, 0.28);
  border-radius: 2px;
}

.device-screen-xs {
  width: 100%;
  height: 100%;
  background: rgba(52, 211, 153, 0.22);
  border-radius: 3px;
}

/* Timeline Connector */
.timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  gap: 8px;
  margin-left: 40px;
}

.connector-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--negative), var(--positive));
  border-radius: 1px;
}

.connector-arrow {
  color: var(--accent-tertiary);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.connector-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features-section {
  background: var(--bg-secondary);
}

.features-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.feature-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: var(--transition-base);
}

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

.feature-block-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.feature-block-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-tertiary);
}

.feature-block-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  flex-shrink: 0;
  margin-top: 8px;
}

.feature-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   CALCULATOR / PBAR SECTION
   ======================================== */
.calculator-section {
  background: var(--bg-primary);
  padding-bottom: 180px;
}

/* Currency Selector */
.pbar-currency-selector {
  display: inline-flex;
  background: var(--bg-glass);
  border-radius: 100px;
  padding: 4px;
  margin-top: 20px;
  border: 1px solid var(--border-subtle);
}

.pbar-currency-selector input[type="radio"] { display: none; }

.pbar-currency-selector label {
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.pbar-currency-selector input:checked + label {
  background: rgba(124, 108, 240, 0.15);
  color: var(--accent-tertiary);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Pbar Main Card */
.pbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.pbar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 32px 0;
}

.pbar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pbar-section-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.pbar-badge {
  background: var(--bg-glass);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.pbar-discount-badge {
  transition: var(--transition-base);
}

.pbar-section-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Room Count */
.pbar-room-count-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(124, 108, 240, 0.06);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pbar-room-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.pbar-room-label svg {
  color: var(--accent-tertiary);
}

.pbar-room-control {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.pbar-room-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.pbar-room-btn:hover {
  background: rgba(124, 108, 240, 0.15);
  color: var(--accent-tertiary);
}

.pbar-room-input {
  width: 64px;
  height: 38px;
  background: transparent;
  border: none;
  color: var(--accent-primary);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  -moz-appearance: textfield;
}

.pbar-room-input::-webkit-outer-spin-button,
.pbar-room-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pbar-room-input:focus { outline: none; }

/* Template Cards */
.pbar-template-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pbar-template-btn {
  flex: 1;
  min-width: 160px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-base);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
}

.pbar-template-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(124, 108, 240, 0.15);
}

.pbar-template-btn.active {
  border-color: var(--accent-primary);
  background: rgba(124, 108, 240, 0.1);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.pbar-tmpl-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-tertiary);
}

.pbar-tmpl-name {
  font-size: 1rem;
  font-weight: 700;
}

.pbar-tmpl-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pbar-tmpl-breakdown {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pbar-tmpl-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.pbar-tmpl-sub span {
  color: var(--text-primary);
  font-weight: 500;
}

.pbar-tmpl-total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-top: 4px;
  letter-spacing: -0.5px;
  text-align: right;
  transition: color 0.3s;
}

.pbar-template-btn.active .pbar-tmpl-total {
  color: var(--accent-secondary);
}

/* Item Tags */
.pbar-tag-qr, .pbar-tag-device {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
}

.pbar-tag-qr {
  background: var(--positive-bg);
  color: var(--positive);
  border: 1px solid rgba(78, 234, 181, 0.2);
}

.pbar-tag-device {
  background: rgba(177, 101, 255, 0.12);
  color: var(--accent-secondary);
  border: 1px solid rgba(177, 101, 255, 0.2);
}

/* Items List */
.pbar-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pbar-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: var(--transition-base);
}

.pbar-item-row:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-subtle);
}

.pbar-item-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.pbar-price-tag {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.pbar-price-tag .unit {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}

.pbar-sw-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Slider Control */
.pbar-slider-control {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 260px;
}

.pbar-slider {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

.pbar-slider:focus { outline: none; }

.pbar-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: var(--border-subtle);
  border-radius: 3px;
}

.pbar-slider::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 8px rgba(124, 108, 240, 0.4);
  transition: transform 0.1s;
}

.pbar-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.pbar-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: var(--border-subtle);
  border-radius: 3px;
  border: none;
}

.pbar-slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(124, 108, 240, 0.4);
}

.pbar-qty-input {
  background: var(--bg-tertiary);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  width: 60px;
  text-align: center;
  font-size: 1rem;
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
  font-family: inherit;
}

.pbar-qty-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}

.pbar-qty-input::-webkit-outer-spin-button,
.pbar-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pbar-qty-input[type=number] { -moz-appearance: textfield; }

/* Software Status */
.pbar-sw-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 120px;
}

.pbar-sw-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pbar-contact-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}

/* Fixed Bottom Total Bar */
.pbar-total-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 700px;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  animation: pbarSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pbarSlideUp {
  from { transform: translate(-50%, 100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pbar-total-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pbar-total-labels {
  display: flex;
  flex-direction: column;
}

.pbar-total-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.pbar-total-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pbar-total-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1;
}

.number-pop {
  animation: pbarPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pbarPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.pbar-cost-breakdown {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.pbar-breakdown-dot {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pbar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pbar-hw-dot { background: #38bdf8; }
.pbar-sw-dot { background: var(--accent-secondary); }


/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  background: var(--bg-secondary);
  padding: 80px 0;
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.cta-bg-orb {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
  position: relative;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-primary);
  padding: 40px 0 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-brand p {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-tertiary);
}

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

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========================================
   ANIMATIONS (Intersection Observer)
   ======================================== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Result appear animation */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.results-content:not(.hidden) {
  animation: slideInRight 0.5s ease-out;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  /* --- Navbar --- */
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-container {
    padding: 0 16px;
  }

  .navbar {
    padding: 12px 0;
  }

  .navbar.scrolled {
    padding: 8px 0;
  }

  /* --- Hero --- */
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: 100px 20px 0;
  }

  .hero-title {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 32px;
    line-height: 1.7;
  }

  .hero-subtitle br {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* --- Stats (horizontal row on mobile) --- */
  .hero-stats {
    flex-direction: row;
    gap: 0;
    justify-content: center;
    width: 100%;
  }

  .stat-item {
    flex: 1;
    min-width: 0;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-suffix {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .stat-divider {
    width: 1px;
    height: 36px;
  }

  /* --- About --- */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-card {
    padding: 24px 20px;
  }

  /* --- Features --- */
  .features-showcase {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-block {
    padding: 28px 20px;
  }

  /* --- Evolution Timeline --- */
  .evolution-timeline {
    width: 100%;
  }

  .timeline-item {
    flex-direction: column;
    gap: 12px;
  }

  .timeline-marker {
    width: auto;
    justify-content: flex-start;
    padding-top: 0;
  }

  .timeline-content {
    width: 100%;
  }

  .timeline-connector {
    margin-left: 0;
    align-items: center;
  }

  .timeline-card {
    padding: 28px 20px;
    width: 100%;
  }

  /* --- CTA --- */
  .cta-card {
    padding: 60px 24px;
  }

  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* --- Footer --- */
  .footer-top {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  /* --- Pbar Calculator --- */
  .pbar-card {
    padding: 24px 16px;
  }

  .pbar-template-cards {
    flex-direction: column;
  }

  .pbar-item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pbar-slider-control {
    max-width: 100%;
  }

  .pbar-sw-status {
    justify-content: flex-start;
  }

  .pbar-section-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .pbar-total-bar {
    width: calc(100% - 32px);
    padding: 16px 20px;
  }

  .pbar-total-value {
    font-size: 1.8rem;
  }

  .pbar-cost-breakdown {
    flex-wrap: wrap;
    gap: 12px;
  }

  .calculator-section {
    padding-bottom: 160px;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 90px 16px 0;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-suffix {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.68rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .section-desc {
    font-size: 0.92rem;
  }

  .lang-btn {
    padding: 6px 10px;
  }

  #currentLangText {
    display: none;
  }

  .pbar-card {
    padding: 20px 14px;
  }

  .pbar-total-bar {
    bottom: 0;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 14px 16px;
  }

  .pbar-total-title {
    font-size: 0.95rem;
  }

  .pbar-total-value {
    font-size: 1.6rem;
  }

  .pbar-total-content {
    gap: 8px;
  }

  .pbar-room-count-row {
    padding: 12px 14px;
  }

  .about-card-icon {
    width: 48px;
    height: 48px;
  }

  .cta-card {
    padding: 48px 20px;
  }

  .cta-card h2 {
    font-size: 1.3rem;
  }

  .cta-card p {
    font-size: 0.88rem;
  }

  .container {
    padding: 0 16px;
  }
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */
[data-theme="light"] .about-card,
[data-theme="light"] .feature-block,
[data-theme="light"] .pbar-card,
[data-theme="light"] .cta-card,
[data-theme="light"] .timeline-card.glass-card {
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .about-card:hover,
[data-theme="light"] .feature-block:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .pbar-total-bar {
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border-subtle);
}

[data-theme="light"] .pbar-item-row {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .pbar-item-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pbar-room-count-row {
  background: rgba(108, 92, 231, 0.04);
}

[data-theme="light"] .pbar-qty-input {
  background: white;
}

[data-theme="light"] .pbar-room-control {
  background: white;
}

[data-theme="light"] .machine-screen {
  background: rgba(224, 69, 69, 0.15);
  border-color: rgba(224, 69, 69, 0.25);
}

[data-theme="light"] .machine-slot {
  background: rgba(224, 69, 69, 0.12);
}

[data-theme="light"] .machine-base {
  background: rgba(224, 69, 69, 0.1);
}

[data-theme="light"] .machine-box {
  background: #f0edf5;
}

[data-theme="light"] .device {
  border-color: rgba(15, 168, 116, 0.3);
  background: rgba(15, 168, 116, 0.06);
}

[data-theme="light"] .device-screen-sm,
[data-theme="light"] .device-screen-xs {
  background: rgba(15, 168, 116, 0.15);
}

[data-theme="light"] .device-slot-sm {
  background: rgba(15, 168, 116, 0.2);
}

/* Global transition for themed elements */
.about-card,
.feature-block,
.pbar-card,
.pbar-total-bar,
.cta-card,
.timeline-card,
.navbar,
.footer {
  transition: background 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
