@font-face {
  font-family: 'AbiselTahoma';
  src: url('fonts/tahoma.woff2') format('woff2'), url('fonts/tahoma.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AbiselTahoma';
  src: url('fonts/tahoma-bold.woff2') format('woff2'), url('fonts/tahoma-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AbiselTahoma';
  src: url('fonts/tahoma-bold.woff2') format('woff2'), url('fonts/tahoma-bold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Abisel Status Official Clean Theme */
:root {
  --bg: #45808F;
  --bg-deep: #2F5E6B;
  --bg-soft: #5B98A6;
  --card: #ffffff;
  --card-soft: #f2f7f8;
  --card-ink: #1F3F48;
  --card-ink-dim: #5A7B84;
  --line: rgba(31, 63, 72, 0.10);
  --sun: #FFD166;
  --sun-deep: #E5B23E;
  --coral: #FF7B6B;
  --coral-deep: #E35645;
  --wa: #25D366;
  --wa-deep: #18A34D;
  --win-bg: #EAFBF0;
  --fail-bg: #FFF0EE;
  --syne: 'AbiselTahoma', Tahoma, Verdana, sans-serif;
  --sans: 'AbiselTahoma', Tahoma, Verdana, sans-serif;
  --r: 26px;
  --shadow: 0 14px 34px -14px rgba(15, 36, 42, 0.42);
  --shadow-btn: 0 8px 20px -8px rgba(15, 36, 42, 0.35);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  color: var(--card-ink);
  min-height: 100dvh;
  background: linear-gradient(160deg, var(--bg-soft) 0%, var(--bg) 50%, var(--bg-deep) 100%);
  position: relative;
}

/* Soft Abisel floating ambient blobs */
.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.32;
}

.b1 {
  width: 46vw;
  height: 46vw;
  max-width: 520px;
  max-height: 520px;
  background: var(--bg-soft);
  top: -12vw;
  left: -14vw;
}

.b2 {
  width: 34vw;
  height: 34vw;
  max-width: 380px;
  max-height: 380px;
  background: var(--sun);
  right: -12vw;
  top: 26vh;
  opacity: 0.16;
}

.b3 {
  width: 40vw;
  height: 40vw;
  max-width: 460px;
  max-height: 460px;
  background: var(--bg-deep);
  left: 28vw;
  bottom: -18vw;
  opacity: 0.48;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
}

.stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

@media (min-width: 780px) {
  .shell {
    padding: 28px 24px 40px;
  }
  .stage-grid {
    grid-template-columns: 345px 1fr;
    gap: 20px;
  }
}

.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 15px 16px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-kicker h2 {
  margin: 0;
  font-family: var(--syne);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--card-ink);
  text-transform: uppercase;
}

/* Video Card */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 270px;
  margin: 0 auto 12px;
  aspect-ratio: 360 / 408;
  border-radius: 20px;
  overflow: hidden;
  background: #142B32;
  box-shadow: 0 10px 24px -12px rgba(15, 36, 42, 0.45);
  cursor: pointer;
}

@media (min-width: 780px) {
  .video-frame {
    max-width: 100%;
    aspect-ratio: 360 / 408;
  }
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.video-overlay-play {
  position: absolute;
  inset: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(15, 36, 42, 0.04) 0%, rgba(15, 36, 42, 0.34) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.video-overlay-play.playing {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  color: var(--card-ink);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  transition: transform 0.16s ease;
}

.video-frame:hover .play-circle {
  transform: scale(1.06);
}

.video-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.26);
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--sun);
  transition: width 0.06s linear;
}

