/* Themes CSS - Cyberpunk Visual Effects */

/* ========================================
   Preloader / Loading Overlay
   ======================================== */

/* HTML 載入狀態標記 */
html.is-preloading {
  overflow: hidden;
  height: 100vh;
}

html.is-preloading body {
  overflow: hidden;
}

/* Preloader 容器 */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
  opacity: 1;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.preloader.preloader--hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

/* 背景效果層 */
.preloader__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(255, 45, 149, 0.06) 0%, transparent 50%),
    var(--bg-0);
  overflow: hidden;
}

/* 掃描線效果 */
.preloader__backdrop::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 229, 255, 0.6) 50%,
    transparent
  );
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
  animation: preloader-scan 3s ease-in-out infinite;
}

@keyframes preloader-scan {
  0% {
    top: -10%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 110%;
    opacity: 0;
  }
}

/* 網格背景 */
.preloader__backdrop::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
  animation: grid-drift-preloader 20s linear infinite;
}

@keyframes grid-drift-preloader {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(40px, 40px);
  }
}

/* Logo / 品牌標誌 */
.preloader__logo {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--sp-2xl);
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: preloader-logo-glow 2s ease-in-out infinite;
}

@keyframes preloader-logo-glow {
  0%, 100% {
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(255, 45, 149, 0.7));
  }
}

/* 副標題 */
.preloader__subtitle {
  position: relative;
  z-index: 2;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--tx-1);
  margin-bottom: var(--sp-xl);
  opacity: 0.7;
}

/* 進度條容器 */
.preloader__progress {
  position: relative;
  z-index: 2;
  width: 200px;
  height: 2px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

/* 進度條填充 */
.preloader__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(0, 229, 255, 0.6),
    rgba(0, 229, 255, 1),
    rgba(255, 45, 149, 0.8)
  );
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
  animation: preloader-progress 2.5s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes preloader-progress {
  0% {
    width: 0%;
    opacity: 0.6;
  }
  50% {
    width: 80%;
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0.8;
  }
}

/* Reduced Motion 支援 */
@media (prefers-reduced-motion: reduce) {
  .preloader__backdrop::before,
  .preloader__backdrop::after,
  .preloader__logo,
  .preloader__progress-bar {
    animation: none;
  }
  
  .preloader {
    transition-duration: 200ms;
  }
  
  .preloader__logo {
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.5));
  }
  
  .preloader__progress-bar {
    width: 50%;
    opacity: 0.8;
  }
}

/* 手機版調整 */
@media (max-width: 768px) {
  .preloader__logo {
    font-size: 1.75rem;
    margin-bottom: var(--sp-xl);
  }
  
  .preloader__progress {
    width: 150px;
  }
}

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

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: 
    linear-gradient(135deg, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
    linear-gradient(225deg, rgba(255, 45, 149, 0.05) 0%, transparent 50%),
    var(--bg-0);
}

.hero__grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  background-image: 
    linear-gradient(var(--c-primary) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-primary) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--sp-xl);
}

.hero__title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-lg);
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(255, 45, 149, 0.7));
  }
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--tx-1);
  margin-bottom: var(--sp-2xl);
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.hero__cta {
  margin-top: var(--sp-2xl);
}

/* Breathing Border Effect */
.breathing-border {
  position: fixed;
  top: 40px;  /* 從 header 中間開始，讓上邊光暈更明顯 */
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;  /* 降低整體透明度讓效果更柔和 */
}

.breathing-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;  /* 移除實體邊框 */
  box-shadow: 
    inset 0 0 40px rgba(0, 229, 255, 0.4),
    inset 0 0 80px rgba(0, 229, 255, 0.2),
    0 0 40px rgba(0, 229, 255, 0.4),
    0 0 80px rgba(0, 229, 255, 0.2);
  animation: neon-flicker-cyan 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;  /* 更順暢的過渡 */
  border-radius: 8px;
  pointer-events: none;
}

.breathing-border::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;  /* 移除實體邊框 */
  box-shadow: 
    inset 0 0 40px rgba(255, 45, 149, 0.25),
    0 0 40px rgba(255, 45, 149, 0.25);
  animation: neon-flicker-magenta 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;  /* 更順暢的過渡 */
  border-radius: 8px;
  opacity: 0.6;
  pointer-events: none;
}

