@import "./reset.css";

@keyframes ai-geo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(5deg); }
}

@keyframes ai-geo-float-reverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(10px) rotate(-6deg); }
}

@keyframes ai-geo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ai-geo-slide {
  0% { transform: translateX(-6%); }
  100% { transform: translateX(6%); }
}

@keyframes ai-card-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-page {
  position: relative;
  flex: 1 0 auto;
  order: 2;
  width: 100%;
  min-height: calc(100vh - 80px);
  background: linear-gradient(180deg, #080808 0%, #101010 42%, #0a0a0a 100%);
}

.ai-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ai-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 20px 20px;
}

.ai-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.ai-orb--1 {
  width: 280px;
  height: 280px;
  top: -20px;
  left: -50px;
  background: rgba(255, 255, 255, 0.06);
}

.ai-orb--2 {
  width: 220px;
  height: 220px;
  top: 18%;
  right: -40px;
  background: rgba(255, 255, 255, 0.05);
}

.ai-orb--3 {
  width: 200px;
  height: 200px;
  bottom: -10px;
  left: -20px;
  background: rgba(255, 255, 255, 0.045);
}

.ai-geo-shape {
  position: absolute;
  pointer-events: none;
}

.ai-geo-circle-1 {
  width: 240px;
  height: 240px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  top: -30px;
  left: -80px;
  animation: ai-geo-float 10s ease-in-out infinite;
}

.ai-geo-circle-2 {
  width: 150px;
  height: 150px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  bottom: -20px;
  right: -40px;
  animation: ai-geo-float-reverse 12s ease-in-out infinite;
}

.ai-geo-square {
  width: 80px;
  height: 80px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  top: 10%;
  right: 12px;
  animation: ai-geo-spin 32s linear infinite;
}

.ai-geo-triangle {
  width: 0;
  height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-bottom: 50px solid rgba(255, 255, 255, 0.12);
  bottom: 14%;
  left: 12px;
  animation: ai-geo-float 14s ease-in-out infinite;
}

.ai-line-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.7;
}

.ai-line {
  position: absolute;
  height: 1.5px;
  width: 130%;
  left: -15%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  animation: ai-geo-slide 14s ease-in-out infinite alternate;
}

.ai-line-1 { top: 14%; }
.ai-line-2 { top: 68%; animation-delay: -4s; }
.ai-line-3 { top: 88%; animation-delay: -8s; }

.ai-geo-accent {
  position: absolute;
  pointer-events: none;
}

.ai-geo-accent circle,
.ai-geo-accent rect,
.ai-geo-accent path,
.ai-geo-accent line {
  stroke: rgba(255, 255, 255, 0.32);
}

.ai-geo-accent--tl {
  top: 16px;
  left: 16px;
  width: 220px;
  height: 220px;
}

.ai-geo-accent--tr {
  top: 8%;
  right: 16px;
  width: 160px;
  height: 160px;
}

.ai-geo-accent--bl {
  bottom: 12%;
  left: 16px;
  width: 150px;
  height: 150px;
}

.ai-geo-accent--br {
  right: 16px;
  bottom: 16px;
  width: 200px;
  height: 200px;
}

.ai-main {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 36px 0 72px;
}

.ai-hero {
  text-align: center;
  margin-bottom: 40px;
  animation: ai-card-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-hero h1 {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f5f5f5;
  margin-bottom: 10px;
}

.ai-hero p {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
}

.ai-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ai-item {
  animation: ai-card-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-item:nth-child(1) { animation-delay: 0.05s; }
.ai-item:nth-child(2) { animation-delay: 0.12s; }
.ai-item:nth-child(3) { animation-delay: 0.19s; }
.ai-item:nth-child(4) { animation-delay: 0.26s; }

.ai-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.ai-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

.ai-item-title {
  margin-top: 12px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.ai-tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 6px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.68rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.ai-chip-icon {
  display: flex;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
}

.ai-chip-icon svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.78);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-chip-icon--fill svg {
  fill: rgba(255, 255, 255, 0.55);
  stroke: rgba(255, 255, 255, 0.78);
}

@media all and (max-width: 640px) {
  .ai-page {
    margin-top: 40px;
    margin-bottom: 80px;
  }

  .ai-hero {
    margin-bottom: 28px;
  }
}
