@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;0,9..40,900&display=swap');

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ===== TOP BAR ===== */
.top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFC00;
  padding: 12px 14px;
  flex-shrink: 0;
  animation: barIn 0.3s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.top-bar-left {
  font-size: 14px;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.01em;
}

.top-bar-right {
  font-size: 13px;
  font-weight: 800;
  color: #000000;
  display: flex;
  align-items: center;
}

.top-bar-right strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.top-bar-arrow {
  font-size: 16px;
  font-weight: 800;
  display: inline-block;
  animation: arrowFloat 1.5s 0.5s ease-in-out infinite;
}

/* ===== DETECTED BADGE ===== */
.detected-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  margin: 36px 0 16px;
  flex-shrink: 0;
  border: 1px solid #333333;
  border-radius: 100px;
  animation: barIn 0.3s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.detected-dot {
  width: 8px;
  height: 8px;
  background: #FFFC00;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 252, 0, 0.6);
  animation: pulseDotYellow 2s ease-in-out infinite;
}

.detected-text {
  font-size: 12.5px;
  font-weight: 500;
  color: #86888a;
  letter-spacing: 0.01em;
}

/* ===== LAYOUT ===== */
.page-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
  padding: 16px 4px 16px;
}

/* ===== INSTRUCTION CARD ===== */
.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 14px 18px 16px;
  width: calc(100% - 44px);
  max-width: 320px;
  position: relative;
  overflow: hidden;
  animation: cardIn 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.girl-wrap {
  position: absolute;
  bottom: 25px;
  right: 35px;
  width: 80px;
  height: 100px;
  overflow: hidden;
}

.girl-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.avatar-wrap {
  width: 46px;
  height: 58px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ffffff;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title {
  font-size: 14px;
  color: #000000;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.card-title strong {
  font-size: 15.5px;
  font-weight: 800;
  display: block;
  margin-bottom: -1px;
}

.card-subtitle {
  font-weight: 400;
  color: #1a1a1a;
}

.new-badge {
  font-weight: 800;
  color: #000000;
}

/* ===== STEPS ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 2px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFC00;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 0 6px rgba(255, 252, 0, 0.5),
    0 0 14px rgba(255, 252, 0, 0.3);
}

.step-text {
  font-size: 12.5px;
  color: #1a1a1a;
  line-height: 1.35;
  font-weight: 400;
}

.step-text strong {
  font-weight: 700;
}

/* ===== FAKE MENU ===== */
.menu-card {
  width: 55%;
  max-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #FFFC00;
  margin-top: 100px;
  box-shadow: none;
  animation: menuIn 0.5s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.menu-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.menu-item--primary {
  background: #FFFC00;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  pointer-events: auto;
}

.menu-item--primary:active {
  background: #e6e300;
}

.menu-pulse {
  animation: menuPulseGlow 2s ease-in-out infinite;
}

.menu-pulse .menu-label {
  animation: textPulse 1.5s ease-in-out infinite;
}

.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: worldPulse 1.6s ease-in-out infinite;
}

.menu-icon svg {
  width: 18px;
  height: 18px;
}

.menu-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #000000;
  flex: 1;
}

.menu-arrow {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
}

.menu-item--secondary {
  background: #ffffff;
  border-top: 1px solid #e8e8e8;
  padding: 7px 12px;
}

.menu-item--secondary .menu-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #1a1a1a;
}

.menu-chevron {
  font-size: 16px;
  color: #aaaaaa;
  font-weight: 300;
}

/* ===== COPY FALLBACK ===== */
.copy-fallback {
  margin-top: 18px;
  font-size: 12.5px;
  color: #86888a;
  text-align: center;
  animation: menuIn 0.5s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.copy-link {
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.copy-link:active {
  color: #ffffff;
}

/* ===== FOOTER ===== */
.site-footer {
  width: 100%;
  flex-shrink: 0;
  padding: 0 20px 14px;
  animation: footerIn 0.5s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

.footer-divider {
  height: 1px;
  background: #333333;
  width: 100%;
  margin-bottom: 10px;
}

.footer-legal {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  color: #86888a;
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.footer-link {
  cursor: pointer;
}

/* ===== REDIRECT LOADER (ANDROID BROWSER ONLY) ===== */
.redirect-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #000000;
}

.redirect-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 252, 0, 0.25);
  border-top-color: #FFFC00;
  box-shadow:
    0 0 10px rgba(255, 252, 0, 0.9),
    0 0 24px rgba(255, 252, 0, 0.6),
    0 0 40px rgba(255, 252, 0, 0.35);
  animation: redirectSpin 0.9s linear infinite;
}

.redirect-loader-text {
  margin-top: 16px;
  text-align: center;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.redirect-loader-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFC00;
}

.redirect-loader-sub {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 400;
  color: #d4d4d4;
  opacity: 0.9;
}

@keyframes redirectSpin {
  to { transform: rotate(360deg); }
}

@keyframes redirectPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 8px rgba(255, 252, 0, 0.7),
      0 0 24px rgba(255, 252, 0, 0.45),
      0 0 40px rgba(255, 252, 0, 0.25);
  }
  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 14px rgba(255, 252, 0, 1),
      0 0 34px rgba(255, 252, 0, 0.8),
      0 0 60px rgba(255, 252, 0, 0.45);
  }
}

/* ===== ANIMATIONS ===== */
@keyframes worldPulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.06); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes barIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes arrowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulseDotYellow {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(255, 252, 0, 0.6); }
  50% { opacity: 0.7; box-shadow: 0 0 14px rgba(255, 252, 0, 0.9); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes footerIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menuPulseGlow {
  0%, 100% {
    background: #FFFC00;
    box-shadow: 0 0 6px rgba(255, 252, 0, 0.3);
  }
  50% {
    background: #fff44f;
    box-shadow: 0 0 18px rgba(255, 252, 0, 0.7), 0 0 30px rgba(255, 252, 0, 0.3);
  }
}

@keyframes textPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