/* 霓虹交替閃爍 - 青色層（前半段閃，後半段消失） */
@keyframes neon-flicker-cyan {
  0% {
    opacity: 0.1;
    box-shadow: 
      inset 0 0 20px rgba(0, 229, 255, 0.1),
      inset 0 0 40px rgba(0, 229, 255, 0.05),
      0 0 20px rgba(0, 229, 255, 0.1),
      0 0 40px rgba(0, 229, 255, 0.05);
  }
  10% {
    opacity: 0.5;
    box-shadow: 
      inset 0 0 35px rgba(0, 229, 255, 0.5),
      inset 0 0 70px rgba(0, 229, 255, 0.25),
      0 0 35px rgba(0, 229, 255, 0.5),
      0 0 70px rgba(0, 229, 255, 0.25);
  }
  20% {
    opacity: 0.85;
    box-shadow: 
      inset 0 0 60px rgba(0, 229, 255, 0.8),
      inset 0 0 120px rgba(0, 229, 255, 0.4),
      0 0 60px rgba(0, 229, 255, 0.8),
      0 0 120px rgba(0, 229, 255, 0.4);
  }
  30% {
    opacity: 0.6;
    box-shadow: 
      inset 0 0 45px rgba(0, 229, 255, 0.6),
      inset 0 0 90px rgba(0, 229, 255, 0.3),
      0 0 45px rgba(0, 229, 255, 0.6),
      0 0 90px rgba(0, 229, 255, 0.3);
  }
  38% {
    opacity: 0.3;
    box-shadow: 
      inset 0 0 30px rgba(0, 229, 255, 0.3),
      inset 0 0 60px rgba(0, 229, 255, 0.15),
      0 0 30px rgba(0, 229, 255, 0.3),
      0 0 60px rgba(0, 229, 255, 0.15);
  }
  45% {
    opacity: 0.1;
    box-shadow: 
      inset 0 0 20px rgba(0, 229, 255, 0.1),
      inset 0 0 40px rgba(0, 229, 255, 0.05),
      0 0 20px rgba(0, 229, 255, 0.1),
      0 0 40px rgba(0, 229, 255, 0.05);
  }
  50%, 100% {
    opacity: 0.05;
    box-shadow: 
      inset 0 0 15px rgba(0, 229, 255, 0.05),
      inset 0 0 30px rgba(0, 229, 255, 0.02),
      0 0 15px rgba(0, 229, 255, 0.05),
      0 0 30px rgba(0, 229, 255, 0.02);
  }
}

/* 霓虹交替閃爍 - 洋紅色層（後半段閃，前半段消失） */
@keyframes neon-flicker-magenta {
  0%, 48% {
    opacity: 0.05;
    box-shadow: 
      inset 0 0 15px rgba(255, 45, 149, 0.05),
      inset 0 0 30px rgba(255, 45, 149, 0.02),
      0 0 15px rgba(255, 45, 149, 0.05),
      0 0 30px rgba(255, 45, 149, 0.02);
  }
  55% {
    opacity: 0.1;
    box-shadow: 
      inset 0 0 20px rgba(255, 45, 149, 0.1),
      inset 0 0 40px rgba(255, 45, 149, 0.05),
      0 0 20px rgba(255, 45, 149, 0.1),
      0 0 40px rgba(255, 45, 149, 0.05);
  }
  62% {
    opacity: 0.5;
    box-shadow: 
      inset 0 0 35px rgba(255, 45, 149, 0.5),
      inset 0 0 70px rgba(255, 45, 149, 0.25),
      0 0 35px rgba(255, 45, 149, 0.5),
      0 0 70px rgba(255, 45, 149, 0.25);
  }
  72% {
    opacity: 0.85;
    box-shadow: 
      inset 0 0 60px rgba(255, 45, 149, 0.8),
      inset 0 0 120px rgba(255, 45, 149, 0.4),
      0 0 60px rgba(255, 45, 149, 0.8),
      0 0 120px rgba(255, 45, 149, 0.4);
  }
  82% {
    opacity: 0.6;
    box-shadow: 
      inset 0 0 45px rgba(255, 45, 149, 0.6),
      inset 0 0 90px rgba(255, 45, 149, 0.3),
      0 0 45px rgba(255, 45, 149, 0.6),
      0 0 90px rgba(255, 45, 149, 0.3);
  }
  90% {
    opacity: 0.3;
    box-shadow: 
      inset 0 0 30px rgba(255, 45, 149, 0.3),
      inset 0 0 60px rgba(255, 45, 149, 0.15),
      0 0 30px rgba(255, 45, 149, 0.3),
      0 0 60px rgba(255, 45, 149, 0.15);
  }
  96% {
    opacity: 0.1;
    box-shadow: 
      inset 0 0 20px rgba(255, 45, 149, 0.1),
      inset 0 0 40px rgba(255, 45, 149, 0.05),
      0 0 20px rgba(255, 45, 149, 0.1),
      0 0 40px rgba(255, 45, 149, 0.05);
  }
  100% {
    opacity: 0.05;
    box-shadow: 
      inset 0 0 15px rgba(255, 45, 149, 0.05),
      inset 0 0 30px rgba(255, 45, 149, 0.02),
      0 0 15px rgba(255, 45, 149, 0.05),
      0 0 30px rgba(255, 45, 149, 0.02);
  }
}

/* Corner accents for breathing border */
.breathing-border-corner {
  position: fixed;
  width: 60px;
  height: 60px;
  border: 2px solid var(--c-primary);
  pointer-events: none;
  z-index: 10000;
  animation: corner-pulse 3s ease-in-out infinite;
}

.breathing-border-corner--tl {
  top: 90px;  /* header 高度 80px + 10px 間距 */
  left: 10px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 8px;
  display: none;  /* 隱藏左上角 */
}

