@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background: #080a12;
  color: #f5f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --muted: #8d91a5;
  --line: rgba(215, 220, 255, 0.11);
  --cyan: #66e4ed;
  --violet: #9c83ff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 78% 24%, rgba(87, 67, 178, 0.17), transparent 34%),
    radial-gradient(ellipse at 7% 75%, rgba(23, 116, 139, 0.11), transparent 32%),
    #080a12;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.app-shell {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
}

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(112, 221, 231, 0.32);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(47, 190, 202, 0.17), rgba(122, 91, 231, 0.2));
  color: var(--cyan);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-size: 0.86rem;
  letter-spacing: 0.17em;
}

.brand-copy small,
.topbar-note,
.eyebrow,
.card-kicker,
.model-badge,
.live-label,
.resolution-label,
.hand-count small,
.section-label,
.step-number,
.footer {
  font-family: 'DM Mono', Consolas, monospace;
}

.brand-copy small {
  color: #777c91;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9da2b5;
  font-size: 0.63rem;
  letter-spacing: 0.13em;
}

.topbar-dot,
.model-badge > span,
.live-label i,
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.topbar-dot {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(102, 228, 237, 0.7);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(510px, 1.14fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
  padding: 82px 0 72px;
}

.intro {
  padding: 14px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #abb0c2;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
}

.eyebrow-line {
  width: 27px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

h1 {
  margin: 26px 0 20px;
  font-size: clamp(2.9rem, 5vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -0.075em;
}

h1 span {
  color: transparent;
  background: linear-gradient(95deg, #72e6e9 5%, #a48aff 82%);
  background-clip: text;
  -webkit-background-clip: text;
}

.intro-copy {
  max-width: 430px;
  margin: 0;
  color: #a0a4b7;
  font-size: 0.97rem;
  line-height: 1.85;
}

.intro-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.meta-icon {
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(102, 228, 237, 0.2);
  border-radius: 12px;
  background: rgba(102, 228, 237, 0.07);
  color: var(--cyan);
}

.meta-icon.violet {
  border-color: rgba(156, 131, 255, 0.2);
  background: rgba(156, 131, 255, 0.08);
  color: #b6a4ff;
}

.meta-icon svg {
  width: 21px;
  height: 21px;
}

.intro-meta > span:last-child {
  display: grid;
  gap: 4px;
}

.intro-meta strong {
  font-size: 0.79rem;
  font-weight: 700;
}

.intro-meta small {
  color: #858a9e;
  font-size: 0.7rem;
}

.tracking-card {
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(215, 220, 255, 0.13);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(24, 27, 43, 0.97), rgba(15, 17, 29, 0.98));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.35), 0 0 80px rgba(87, 67, 178, 0.08);
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 16px;
}

.card-kicker {
  color: var(--cyan);
  font-size: 0.58rem;
  letter-spacing: 0.17em;
}

.card-heading h2 {
  margin: 5px 0 0;
  font-size: 1.04rem;
  letter-spacing: -0.035em;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(156, 131, 255, 0.17);
  border-radius: 8px;
  color: #b3a5ec;
  font-size: 0.54rem;
  letter-spacing: 0.1em;
}

.model-badge > span {
  background: #a48aff;
  box-shadow: 0 0 9px rgba(164, 138, 255, 0.65);
}

.camera-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(217, 226, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(rgba(99, 114, 157, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 114, 157, 0.065) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 45%, rgba(67, 84, 125, 0.22), transparent 60%),
    #0b0e18;
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.camera-video,
.hand-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-video {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hand-canvas {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.heart-effects {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.gesture-banner {
  position: absolute;
  z-index: 5;
  top: 54px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 139, 191, 0.42);
  border-radius: 999px;
  background: rgba(57, 21, 46, 0.86);
  color: #ff9ec8;
  font-family: 'DM Mono', Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.11em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -5px) scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.gesture-banner span {
  color: #ff72ae;
  font-size: 0.8rem;
}

.camera-frame.effect-active[data-effect='love'] {
  border-color: rgba(255, 114, 174, 0.55);
  box-shadow: inset 0 0 42px rgba(255, 75, 151, 0.12);
}

.camera-frame.effect-active[data-effect='ily'] {
  border-color: rgba(102, 228, 237, 0.58);
  box-shadow: inset 0 0 42px rgba(102, 228, 237, 0.12);
}

.camera-frame.effect-active[data-effect='disco'] {
  border-color: rgba(218, 112, 255, 0.72);
  box-shadow:
    inset 0 0 48px rgba(142, 91, 255, 0.16),
    0 0 26px rgba(255, 79, 216, 0.12);
}

.camera-frame.effect-active[data-effect='glasses'] {
  border-color: rgba(102, 228, 237, 0.58);
  box-shadow: inset 0 0 42px rgba(102, 228, 237, 0.12);
}

.camera-frame.effect-active[data-effect='rain'] {
  border-color: rgba(139, 190, 255, 0.68);
  box-shadow: inset 0 0 52px rgba(64, 128, 218, 0.2), 0 0 22px rgba(95, 159, 255, 0.12);
}

.camera-frame.effect-active .gesture-banner {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.camera-frame[data-effect='ily'] .gesture-banner,
.camera-frame[data-effect='ily'] .gesture-banner span {
  border-color: rgba(102, 228, 237, 0.4);
  color: #9af4f5;
}

.camera-frame[data-effect='disco'] .gesture-banner,
.camera-frame[data-effect='disco'] .gesture-banner span {
  border-color: rgba(218, 112, 255, 0.5);
  color: #f0adff;
}

.camera-frame[data-effect='rain'] .gesture-banner,
.camera-frame[data-effect='rain'] .gesture-banner span {
  border-color: rgba(139, 190, 255, 0.48);
  color: #c1ddff;
}

.camera-frame[data-effect='glasses'] .gesture-banner,
.camera-frame[data-effect='glasses'] .gesture-banner span {
  border-color: rgba(102, 228, 237, 0.4);
  color: #9af4f5;
}

.heart-particle {
  position: absolute;
  color: #ff78b5;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
  font-size: var(--heart-size, 27px);
  line-height: 1;
  text-shadow: 0 0 16px rgba(255, 85, 165, 0.78);
  animation: heart-float var(--heart-duration, 1.4s) ease-out forwards;
}

.camera-frame.is-active .camera-video,
.camera-frame.is-active .hand-canvas {
  opacity: 1;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8990a8;
  transition: opacity 0.2s ease;
}

.camera-frame.is-active .camera-placeholder {
  opacity: 0;
  pointer-events: none;
}

.placeholder-icon {
  z-index: 1;
  display: grid;
  width: 65px;
  height: 65px;
  margin-bottom: 5px;
  place-items: center;
  border: 1px solid rgba(102, 228, 237, 0.2);
  border-radius: 19px;
  background: rgba(102, 228, 237, 0.08);
  color: var(--cyan);
}

.placeholder-icon svg {
  width: 39px;
  height: 39px;
}

.camera-placeholder strong,
.camera-placeholder > span:last-child {
  z-index: 1;
}

.camera-placeholder strong {
  color: #e2e5f1;
  font-size: 0.82rem;
}

.camera-placeholder > span:last-child {
  color: #8d93a8;
  font-size: 0.69rem;
}

.placeholder-orbit {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(102, 228, 237, 0.07);
  border-radius: 50%;
}

.orbit-two {
  width: 270px;
  height: 270px;
  border-color: rgba(156, 131, 255, 0.06);
}

.frame-topline,
.frame-bottomline {
  position: absolute;
  z-index: 2;
  right: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.frame-topline {
  top: 13px;
}

.frame-bottomline {
  bottom: 13px;
}

.live-label,
.resolution-label,
.tracking-status,
.hand-count {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(225, 232, 255, 0.13);
  border-radius: 7px;
  background: rgba(9, 12, 21, 0.72);
  backdrop-filter: blur(8px);
}

.live-label {
  gap: 7px;
  color: #d7dbea;
  font-size: 0.53rem;
  letter-spacing: 0.1em;
}

.live-label i {
  width: 6px;
  height: 6px;
  background: #697087;
}

.camera-frame.is-active .live-label i {
  background: #f66c95;
  box-shadow: 0 0 9px rgba(246, 108, 149, 0.75);
  animation: pulse 1.3s ease-in-out infinite;
}

.resolution-label {
  color: #b4bbcf;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
}

.resolution-label b {
  margin: 0 4px;
  color: #6d748c;
  font-weight: 400;
}

.tracking-status {
  gap: 8px;
  color: #d3d8e9;
  font-size: 0.62rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #8c92a5;
}

.camera-frame.is-active .status-dot {
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(102, 228, 237, 0.7);
}

.hand-count {
  gap: 7px;
  color: var(--cyan);
  font-size: 0.7rem;
}

.hand-count small {
  color: #9da4b8;
  font-size: 0.48rem;
  letter-spacing: 0.1em;
}

.card-controls {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  align-items: center;
  gap: 12px 16px;
  padding-top: 16px;
}

.camera-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid rgba(117, 230, 235, 0.28);
  border-radius: 11px;
  background: linear-gradient(110deg, #45cbd4, #7282ee);
  color: #081117;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 9px 26px rgba(73, 198, 208, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.camera-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(73, 198, 208, 0.24);
}

.camera-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-icon,
.button-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.button-arrow {
  margin-left: 3px;
  font-size: 0.9rem;
}

.camera-hint {
  justify-self: end;
  margin: 0;
  color: #858b9f;
  font-size: 0.61rem;
  line-height: 1.6;
  text-align: right;
}

.hint-lock {
  margin-right: 4px;
  color: #89dedf;
}

.camera-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #ff9aa9;
  font-size: 0.72rem;
  line-height: 1.5;
}

.how-it-works {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: 46px;
  padding: 27px 0 37px;
  border-top: 1px solid var(--line);
}

.section-label {
  padding-top: 3px;
  color: #9da2b5;
  font-size: 0.61rem;
  letter-spacing: 0.13em;
}

.section-label span {
  margin-right: 10px;
  color: var(--cyan);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.effect-guide {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: 46px;
  padding: 27px 0 37px;
  border-top: 1px solid var(--line);
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.effect-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.effect-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.1rem;
}

.love-card .effect-symbol {
  border-color: rgba(255, 114, 174, 0.2);
  background: rgba(255, 114, 174, 0.08);
}

.neon-card .effect-symbol {
  border-color: rgba(102, 228, 237, 0.2);
  background: rgba(102, 228, 237, 0.08);
}

.disco-card .effect-symbol {
  border-color: rgba(218, 112, 255, 0.26);
  background: conic-gradient(
    from 25deg,
    rgba(255, 79, 216, 0.18),
    rgba(66, 239, 255, 0.16),
    rgba(255, 240, 106, 0.15),
    rgba(141, 255, 121, 0.15),
    rgba(156, 120, 255, 0.18)
  );
}

.glasses-card .effect-symbol {
  border-color: rgba(102, 228, 237, 0.2);
  background: linear-gradient(135deg, rgba(102, 228, 237, 0.1), rgba(255, 88, 200, 0.1));
}

.rain-card .effect-symbol {
  border-color: rgba(139, 190, 255, 0.24);
  background: linear-gradient(145deg, rgba(80, 140, 218, 0.14), rgba(19, 31, 63, 0.28));
}

.effect-card h3 {
  margin: 0 0 6px;
  color: #e4e6f0;
  font-size: 0.73rem;
}

.effect-card p {
  margin: 0;
  color: #858b9e;
  font-size: 0.63rem;
  line-height: 1.6;
}

.step {
  display: flex;
  gap: 12px;
}

.step-number {
  color: #777d91;
  font-size: 0.62rem;
}

.step h3 {
  margin: 0 0 5px;
  color: #e4e6f0;
  font-size: 0.73rem;
}

.step p {
  max-width: 210px;
  margin: 0;
  color: #858b9e;
  font-size: 0.65rem;
  line-height: 1.65;
}

.footer {
  display: flex;
  justify-content: space-between;
  padding: 19px 0 25px;
  border-top: 1px solid var(--line);
  color: #71768a;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}

.footer-divider {
  padding: 0 5px;
  color: #a58dff;
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

@keyframes heart-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.35) rotate(-12deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -20%) scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--heart-drift, 0px)), -140px) scale(1.2) rotate(13deg);
  }
}

@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: minmax(0, 0.8fr) minmax(430px, 1.2fr);
    gap: 40px;
    padding: 64px 0;
  }

  h1 {
    font-size: clamp(2.75rem, 5.2vw, 4rem);
  }

  .tracking-card {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 36px, 560px);
  }

  .topbar {
    height: 72px;
  }

  .topbar-note {
    font-size: 0.52rem;
    letter-spacing: 0.08em;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 51px 0 45px;
  }

  .intro {
    padding: 0;
  }

  h1 {
    margin: 20px 0 15px;
    font-size: clamp(2.75rem, 10vw, 4.15rem);
  }

  .intro-copy {
    max-width: 510px;
    font-size: 0.9rem;
  }

  .intro-meta {
    display: inline-flex;
    width: 100%;
    margin-top: 19px;
  }

  .intro-meta + .intro-meta {
    margin-top: 15px;
  }

  .tracking-card {
    padding: 15px;
    border-radius: 18px;
  }

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 21px;
  }

  .effect-guide {
    grid-template-columns: 1fr;
    gap: 21px;
  }

  .footer {
    gap: 16px;
    font-size: 0.48rem;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: calc(100% - 28px);
  }

  .topbar-note {
    max-width: 130px;
    font-size: 0.47rem;
    line-height: 1.5;
  }

  .model-badge {
    padding: 7px;
    font-size: 0.46rem;
  }

  .camera-frame {
    aspect-ratio: 4 / 3;
  }

  .card-controls {
    grid-template-columns: 1fr;
  }

  .camera-button {
    width: 100%;
  }

  .camera-hint {
    justify-self: center;
    text-align: center;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .effect-grid {
    grid-template-columns: 1fr;
  }

  .step p {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
