@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  font-family: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: #161823;
  background: #f4f5f8;
  font-synthesis: none;
  --tt-red: #fe2c55;
  --tt-red-hover: #ff3b5c;
  --tt-cyan: #25f4ee;
  --tt-dark: #161823;
  --tt-gray-bg: #f1f1f2;
  --tt-gray-border: #e3e5e8;
  --tt-gray-text: #73747b;
  --tt-gray-placeholder: #8a8b91;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #f4f5f8 45%, #eaecf0 100%);
  color: var(--tt-dark);
}
[hidden] { display: none !important; }

/* Phone Frame - Sleek Titanium Dark with subtle TikTok edge glow */
.phone-shell {
  position: relative;
  width: min(calc(100% - 36px), 450px);
  margin: 28px auto;
  padding: 8px;
  border: 1px solid #282a33;
  border-radius: 58px;
  background: linear-gradient(145deg, #1f212a 0%, #111216 35%, #181a22 68%, #282b37 100%);
  box-shadow:
    0 0 0 1px #0a0b0e,
    0 0 0 3px #20232d,
    0 30px 75px rgba(0, 0, 0, .4),
    0 0 40px rgba(254, 44, 85, .08),
    inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.phone-shell::before {
  position: absolute;
  z-index: 3;
  inset: 5px;
  border: 2px solid rgba(0, 0, 0, .85);
  border-radius: 53px;
  pointer-events: none;
  content: '';
}
.phone-button {
  position: absolute;
  width: 4px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, #111216, #2d303d 48%, #171820);
  box-shadow: -1px 0 2px rgba(0, 0, 0, .55);
}
.phone-button-action { top: 125px; left: -5px; height: 26px; }
.phone-button-volume-up { top: 178px; left: -5px; height: 50px; }
.phone-button-volume-down { top: 238px; left: -5px; height: 50px; }
.phone-button-power { top: 193px; right: -5px; height: 76px; transform: rotate(180deg); }

/* In-Phone Screen - Crisp modern TikTok Shop white card style */
.page {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 830px;
  margin: 0;
  padding: 125px 21px 58px;
  align-items: center;
  overflow: hidden;
  border: 2px solid #0a0b0e;
  border-radius: 48px;
  background:
    radial-gradient(circle at 85% 82%, rgba(254, 44, 85, .06), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
  box-shadow: inset 0 0 0 2px rgba(10, 11, 14, .85);
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 50%;
  width: 112px;
  height: 31px;
  border: 2px solid #14161d;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 1px 2px rgba(255, 255, 255, .15), inset 0 1px 3px rgba(255, 255, 255, .06);
  transform: translateX(-50%);
}
.dynamic-island::after {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #191c24;
  box-shadow: 0 0 0 2px #0d0f14;
  content: '';
}

/* TikTok Shop Brand Tag */
.brand {
  position: absolute;
  z-index: 2;
  top: 58px;
  left: 23px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 100px;
  background: rgba(22, 24, 35, .92);
  backdrop-filter: blur(12px);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  font: 800 12px/1.2 'Plus Jakarta Sans', Arial, sans-serif;
  letter-spacing: -.01em;
  animation: appear .65s ease both;
}
.brand::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fe2c55;
  box-shadow: 0 0 0 3px rgba(254, 44, 85, .32), 0 0 8px #fe2c55;
  content: '';
}

/* Product Visual Showcase */
.product-visual {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 360px;
  overflow: hidden;
  background: #111217;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}
.product-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 18, 23, .75) 0%, rgba(22, 24, 35, .25) 35%, rgba(248, 249, 251, .05) 70%, transparent 100%);
  content: '';
}
.product-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 50%;
  transform-origin: 0% 50%;
  filter: saturate(1.05) contrast(1.06);
  animation: photoReveal 1.1s ease both;
}

/* Customer Input Card */
.entry {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 34px 28px 28px;
  border: 1px solid #ebecef;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(22, 24, 35, .08);
  animation: riseIn .65s cubic-bezier(.2, .7, .2, 1) both;
}
.entry-line {
  position: absolute;
  top: 0;
  left: 28px;
  width: 60px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #25f4ee 0%, #fe2c55 100%);
  box-shadow: 0 2px 8px rgba(254, 44, 85, .35);
}