.breathing-border-corner--tr {
  top: 90px;  /* header 高度 80px + 10px 間距 */
  right: 10px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 8px;
  animation-delay: 0.75s;
  display: none;  /* 隱藏右上角 */
}

.breathing-border-corner--bl {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 8px;
  animation-delay: 1.5s;
  display: none;  /* 隱藏左下角 */
}

.breathing-border-corner--br {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 8px;
  animation-delay: 2.25s;
  display: none;  /* 隱藏右下角 */
}

@keyframes corner-pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
    transform: scale(1.05);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .breathing-border {
    top: 40px;  /* 手機版也從 header 中間開始 */
  }
  
  .breathing-border::before,
  .breathing-border::after {
    border: none;  /* 確保手機版也沒有邊框 */
  }
  
  .breathing-border-corner {
    width: 40px;
    height: 40px;
  }
  
  .breathing-border-corner--tl,
  .breathing-border-corner--tr {
    top: 85px;  /* header 高度 80px + 5px 間距 */
  }
  
  .breathing-border-corner--bl,
  .breathing-border-corner--br {
    bottom: 5px;
  }
  
  .breathing-border-corner--tl,
  .breathing-border-corner--bl {
    left: 5px;
  }
  
  .breathing-border-corner--tr,
  .breathing-border-corner--br {
    right: 5px;
  }
}

/* Canvas Layers for Effects */
.canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#particles-canvas,
#three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#particles-canvas {
  opacity: 0.6;
  z-index: 1;
}

#three-canvas {
  opacity: 0.8;
  z-index: 2;
}

/* Ensure content is above canvas and breathing border */
.page__main {
  position: relative;
  z-index: 100;
}

.page__main > section {
  position: relative;
  z-index: 101;
}

/* Ensure all interactive elements are above breathing border */
.page__main button,
.page__main a,
.page__main input,
.page__main select,
.page__main textarea,
.page__main .btn,
.page__main .card,
.page__main iframe {
  position: relative;
  z-index: 102;
}

/* Neon Elements */
.neon-border {
  position: relative;
  border: 1px solid var(--c-primary);
  box-shadow: 
    inset 0 0 10px rgba(0, 229, 255, 0.2),
    0 0 20px rgba(0, 229, 255, 0.1);
}

/* Glitch Effect */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: var(--c-primary);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: var(--c-accent);
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(2px, 2px);
  }
  60% {
    transform: translate(-2px, -2px);
  }
  80% {
    transform: translate(-2px, 2px);
  }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

.reveal--left {
  transform: translateX(-30px);
}

.reveal--right {
  transform: translateX(30px);
}

.reveal--scale {
  transform: scale(0.9);
}

/* Parallax */
.parallax {
  position: relative;
  transform: translateZ(0);
  will-change: transform;
}

.parallax--slow {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax--medium {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax--fast {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Glass Morphism */
.glass {
  background-color: rgba(15, 20, 27, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 
    0 8px 32px 0 rgba(0, 229, 255, 0.1),
    inset 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Scan Line */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--c-primary),
    transparent
  );
  opacity: 0.8;
  animation: scan 8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% {
    top: 0;
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* Cyber Frame */
.cyber-frame {
  position: relative;
  padding: var(--sp-lg);
  border: 1px solid var(--c-primary);
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(0, 229, 255, 0.05) 50%,
    transparent 100%
  );
}

.cyber-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid var(--c-primary);
  clip-path: inherit;
  opacity: 0.5;
}

/* Terminal Style */
.terminal {
  background-color: var(--bg-2);
  border: 1px solid var(--c-primary);
  border-radius: 4px;
  padding: var(--sp-lg);
  font-family: monospace;
  position: relative;
  overflow: hidden;
}

.terminal::before {
  content: '> ';
  color: var(--c-primary);
}

.terminal__cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background-color: var(--c-primary);
  animation: blink 1s infinite;
  margin-left: 4px;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* PDF Frame */
.pdf-frame {
  width: 100%;
  height: 600px;
  border: 1px solid var(--c-primary);
  background-color: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.1);
}

.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--sp-2xl);
  text-align: center;
}

.pdf-fallback__icon {
  font-size: 3rem;
  color: var(--c-primary);
  margin-bottom: var(--sp-lg);
}

.pdf-fallback__message {
  color: var(--tx-1);
  margin-bottom: var(--sp-xl);
}

/* Video Card */
.video-card {
  position: relative;
  background-color: var(--bg-2);
  border: 1px solid var(--brd);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-card:hover {
  border-color: var(--c-primary);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.2);
}

.video-card__thumbnail {
  position: relative;
  padding-bottom: 56.25%;
  background-color: var(--bg-1);
}

