:root {
  --bg: #09111f;
  --bg-soft: #101a2d;
  --card: rgba(17, 27, 46, 0.86);
  --card-strong: rgba(23, 35, 61, 0.96);
  --text: #eef4ff;
  --muted: #97aacf;
  --line: rgba(133, 165, 238, 0.18);
  --primary: #68a1ff;
  --primary-strong: #2d74ff;
  --secondary: #6f8fcb;
  --success: #54d3a8;
  --warning: #ffbd59;
  --danger: #ff7f8c;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
}

body.light {
  --bg: #eef4ff;
  --bg-soft: #dbe8ff;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: rgba(255, 255, 255, 0.96);
  --text: #13203d;
  --muted: #5d6f92;
  --line: rgba(72, 105, 177, 0.16);
  --primary: #2b62df;
  --primary-strong: #194cbe;
  --secondary: #4d6cad;
  --shadow: 0 18px 40px rgba(58, 88, 158, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Noto Sans TC', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(85, 140, 255, 0.18), transparent 28%),
    radial-gradient(circle at right center, rgba(84, 211, 168, 0.08), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, #050a15 100%);
  color: var(--text);
}

body.light {
  background:
    radial-gradient(circle at top left, rgba(43, 98, 223, 0.12), transparent 24%),
    radial-gradient(circle at right center, rgba(84, 211, 168, 0.08), transparent 20%),
    linear-gradient(180deg, #eef4ff 0%, #dce8ff 100%);
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 56px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(90, 146, 255, 0.34), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(83, 212, 170, 0.18), transparent 18%),
    radial-gradient(circle at 50% 80%, rgba(113, 73, 255, 0.18), transparent 22%);
  filter: blur(10px);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(104, 161, 255, 0.14);
  border: 1px solid rgba(104, 161, 255, 0.25);
  color: #b9d2ff;
  font-size: 14px;
  letter-spacing: .4px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.06;
  margin: 18px 0 16px;
}

.hero h1 span {
  color: #8ec0ff;
}

.hero__desc {
  max-width: 860px;
  line-height: 1.9;
  color: var(--muted);
  font-size: 18px;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.meta-card,
.card,
.stat-box,
.link-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.meta-card {
  padding: 18px 20px;
}

.meta-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.meta-card strong {
  font-size: 18px;
}

.hero__actions,
.control-row,
.mock-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__actions {
  margin-top: 30px;
}

.btn,
.mini-btn {
  border: none;
  cursor: pointer;
  transition: .22s ease;
  font-family: inherit;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
}

.btn:hover,
.mini-btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
}

.btn--secondary {
  background: rgba(113, 143, 203, 0.18);
  border: 1px solid rgba(113, 143, 203, 0.28);
  color: var(--text);
}

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

.section {
  padding: 34px 0 28px;
}

.section--alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

body.light .section--alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0.16));
}

.section-title {
  margin-bottom: 24px;
}

.section-title span {
  display: inline-block;
  font-size: 14px;
  color: #8fb8ff;
  letter-spacing: .24em;
  margin-bottom: 10px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
}

.grid {
  display: grid;
  gap: 18px;
}

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

.gap-lg {
  gap: 22px;
}

.card {
  padding: 24px;
}

.card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.card p,
.logic-list li,
.feature-list li,
.timeline p,
.solution,
.signature-result,
.muted {
  color: var(--muted);
  line-height: 1.9;
}

.feature-list,
.logic-list {
  padding-left: 22px;
  margin: 14px 0 0;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chips span {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(104, 161, 255, 0.12);
  border: 1px solid rgba(104, 161, 255, 0.2);
  color: #bdd5ff;
  font-size: 14px;
}

.code-block {
  padding: 18px;
  border-radius: 18px;
  background: rgba(4, 10, 20, 0.72);
  color: #bdddff;
  overflow: auto;
  line-height: 1.8;
  border: 1px solid rgba(112, 153, 255, 0.14);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline > div,
.note,
.trouble-list > div {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.timeline strong,
.note strong,
.trouble-list strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.diagram {
  margin-top: 8px;
  border-radius: 18px;
  background: rgba(7, 12, 24, 0.72);
  border: 1px solid var(--line);
}

.note-group,
.trouble-list {
  display: grid;
  gap: 12px;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.function-card {
  text-align: center;
}

.function-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(104, 161, 255, 0.24), rgba(84, 211, 168, 0.16));
  font-size: 34px;
}

.demo-layout,
.signature-layout {
  margin-top: 8px;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 22px;
}

.panel-header,
.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.status {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(84, 211, 168, 0.12);
  color: #a5f0d5;
  border: 1px solid rgba(84, 211, 168, 0.2);
  font-size: 14px;
}

.camera-wrap {
  position: relative;
  min-height: 400px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(10, 16, 30, 0.96), rgba(17, 28, 51, 0.95));
  border: 1px solid var(--line);
  margin: 18px 0 16px;
}

#camera {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  background: #04070d;
}