/* Headings */
h1 {
  margin: 0 0 28px;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  line-height: 1.22;
  letter-spacing: -.03em;
}
h1 span {
  display: block;
  color: #161823;
  font-size: 29px;
  font-weight: 800;
}
h1 small {
  display: block;
  margin-top: 6px;
  color: #73747b;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
}

/* Form Controls */
form label {
  display: block;
  margin: 18px 0 8px;
  color: #161823;
  font-size: 13px;
  font-weight: 700;
}
input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #e3e5e8;
  border-radius: 12px;
  outline: none;
  background: #f1f1f2;
  color: #161823;
  font: 500 14px 'Plus Jakarta Sans', Arial, sans-serif;
  transition: border-color .2s, box-shadow .2s, background .2s, transform .2s;
}
input::placeholder { color: #8a8b91; }
input:focus {
  border-color: #fe2c55;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(254, 44, 85, .15);
  transform: translateY(-1px);
}
input[aria-invalid=true] {
  border-color: #fe2c55;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(254, 44, 85, .18);
}
.field-error, .form-error {
  margin: 7px 0 0;
  color: #fe2c55;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.field-error:empty { display: none; }
.form-error { margin: 15px 0 0; }

/* Primary Button - Signature TikTok Shop Red */
#submit-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 54px;
  margin-top: 26px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: none;
  border-radius: 12px;
  background: linear-gradient(95deg, #fe2c55 0%, #ff3b5c 52%, #fe2c55 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(254, 44, 85, .36);
  cursor: pointer;
  font: 800 14px 'Plus Jakarta Sans', Arial, sans-serif;
  letter-spacing: .01em;
  transition: transform .22s, box-shadow .22s, filter .22s;
}
#submit-button::before {
  position: absolute;
  top: 0;
  left: -65%;
  width: 35%;
  height: 100%;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .32), transparent);
  transform: skewX(-20deg);
  animation: sheen 5s ease-in-out infinite;
}
#submit-button span {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: transform .22s;
}
#submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(254, 44, 85, .46);
  filter: brightness(1.06);
}
#submit-button:hover span { transform: translateX(3px); }
#submit-button:active { transform: translateY(0); filter: brightness(.95); }
#submit-button:focus-visible, .close-video:focus-visible, .unmute-video:focus-visible {
  outline: 3px solid rgba(254, 44, 85, .55);
  outline-offset: 3px;
}
#submit-button:disabled { opacity: .65; cursor: wait; transform: none; }

.privacy {
  margin: 17px 0 0;
  color: #8a8b91;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

/* Video Overlay */
.video-panel {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000000;
  animation: videoEnter .28s ease-out both;
}
.video-panel:fullscreen { width: 100vw; height: 100dvh; }
.video-container { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.video-frame { display: block; width: min(100vw, 56.25dvh); height: 100dvh; border: 0; background: #000; }
.close-video {
  position: absolute;
  z-index: 2;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(22, 24, 35, .85);
  color: #ffffff;
  cursor: pointer;
  font: 400 27px/1 Arial, sans-serif;
  backdrop-filter: blur(8px);
}
.unmute-video {
  position: absolute;
  z-index: 2;
  top: max(17px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  background: linear-gradient(95deg, #fe2c55, #ff3b5c);
  color: #ffffff;
  cursor: pointer;
  font: 800 12px 'Plus Jakarta Sans', Arial, sans-serif;
  box-shadow: 0 8px 20px rgba(254, 44, 85, .4);
}
.video-loading { position: absolute; color: #ffffff; font-size: 13px; }
body.video-open { overflow: hidden; }

@keyframes riseIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes appear { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes photoReveal { from { opacity: 0; transform: scale(2.17); } to { opacity: 1; transform: scale(2.05); } }
@keyframes sheen { 0%, 72% { left: -65%; } 90%, 100% { left: 125%; } }
@keyframes videoEnter { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 600px) {
  html, body { width: 100%; min-height: 100%; }
  body { background: #f8f9fb; }
  .phone-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .phone-shell::before, .phone-button, .dynamic-island { display: none; }
  .page {
    width: 100%;
    min-height: 100dvh;
    padding: max(90px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .brand { top: calc(22px + env(safe-area-inset-top)); left: 18px; }
  .product-visual { height: min(47dvh, 370px); }
  .entry { max-width: 420px; margin: auto; }
}
@media (max-width: 360px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .entry { padding-left: 20px; padding-right: 20px; }
  h1 span { font-size: 26px; }
  h1 small { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