.video-card__thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(0, 229, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.video-card:hover .video-card__play {
  background-color: var(--c-accent);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-card__title {
  padding: var(--sp-md);
  font-family: var(--font-display);
  color: var(--tx-0);
}

/* Video Single Container - For single video display */
.video-single-container {
  max-width: 900px;
  margin: 0 auto;
}

.video-single-container .video-card {
  background: rgba(11, 15, 20, 0.8);
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  padding: var(--sp-xl);
  box-shadow: 
    0 0 30px rgba(0, 229, 255, 0.15),
    inset 0 0 30px rgba(0, 229, 255, 0.05);
  position: relative;
  overflow: visible;
}

.video-single-container .video-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent,
    var(--c-primary) 50%,
    transparent
  );
  opacity: 0.5;
  z-index: 1;
}

.video-single-container .video-card::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent,
    var(--c-primary) 50%,
    transparent
  );
  opacity: 0.5;
  z-index: 1;
}

.video-single-container .video-card:hover {
  border-color: rgba(0, 229, 255, 0.6);
  transform: scale(1.01);
  box-shadow: 
    0 0 40px rgba(0, 229, 255, 0.25),
    inset 0 0 40px rgba(0, 229, 255, 0.08),
    0 8px 24px rgba(0, 229, 255, 0.2);
}

.video-single-container .video-card__thumbnail {
  border-radius: 4px;
  overflow: hidden;
}

.video-single-container .video-card__title {
  display: none;
}

/* Responsive adjustments for single video container */
@media (max-width: 768px) {
  .video-single-container {
    max-width: 100%;
  }
  
  .video-single-container .video-card {
    padding: var(--sp-md);
    border-width: 1px;
  }
}

/* Poster Page Specific Styles */

/* 在海報頁面降低呼吸燈效果的強度 */
body:has(.poster-frame) .breathing-border {
  opacity: 0.2 !important;
}

body:has(.poster-frame) .breathing-border::before,
body:has(.poster-frame) .breathing-border::after {
  opacity: 0.3 !important;
}

.poster-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-lg);
}

.poster-frame {
  background: rgba(11, 15, 20, 0.8);
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  padding: var(--sp-xl);
  box-shadow: 
    0 0 30px rgba(0, 229, 255, 0.15),
    inset 0 0 30px rgba(0, 229, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.poster-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent,
    var(--c-primary) 50%,
    transparent
  );
  opacity: 0.5;
}

/* 上下橫向電路線 */
.poster-circuit-line {
  position: absolute;
  left: calc(var(--sp-sm) + 5px);
  right: calc(var(--sp-sm) + 5px);
  height: 1px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--c-primary) 5%,
    transparent 12%,
    var(--c-accent) 25%,
    transparent 35%,
    var(--c-primary) 50%,
    transparent 65%,
    var(--c-accent) 75%,
    transparent 88%,
    var(--c-primary) 95%,
    transparent 100%
  );
  background-size: 200% 100%;
  opacity: 0.6;
  animation: circuit-flow 4s linear infinite;
}

@keyframes circuit-flow {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.poster-circuit-line--top {
  top: calc(var(--sp-md) - 2px);
}

.poster-circuit-line--bottom {
  bottom: calc(var(--sp-md) - 2px);
  animation-direction: reverse;
}

/* 四個角落的電路連接點 */
.circuit-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 3;
}

.circuit-corner::before,
.circuit-corner::after {
  content: '';
  position: absolute;
  background: var(--c-primary);
  opacity: 0.6;
}

/* 左上角 */
.circuit-corner--tl {
  top: calc(var(--sp-md) - 2px);
  left: calc(var(--sp-sm) + 5px);
  transform: translate(-50%, -50%);
}

.circuit-corner--tl::before {
  width: 1px;
  height: 8px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.circuit-corner--tl::after {
  width: 8px;
  height: 1px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* 右上角 */
.circuit-corner--tr {
  top: calc(var(--sp-md) - 2px);
  right: calc(var(--sp-sm) + 5px);
  transform: translate(50%, -50%);
}

.circuit-corner--tr::before {
  width: 1px;
  height: 8px;
  top: 0;
  right: 50%;
  transform: translateX(50%);
}

.circuit-corner--tr::after {
  width: 8px;
  height: 1px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* 左下角 */
.circuit-corner--bl {
  bottom: calc(var(--sp-md) - 2px);
  left: calc(var(--sp-sm) + 5px);
  transform: translate(-50%, 50%);
}

.circuit-corner--bl::before {
  width: 1px;
  height: 8px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.circuit-corner--bl::after {
  width: 8px;
  height: 1px;
  left: 0;
  bottom: 50%;
  transform: translateY(50%);
}

/* 右下角 */
.circuit-corner--br {
  bottom: calc(var(--sp-md) - 2px);
  right: calc(var(--sp-sm) + 5px);
  transform: translate(50%, 50%);
}

.circuit-corner--br::before {
  width: 1px;
  height: 8px;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
}

.circuit-corner--br::after {
  width: 8px;
  height: 1px;
  right: 0;
  bottom: 50%;
  transform: translateY(50%);
}

/* 角落連接點閃爍效果 */
.circuit-corner {
  animation: corner-glow 2s ease-in-out infinite;
}

.circuit-corner--tl {
  animation-delay: 0s;
}

.circuit-corner--tr {
  animation-delay: 0.5s;
}

.circuit-corner--br {
  animation-delay: 1s;
}

.circuit-corner--bl {
  animation-delay: 1.5s;
}

@keyframes corner-glow {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--c-primary));
  }
}

/* 海報框內側裝飾（重新設計） */
.poster-inner-deco {
  position: absolute;
  top: var(--sp-md);
  bottom: var(--sp-md);
  width: 80px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

.poster-inner-deco--left {
  left: var(--sp-sm);
}

.poster-inner-deco--right {
  right: var(--sp-sm);
}

/* 背景網格 */
.inner-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 9px, rgba(0, 229, 255, 0.1) 9px, rgba(0, 229, 255, 0.1) 10px),
    repeating-linear-gradient(90deg, transparent, transparent 9px, rgba(0, 229, 255, 0.1) 9px, rgba(0, 229, 255, 0.1) 10px);
  opacity: 0.3;
}