.camera-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.camera-hint {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: 640px;
  padding: 12px 14px;
  background: rgba(6, 9, 16, 0.62);
  border-radius: 14px;
  color: #c7dbff;
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid rgba(141, 175, 255, 0.18);
}

.camera-hint--live {
  background: rgba(18, 78, 55, 0.72);
  color: #d2ffe9;
  border-color: rgba(84, 211, 168, 0.24);
}

.virtual-pointer,
.cursor-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #6ab2ff 45%, rgba(106, 178, 255, 0.2) 70%, transparent 100%);
  box-shadow: 0 0 0 10px rgba(104, 161, 255, 0.12);
  transition: transform .18s ease;
}

.virtual-pointer {
  left: 40%;
  top: 40%;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  position: fixed;
  width: 12px;
  height: 12px;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 8px rgba(104, 161, 255, 0.1);
  pointer-events: none;
  z-index: 9999;
}

.mock-controls {
  margin-top: 14px;
}

.mini-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(104, 161, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(104, 161, 255, 0.18);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-box {
  padding: 16px 18px;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-box strong {
  font-size: 20px;
}

.log-box {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 14px;
  color: var(--muted);
  overflow: auto;
  background: rgba(255, 255, 255, 0.02);
}

#signaturePad {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 21, 0.82);
  margin: 14px 0 18px;
  touch-action: none;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.info-table th,
.info-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.info-table th {
  background: rgba(104, 161, 255, 0.08);
}

.link-box {
  padding: 18px 20px;
  margin: 18px 0 10px;
}

.link-box a {
  color: #9cc4ff;
  word-break: break-all;
}

.footer {
  padding: 28px 0 40px;
}

.footer p {
  color: var(--muted);
  margin: 6px 0 0;
}

@media (max-width: 1080px) {
  .function-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .hero__meta,
  .grid-2,
  .signature-layout {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .footer__content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 52px;
  }

  .card,
  .meta-card {
    padding: 18px;
  }

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

  #camera,
  .camera-wrap {
    height: 280px;
    min-height: 280px;
  }
}


.ai-proof-layout {
  align-items: stretch;
}

.ai-proof-card {
  display: flex;
  flex-direction: column;
}

.share-proof {
  margin: 0;
  display: grid;
  gap: 14px;
}

.share-proof__image {
  width: 100%;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.04);
}

.share-proof figcaption {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}


.meta-card--student {
  background: linear-gradient(180deg, rgba(61, 123, 253, 0.18), rgba(61, 123, 253, 0.08));
}

.gallery-card {
  margin-top: 22px;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.screenshot-item {
  margin: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  height: 100%;
}

.screenshot-badge {
  display: inline-flex;
  justify-self: start;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
  color: #d3e3ff;
  background: rgba(104, 161, 255, 0.12);
  border: 1px solid rgba(104, 161, 255, 0.18);
}

.screenshot-item img {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.04);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 8px;
}

.screenshot-item figcaption {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

@media (max-width: 980px) {
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
}

/* Screenshot gallery */
.gallery-card {
  margin-top: 22px;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 20px;
}

.screenshot-item {
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 14px;
  justify-items: center;
}

.screenshot-item img {
  display: block;
  width: min(100%, 760px);
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(141, 175, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  object-fit: contain;
}

.screenshot-item figcaption {
  width: min(100%, 760px);
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
}

.ai-proof-layout {
  align-items: start;
}

.ai-proof-card,
.share-proof {
  height: 100%;
}

.share-proof {
  margin: 0;
  display: grid;
  gap: 14px;
}

.share-proof__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(141, 175, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.share-proof figcaption {
  color: var(--muted);
  line-height: 1.8;
}