/* Difficulty toggle */
.difficulty-toggle {
  display: inline-flex;
  background: var(--card-soft);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.diff-btn {
  border: 0;
  background: transparent;
  color: var(--card-ink-dim);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.diff-btn.active {
  background: var(--bg);
  color: #fff;
}

/* Clean Tactile Buttons */
.btn {
  font-family: inherit;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-watch {
  width: 100%;
  padding: 14px 16px;
  background: var(--sun);
  color: var(--card-ink);
  font-family: var(--syne);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px -10px rgba(224, 168, 0, 0.7);
}

.btn-watch:hover:not(:disabled) {
  filter: brightness(1.03);
}

/* Visualizer */
.visualizer-box {
  position: relative;
  background: #17343C;
  border-radius: 18px;
  height: 88px;
  margin-bottom: 14px;
  overflow: hidden;
}

#wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.visualizer-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  pointer-events: none;
}

.hint-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: #EAF5F7;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.rec-timer {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--coral-deep);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

.rec-timer[hidden] {
  display: none;
}

.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 0.9s infinite;
}

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

/* Big Primary Mic Button */
.btn-mic {
  position: relative;
  width: 100%;
  padding: 18px 18px;
  background: linear-gradient(135deg, #25D366 0%, #17B153 100%);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 26px -10px rgba(24, 163, 77, 0.65);
  text-align: left;
  gap: 14px;
}

.btn-mic:hover:not(:disabled) {
  filter: brightness(1.04);
}

.btn-mic.recording {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  box-shadow: 0 12px 26px -10px rgba(227, 86, 69, 0.65);
  animation: micPulse 1.15s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 10px 24px -8px rgba(227, 86, 69, 0.55), 0 0 0 0 rgba(255, 123, 107, 0.45); }
  50% { box-shadow: 0 10px 24px -8px rgba(227, 86, 69, 0.55), 0 0 0 12px rgba(255, 123, 107, 0); }
}

.mic-emoji {
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
}

.mic-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mic-text strong {
  font-family: var(--syne);
  font-size: clamp(1.02rem, 4.1vw, 1.2rem);
  font-weight: 800;
  line-height: 1.12;
}

.mic-text small {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.92;
}

.alert-box {
  margin-top: 12px;
  background: var(--fail-bg);
  color: var(--coral-deep);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

/* Result Stage */
.result-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.result-stage[hidden] {
  display: none;
}

.stamp-banner {
  border-radius: 20px;
  padding: 22px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.stamp-banner.is-win {
  background: var(--win-bg);
}

.stamp-banner.is-fail {
  background: var(--fail-bg);
}

.rubber-stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  border: 4px solid currentColor;
  border-radius: 16px;
  transform: rotate(-3.5deg);
  text-align: center;
  animation: stampSlam 0.34s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

.stamp-banner.is-win .rubber-stamp {
  color: var(--wa-deep);
}

.stamp-banner.is-fail .rubber-stamp {
  color: var(--coral-deep);
}

.stamp-banner.shake {
  animation: failShake 0.42s ease both;
}

@keyframes stampSlam {
  0% { opacity: 0; transform: scale(2) rotate(-12deg); }
  75% { opacity: 1; transform: scale(0.95) rotate(-2.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-3.5deg); }
}

@keyframes failShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.stamp-big {
  font-family: var(--syne);
  font-size: clamp(2.7rem, 11vw, 3.6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.stamp-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.verdict-copy {
  text-align: center;
}

.verdict-headline {
  margin: 0;
  font-family: var(--syne);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--card-ink);
  line-height: 1.2;
}

.verdict-tip {
  margin: 6px 0 0;
  font-size: 0.93rem;
  color: var(--card-ink-dim);
  font-weight: 500;
  line-height: 1.45;
}

.heard-line {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--card-ink-dim);
  background: var(--card-soft);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
}

/* Breakdown Bars */
.metrics-grid {
  background: var(--card-soft);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.metric-row {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--card-ink);
}

.metric-bar {
  height: 10px;
  background: rgba(31, 63, 72, 0.11);
  border-radius: 999px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  width: 0%;
  background: var(--wa);
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-fill.mid {
  background: var(--sun-deep);
}

.metric-fill.low {
  background: var(--coral-deep);
}

.metric-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--card-ink-dim);
  text-align: right;
}

/* Action rows */
.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-secondary {
  padding: 12px 10px;
  background: var(--card-soft);
  color: var(--card-ink);
  font-size: 13px;
}

.btn-secondary:hover:not(:disabled) {
  background: #E4EFF2;
}

.result-actions {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
}

.btn-primary-again {
  padding: 14px 14px;
  background: linear-gradient(135deg, #25D366 0%, #17B153 100%);
  color: #fff;
  font-family: var(--syne);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 8px 20px -10px rgba(24, 163, 77, 0.65);
}

.btn-share {
  padding: 14px 12px;
  background: var(--bg-deep);
  color: #fff;
  font-size: 14px;
}

.btn-share:hover:not(:disabled) {
  background: var(--bg);
}

.share-toast {
  margin: -4px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--wa-deep);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

[hidden] {
  display: none !important;
}

/* Recording notice: small and subtle at the very bottom of the page */
.page-note {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 8px auto 0;
  padding: 0 20px max(20px, env(safe-area-inset-bottom));
  text-align: center;
}
.page-note p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}