/* 掃描條 */
.inner-scan-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent,
    var(--c-primary),
    transparent
  );
  box-shadow: 0 0 10px var(--c-primary);
  animation: inner-scan 4s ease-in-out infinite;
}

@keyframes inner-scan {
  0%, 100% {
    top: 0%;
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  45% {
    opacity: 0.8;
  }
  50% {
    top: 100%;
    opacity: 0;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* 六角形裝飾 */
.inner-hex {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 35px;
  background: transparent;
  border: 1px solid var(--c-primary);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.4;
  animation: inner-hex-pulse 3s ease-in-out infinite;
}

.inner-hex--1 {
  top: 15%;
  animation-delay: 0s;
}

.inner-hex--2 {
  top: 45%;
  animation-delay: 1s;
}

.inner-hex--3 {
  top: 75%;
  animation-delay: 2s;
}

@keyframes inner-hex-pulse {
  0%, 100% {
    opacity: 0.2;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 15px var(--c-primary);
  }
}

/* 數據條 */
.inner-data-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 4px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.inner-data-bar--1 {
  top: 25%;
}

.inner-data-bar--2 {
  top: 50%;
}

.inner-data-bar--3 {
  top: 75%;
}

.inner-data-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, 
    var(--c-primary),
    var(--c-accent)
  );
  box-shadow: 0 0 8px var(--c-primary);
  animation: inner-data-load 3s ease-in-out infinite;
}

/* 右側數據條從右向左填充 */
.poster-inner-deco--right .inner-data-fill {
  margin-left: auto;
  background: linear-gradient(270deg, 
    var(--c-primary),
    var(--c-accent)
  );
}

.inner-data-bar--1 .inner-data-fill {
  animation-delay: 0s;
}

.inner-data-bar--2 .inner-data-fill {
  animation-delay: 0.5s;
}

.inner-data-bar--3 .inner-data-fill {
  animation-delay: 1s;
}

@keyframes inner-data-load {
  0%, 100% {
    width: 30%;
  }
  50% {
    width: 90%;
  }
}

/* 電路線條 */
.inner-circuit {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 5px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--c-primary) 10%,
    transparent 20%,
    var(--c-accent) 40%,
    transparent 50%,
    var(--c-primary) 70%,
    transparent 80%,
    var(--c-accent) 90%,
    transparent 100%
  );
  opacity: 0.5;
}

/* 右側電路線條翻轉到右邊 */
.poster-inner-deco--right .inner-circuit {
  left: auto;
  right: 5px;
}

/* 文字標籤 */
.inner-text {
  position: absolute;
  right: 5px;
  font-family: monospace;
  font-size: 0.6rem;
  color: var(--c-primary);
  opacity: 0.6;
  letter-spacing: 1px;
  animation: inner-text-blink 2s ease-in-out infinite;
}

/* 右側文字翻轉到左邊 */
.poster-inner-deco--right .inner-text {
  right: auto;
  left: 5px;
}

.inner-text:nth-child(10) {
  top: 20%;
  animation-delay: 0s;
}

.inner-text:nth-child(11) {
  top: 50%;
  animation-delay: 0.7s;
}

.inner-text:nth-child(12) {
  top: 80%;
  animation-delay: 1.4s;
}

@keyframes inner-text-blink {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

/* 頁面兩側科技裝飾（通用） */
.side-deco {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 80vh;
  max-height: 800px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: side-deco-entrance 1s ease-out forwards;
}

/* 延遲顯示的裝飾（首頁專用） */
.side-deco--delayed {
  opacity: 0;
  pointer-events: none;
  animation: none !important;
}

.side-deco--delayed.side-deco--left {
  transform: translateY(-50%) translateX(-50px);
}

.side-deco--delayed.side-deco--right {
  transform: translateY(-50%) translateX(50px);
}

/* 延遲裝飾的內部元素初始不動畫 */
.side-deco--delayed:not(.is-visible) .poster-scan-line,
.side-deco--delayed:not(.is-visible) .poster-data-block,
.side-deco--delayed:not(.is-visible) .poster-tech-ring,
.side-deco--delayed:not(.is-visible) .poster-corner-dot {
  animation: none !important;
  opacity: 0 !important;
}

/* 當觸發時顯示容器動畫 */
.side-deco--delayed.is-visible.side-deco--left {
  animation: side-deco-entrance-left 1s ease-out forwards !important;
}

.side-deco--delayed.is-visible.side-deco--right {
  animation: side-deco-entrance-right 1s ease-out forwards !important;
  animation-delay: 0.2s;
}

/* 當觸發時恢復內部元素動畫 */
.side-deco--delayed.is-visible .poster-scan-line {
  animation: 
    scan-line-entrance 0.8s ease-out 0.3s forwards,
    scan-move 4s ease-in-out 1.1s infinite !important;
}

.side-deco--delayed.is-visible .poster-data-block {
  animation: 
    data-block-entrance 0.6s ease-out forwards,
    data-fade 3s ease-in-out infinite !important;
}

.side-deco--delayed.is-visible .poster-tech-ring {
  animation: 
    ring-entrance 0.8s ease-out forwards,
    ring-pulse 3s ease-in-out infinite !important;
}

.side-deco--delayed.is-visible .poster-corner-dot {
  animation: 
    dot-entrance 0.4s ease-out forwards,
    dot-blink 2s ease-in-out infinite !important;
}

.side-deco--left {
  left: 20px;
  animation-name: side-deco-entrance-left;
}

.side-deco--right {
  right: 20px;
  animation-name: side-deco-entrance-right;
  animation-delay: 0.2s;
}

/* 左側進場動畫 */
@keyframes side-deco-entrance-left {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* 右側進場動畫 */
@keyframes side-deco-entrance-right {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* 保持向後兼容的 poster 類名 */
.poster-side-deco {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 80vh;
  max-height: 800px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: side-deco-entrance 1s ease-out forwards;
}

.poster-side-deco--left {
  left: 20px;
  animation-name: side-deco-entrance-left;
}

.poster-side-deco--right {
  right: 20px;
  animation-name: side-deco-entrance-right;
  animation-delay: 0.2s;
}

/* 垂直掃描線 */
.poster-scan-line {
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--c-primary) 30%,
    var(--c-accent) 50%,
    var(--c-primary) 70%,
    transparent 100%
  );
  opacity: 0;
  animation: 
    scan-line-entrance 0.8s ease-out 0.3s forwards,
    scan-move 4s ease-in-out 1.1s infinite;
}

@keyframes scan-line-entrance {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }
}

.poster-side-deco--left .poster-scan-line,
.side-deco--left .poster-scan-line {
  left: 50%;
}

.poster-side-deco--right .poster-scan-line,
.side-deco--right .poster-scan-line {
  right: 50%;
  animation-delay: 2s;
}

@keyframes scan-move {
  0%, 100% {
    transform: translateY(-30%);
    opacity: 0.2;
  }
  50% {
    transform: translateY(30%);
    opacity: 0.6;
  }
}

/* 科技數據塊 */
.poster-data-block {
  position: absolute;
  width: 80px;
  padding: var(--sp-xs);
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 2px;
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--c-primary);
  opacity: 0;
  animation: 
    data-block-entrance 0.6s ease-out forwards,
    data-fade 3s ease-in-out infinite;
}

@keyframes data-block-entrance {
  0% {
    opacity: 0;
    transform: scale(0.8) translateX(0);
  }
  100% {
    opacity: 0.6;
    transform: scale(1) translateX(0);
  }
}

.poster-data-block:nth-child(2) {
  top: 15%;
  animation-delay: 0.4s, 1.4s;
}

.poster-data-block:nth-child(3) {
  top: 35%;
  animation-delay: 0.5s, 1.5s;
}

.poster-data-block:nth-child(4) {
  top: 55%;
  animation-delay: 0.6s, 1.6s;
}

.poster-data-block:nth-child(5) {
  top: 75%;
  animation-delay: 0.7s, 1.7s;
}

@keyframes data-fade {
  0%, 100% {
    opacity: 0.3;
    transform: translateX(0);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-5px);
  }
}

.poster-side-deco--right .poster-data-block,
.side-deco--right .poster-data-block {
  animation-name: data-fade-right;
}

@keyframes data-fade-right {
  0%, 100% {
    opacity: 0.3;
    transform: translateX(0);
  }
  50% {
    opacity: 0.7;
    transform: translateX(5px);
  }
}

/* 科技圓環 */
.poster-tech-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: 
    ring-entrance 0.8s ease-out forwards,
    ring-pulse 3s ease-in-out infinite;
}

@keyframes ring-entrance {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.poster-tech-ring:nth-child(6) {
  top: 10%;
  animation-delay: 0.8s, 1.8s;
}

.poster-tech-ring:nth-child(7) {
  top: 50%;
  width: 80px;
  height: 80px;
  border-color: rgba(255, 45, 149, 0.3);
  animation-delay: 0.9s, 2.9s;
}

.poster-tech-ring:nth-child(8) {
  bottom: 10%;
  animation-delay: 1s, 3s;
}

@keyframes ring-pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateX(-50%) scale(1.1);
    opacity: 0.6;
  }
}

/* 角落裝飾點 */
.poster-corner-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--c-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-primary);
  opacity: 0;
  animation: 
    dot-entrance 0.4s ease-out forwards,
    dot-blink 2s ease-in-out infinite;
}

@keyframes dot-entrance {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

.poster-corner-dot:nth-child(9) {
  top: 5%;
  left: 20%;
  animation-delay: 1.1s, 2.1s;
}

.poster-corner-dot:nth-child(10) {
  top: 25%;
  left: 80%;
  animation-delay: 1.2s, 2.7s;
}

.poster-corner-dot:nth-child(11) {
  bottom: 25%;
  left: 15%;
  animation-delay: 1.3s, 3.3s;
}

.poster-corner-dot:nth-child(12) {
  bottom: 5%;
  left: 85%;
  animation-delay: 1.4s, 3.9s;
}

@keyframes dot-blink {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Reduced Motion 支援 */
@media (prefers-reduced-motion: reduce) {
  .side-deco,
  .poster-side-deco {
    animation: none !important;
    opacity: 1;
    transform: translateY(-50%);
  }
  
  .side-deco--delayed {
    opacity: 1;
    transform: translateY(-50%);
  }
  
  .side-deco--delayed.side-deco--left {
    transform: translateY(-50%);
  }
  
  .side-deco--delayed.side-deco--right {
    transform: translateY(-50%);
  }
  
  .poster-scan-line,
  .poster-data-block,
  .poster-tech-ring,
  .poster-corner-dot {
    animation: none !important;
  }
  
  .side-deco--delayed .poster-scan-line {
    opacity: 0.3;
  }
  
  .side-deco--delayed .poster-data-block {
    opacity: 0.5;
  }
  
  .side-deco--delayed .poster-tech-ring {
    opacity: 0.4;
    transform: translateX(-50%) scale(1);
  }
  
  .side-deco--delayed .poster-corner-dot {
    opacity: 0.6;
    transform: scale(1);
  }
  
  .poster-scan-line {
    opacity: 0.3;
  }
  
  .poster-data-block {
    opacity: 0.5;
  }
  
  .poster-tech-ring {
    opacity: 0.4;
    transform: translateX(-50%) scale(1);
  }
  
  .poster-corner-dot {
    opacity: 0.6;
    transform: scale(1);
  }
  
  /* 海報框內裝飾 */
  .inner-scan-bar,
  .inner-hex,
  .inner-data-fill,
  .inner-text {
    animation: none !important;
  }
  
  .inner-scan-bar {
    opacity: 0.5;
    top: 50%;
  }
  
  .inner-hex {
    opacity: 0.4;
    transform: translateX(-50%) scale(1);
  }
  
  .inner-data-fill {
    width: 70%;
  }
  
  .inner-text {
    opacity: 0.5;
  }
  
  /* 上下電路線 */
  .poster-circuit-line {
    opacity: 0.4;
    animation: none !important;
    background-position: 0% 0%;
  }
  
  /* 角落連接點 */
  .circuit-corner {
    animation: none !important;
    opacity: 0.6;
    filter: none;
  }
}

/* Poster Image */
.poster-image {
  max-width: 65%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Poster Page Mobile Responsive */
@media (max-width: 768px) {
  .poster-container {
    padding: var(--sp-lg) var(--sp-sm);
  }
  
  .poster-frame {
    padding: var(--sp-md);
    border-width: 1px;
  }
  
  .poster-image {
    max-width: 100%;
    border-radius: 2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  }
  
  /* 手機版隱藏所有邊框特效 */
  .poster-circuit-line,
  .circuit-corner,
  .poster-inner-deco {
    display: none !important;
  }
  
  /* 手機版隱藏全站側邊裝飾 */
  .side-deco,
  .poster-side-deco {
    display: none !important;
  }
}

/* 平板尺寸調整 */
@media (min-width: 769px) and (max-width: 1024px) {
  .side-deco,
  .poster-side-deco {
    width: 100px;
  }
  
  .side-deco--left,
  .poster-side-deco--left {
    left: 10px;
  }
  
  .side-deco--right,
  .poster-side-deco--right {
    right: 10px;
  }
}

/* 超大屏幕優化 */
@media (min-width: 1400px) {
  .side-deco,
  .poster-side-deco {
    width: 150px;
  }
  
  .side-deco--left,
  .poster-side-deco--left {
    left: 40px;
  }
  
  .side-deco--right,
  .poster-side-deco--right {
    right: 40px;
  }
  
  .poster-data-block {
    width: 100px;
    font-size: 0.75rem;
  }
  
  .poster-tech-ring {
    width: 80px;
    height: 80px;
  }
  
  .poster-tech-ring:nth-child(7) {
    width: 100px;
    height: 100px;
  }
}

/* List Utilities */
.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Features Section Decorations */
.features-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  opacity: 0.15;
  animation: pulse-scale 8s ease-in-out infinite;
}

.deco-circle--1 {
  top: 10%;
  left: 5%;
  width: 120px;
  height: 120px;
  border-color: var(--c-primary);
  animation-delay: 0s;
}

.deco-circle--2 {
  top: 60%;
  right: 8%;
  width: 180px;
  height: 180px;
  border-color: var(--c-accent);
  animation-delay: 2s;
}

.deco-circle--3 {
  bottom: 15%;
  left: 12%;
  width: 100px;
  height: 100px;
  border-color: var(--c-primary);
  animation-delay: 4s;
  opacity: 0.1;
}

@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
    opacity: 0.15;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.05;
  }
}

.deco-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  animation: grid-drift 30s linear infinite;
}

@keyframes grid-drift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

/* 確保容器內容在裝飾之上 */
.section--alt .container {
  position: relative;
  z-index: 1;
}

/* 閃爍粒子效果 */
.deco-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--c-primary);
  box-shadow: 0 0 10px currentColor;
  animation: particle-twinkle 3s ease-in-out infinite;
}

.particle--1 {
  top: 15%;
  left: 20%;
  animation-delay: 0s;
  background-color: var(--c-primary);
}

.particle--2 {
  top: 35%;
  right: 15%;
  animation-delay: 0.8s;
  background-color: var(--c-accent);
}

.particle--3 {
  bottom: 25%;
  left: 30%;
  animation-delay: 1.5s;
  background-color: var(--c-primary);
}

.particle--4 {
  top: 70%;
  right: 25%;
  animation-delay: 2.2s;
  background-color: var(--c-accent);
}

.particle--5 {
  top: 45%;
  left: 15%;
  animation-delay: 0.5s;
  background-color: var(--c-primary);
}

.particle--6 {
  bottom: 40%;
  right: 35%;
  animation-delay: 1.8s;
  background-color: var(--c-accent);
}

@keyframes particle-twinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* 流星雨效果 */
.meteor-shower {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.meteor {
  position: absolute;
  width: 2px;
  height: 80px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 229, 255, 0.8) 50%,
    transparent
  );
  transform: rotate(-45deg);
  opacity: 0;
  animation: meteor-fall 3s ease-in infinite;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
}

.meteor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(4px);
}

.meteor--1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
  animation-duration: 3.5s;
}

.meteor--2 {
  top: 5%;
  left: 50%;
  animation-delay: 4s;
  animation-duration: 4s;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 45, 149, 0.8) 50%,
    transparent
  );
  box-shadow: 0 0 6px rgba(255, 45, 149, 0.6);
}

.meteor--3 {
  top: 15%;
  left: 75%;
  animation-delay: 8s;
  animation-duration: 3.8s;
}

.meteor--4 {
  top: 8%;
  left: 15%;
  animation-delay: 12s;
  animation-duration: 4.2s;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 45, 149, 0.8) 50%,
    transparent
  );
  box-shadow: 0 0 6px rgba(255, 45, 149, 0.6);
}

.meteor--5 {
  top: 20%;
  left: 60%;
  animation-delay: 2.5s;
  animation-duration: 3.7s;
}

.meteor--6 {
  top: 12%;
  left: 85%;
  animation-delay: 10s;
  animation-duration: 4.1s;
}

.meteor--7 {
  top: 6%;
  left: 30%;
  animation-delay: 14s;
  animation-duration: 3.9s;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 45, 149, 0.8) 50%,
    transparent
  );
  box-shadow: 0 0 6px rgba(255, 45, 149, 0.6);
}

.meteor--8 {
  top: 18%;
  left: 10%;
  animation-delay: 6s;
  animation-duration: 3.6s;
}

@keyframes meteor-fall {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) rotate(-45deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(300px) translateX(300px) rotate(-45deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero__title {
    font-size: clamp(2rem, 10vw, 3rem);
  }
  
  .pdf-frame {
    height: 400px;
  }
  
  .cyber-frame {
    clip-path: none;
    border-radius: 4px;
  }
  
  .deco-circle--1 {
    width: 80px;
    height: 80px;
  }
  
  .deco-circle--2 {
    width: 120px;
    height: 120px;
  }
  
  .deco-circle--3 {
    width: 60px;
    height: 60px;
  }
  
  .deco-grid {
    background-size: 40px 40px;
  }
  
  /* 手機版隱藏部分粒子以提升效能 */
  .particle--3,
  .particle--4,
  .particle--5,
  .particle--6 {
    display: none;
  }
  
  /* 手機版減少流星數量以提升效能 */
  .meteor--4,
  .meteor--5,
  .meteor--6,
  .meteor--7,
  .meteor--8 {
    display: none;
  }
  
  .meteor {
    height: 60px;
  }
  
  @keyframes meteor-fall {
    0% {
      opacity: 0;
      transform: translateY(0) translateX(0) rotate(-45deg);
    }
    10% {
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translateY(200px) translateX(200px) rotate(-45deg);
    }
  }
}
