@font-face {
  font-family: "you2013";
  src:
    local("You2013"),
    local("You2013 Regular"),
    url("./You2013 Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root{
  --bg:#000;
  --panel:#171a20;
  --text:#ecf0f6;
  --muted:#a4adbc;
  --accent:#e31b23;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;color:var(--text);background:var(--bg)}
.display-body{overflow:hidden;background:#000}
#stage{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background:#000;
  overflow:hidden;
}
.beauty-video,
#threeCanvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}
.beauty-video{
  z-index:0;
  object-fit:fill;
  background:#000;
}

.idle-video{z-index:0;object-fit:fill;background:#000}
#threeCanvas.hidden,.beauty-video.hidden{display:none !important}
#threeCanvas{
  z-index:1;
  pointer-events:none;
  background:transparent !important;
}
.overlay{
  position:fixed;
  z-index:10;
  background:rgba(16,18,24,.78);
  border:1px solid rgba(255,255,255,.15);
  border-radius:12px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  padding:12px 14px;
}
.ui-top-left{top:16px;left:16px}
.ui-bottom-left{bottom:16px;left:16px;display:flex;gap:8px}
.badge{display:inline-block;font-size:12px;letter-spacing:.12em;color:#c8d0df;margin-bottom:8px}
.name-readout{font-size:16px}
.load-status{margin-top:8px;max-width:360px;font-size:12px;line-height:1.35;color:#c8d0df}
.load-status.ok{color:#9ee6ad}
.load-status.warn{color:#ffd58a}
.load-status.error{color:#ff9c9c}
.debug-panel{right:16px;top:16px;min-width:240px;line-height:1.5}
.debug-buttons{display:flex;gap:8px;margin-top:8px}
.hidden{display:none !important}
button{
  cursor:pointer;border:0;border-radius:10px;padding:10px 14px;
  background:var(--accent);color:#fff;font-weight:700
}
button.secondary{background:#2c3440}

.input-body{
  min-height:100vh;display:grid;place-items:center;
  background:radial-gradient(circle at top,rgba(227,27,35,.18),transparent 40%),
             linear-gradient(180deg,#10131a 0%,#0d1016 100%)
}
.input-shell{width:min(92vw,520px)}
.card{
  background:rgba(23,26,32,.92);border:1px solid rgba(255,255,255,.1);
  border-radius:20px;padding:28px;box-shadow:0 24px 60px rgba(0,0,0,.35)
}
.eyebrow{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#c9d2e3;margin-bottom:8px}
h1{margin:0 0 8px;font-size:34px;line-height:1.08}
.sub{margin:0 0 22px;color:var(--muted);line-height:1.5}
label{display:block;font-weight:700;margin:0 0 8px}
input{
  width:100%;background:#0f131a;color:#fff;border:1px solid rgba(255,255,255,.14);
  border-radius:12px;padding:14px 16px;font-size:20px
}
.hint{font-size:12px;color:var(--muted);margin-top:8px}
.button-row{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
.preview-wrap{
  margin-top:22px;padding:16px;border-radius:14px;background:#0f131a;
  border:1px solid rgba(255,255,255,.08)
}
.preview-label{font-size:12px;color:var(--muted);margin-bottom:10px}
.name-preview{
  font-size:44px;line-height:1.1;color:#fff;
  -webkit-text-stroke:2px #b7bcc4;
  text-shadow:0 0 0 #b7bcc4,0 1px 0 rgba(255,255,255,.25)
}
.status{margin-top:18px;color:#d4d9e2;font-size:14px}

.slider-group{margin-top:12px}
.slider-group label{display:block;font-size:12px;color:#c8d0df;margin:0 0 6px;font-weight:700}
.debug-slider{width:100%;accent-color:var(--accent);padding:0;border:0;background:transparent}
.debug-slider::-webkit-slider-runnable-track{height:6px;border-radius:999px;background:rgba(255,255,255,.16)}
.debug-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-5px;width:16px;height:16px;border-radius:50%;background:#fff;border:2px solid var(--accent)}
.debug-slider::-moz-range-track{height:6px;border-radius:999px;background:rgba(255,255,255,.16)}
.debug-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:2px solid var(--accent)}

.preset-buttons{grid-template-columns:repeat(1,minmax(0,1fr));gap:8px}
button.is-active{box-shadow:0 0 0 2px rgba(255,255,255,.95) inset, 0 0 0 1px rgba(0,0,0,.35);background:#ff3030}


/* -------------------------------------------------------------------------
   V20 Coca-Cola themed name-entry page
   ------------------------------------------------------------------------- */
.coke-input-page{
  min-height:100vh;
  overflow-x:hidden;
  background:#e41e2b;
  color:#fff;
}

.coke-input-page::before{
  content:"";
  position:fixed;
  inset:-25vh -15vw auto;
  height:66vh;
  pointer-events:none;
  background:
    radial-gradient(circle at 72% 28%,rgba(255,255,255,.24),transparent 18%),
    radial-gradient(circle at 18% 52%,rgba(120,0,8,.34),transparent 30%),
    linear-gradient(118deg,#b80718 0%,#ed1c2e 48%,#ff4c55 100%);
  transform:skewY(-5deg);
}

.coke-input-shell{
  position:relative;
  z-index:1;
  width:min(1180px,94vw);
  min-height:min(760px,92vh);
  margin:4vh auto;
  display:grid;
  grid-template-columns:minmax(360px,.95fr) minmax(420px,1.05fr);
  overflow:hidden;
  border-radius:34px;
  background:#fff;
  box-shadow:0 36px 90px rgba(92,0,8,.38);
}

.coke-product-panel{
  position:relative;
  min-height:720px;
  padding:34px;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 50% 42%,rgba(255,255,255,.18),transparent 35%),
    linear-gradient(145deg,#77000c,#d4081c 45%,#f52b39 100%);
}

.coke-product-panel::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  opacity:.2;
  background-image:
    radial-gradient(circle at 20% 18%,#fff 0 1.5px,transparent 2px),
    radial-gradient(circle at 74% 26%,#fff 0 1px,transparent 1.7px),
    radial-gradient(circle at 65% 78%,#fff 0 1.4px,transparent 2px);
  background-size:70px 78px,90px 88px,84px 92px;
}

.coke-brand-lockup{
  position:relative;
  z-index:3;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1;
  text-shadow:0 3px 18px rgba(86,0,6,.25);
}

.coke-brand-small{
  margin:0 0 5px 5px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.24em;
}

.coke-brand-main{
  font-family:"Brush Script MT","Segoe Script",cursive;
  font-size:54px;
  font-weight:700;
  letter-spacing:-.045em;
}

.coke-can-visual{
  position:absolute;
  z-index:1;
  width:min(82%,440px);
  height:76%;
  left:50%;
  bottom:4%;
  transform:translateX(-50%);
  object-fit:cover;
  object-position:center 48%;
  border-radius:28px;
  box-shadow:0 26px 58px rgba(58,0,5,.42);
  border:1px solid rgba(255,255,255,.42);
}

.coke-ribbon{
  position:absolute;
  z-index:2;
  left:-15%;
  right:-20%;
  bottom:-6%;
  height:28%;
  border-radius:50% 48% 0 0 / 60% 58% 0 0;
  background:#fff;
  transform:rotate(-7deg);
  box-shadow:0 -14px 44px rgba(121,0,9,.13);
}

.coke-form-panel{
  position:relative;
  display:grid;
  place-items:center;
  padding:58px clamp(34px,5vw,76px);
  color:#211b1b;
  background:
    radial-gradient(circle at 92% 9%,rgba(228,30,43,.11),transparent 25%),
    #fff;
}

.coke-form-panel::after{
  content:"";
  position:absolute;
  width:290px;
  height:290px;
  right:-175px;
  bottom:-155px;
  border:36px solid rgba(228,30,43,.08);
  border-radius:50%;
}

.coke-form-content{
  position:relative;
  z-index:1;
  width:100%;
  max-width:510px;
}

.coke-kicker{
  margin-bottom:12px;
  color:#e41e2b;
  font-size:13px;
  font-weight:900;
  letter-spacing:.22em;
}

.coke-form-content h1{
  margin:0 0 38px;
  color:#211b1b;
  font-size:clamp(42px,5vw,68px);
  line-height:.96;
  letter-spacing:-.055em;
}

.coke-input-label{
  display:block;
  margin:0 0 10px;
  color:#4c4242;
  font-size:14px;
  font-weight:800;
}

.coke-form-panel input{
  width:100%;
  height:66px;
  padding:0 20px;
  border:2px solid #e8dddd;
  border-radius:16px;
  outline:none;
  background:#fff;
  color:#261f1f;
  font-size:24px;
  font-weight:700;
  transition:border-color .18s ease,box-shadow .18s ease;
}

.coke-form-panel input:focus{
  border-color:#e41e2b;
  box-shadow:0 0 0 5px rgba(228,30,43,.12);
}

.coke-button-row{
  display:grid;
  grid-template-columns:1.25fr .85fr;
  gap:12px;
  margin-top:16px;
}

.coke-primary-button,
.coke-display-button{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  padding:13px 18px;
  text-align:center;
  text-decoration:none;
  font-size:15px;
  font-weight:900;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}

.coke-primary-button{
  background:#e41e2b;
  color:#fff;
  box-shadow:0 12px 24px rgba(228,30,43,.28);
}

.coke-display-button{
  border:2px solid #e41e2b;
  background:#fff;
  color:#e41e2b;
}

.coke-primary-button:hover,
.coke-display-button:hover{
  transform:translateY(-1px);
}

.coke-preview-card{
  position:relative;
  min-height:178px;
  margin-top:32px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:22px;
  background:
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.21),transparent 28%),
    linear-gradient(140deg,#b70718 0%,#e41e2b 62%,#ff4b54 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22),0 18px 40px rgba(117,0,9,.17);
}

.coke-preview-card::before{
  content:"";
  position:absolute;
  inset:auto -12% -58% -12%;
  height:92%;
  border-radius:50% 50% 0 0;
  background:#fff;
  transform:rotate(-5deg);
  opacity:.13;
}

.coke-name-preview{
  --preview-font-size:78px;
  --preview-stroke:4.6px;
  position:relative;
  z-index:1;
  max-width:94%;
  padding:10px 20px 18px;
  overflow:hidden;
  white-space:nowrap;
  font-family:"you2013","Arial Black",Arial,sans-serif;
  font-size:var(--preview-font-size);
  font-weight:400;
  line-height:1;
  color:#fff;
  -webkit-text-stroke:var(--preview-stroke) #bfc4cb;
  paint-order:stroke fill;
  text-shadow:
    0 2px 1px rgba(255,255,255,.28),
    0 6px 14px rgba(72,0,5,.22);
}

.coke-status{
  min-height:25px;
  margin-top:15px;
  color:#3c7b49;
  font-size:14px;
  font-weight:800;
}

.coke-status.is-error{color:#c81223}

@media (max-width:850px){
  .coke-input-shell{
    width:min(94vw,620px);
    margin:3vh auto;
    grid-template-columns:1fr;
  }
  .coke-product-panel{min-height:360px;padding:24px}
  .coke-brand-main{font-size:43px}
  .coke-can-visual{
    width:48%;
    min-width:220px;
    height:84%;
    bottom:-23%;
  }
  .coke-ribbon{height:34%;bottom:-17%}
  .coke-form-panel{padding:46px 28px 36px}
  .coke-form-content h1{margin-bottom:28px}
}

@media (max-width:520px){
  .coke-product-panel{min-height:280px}
  .coke-can-visual{width:58%;min-width:200px;bottom:-35%}
  .coke-button-row{grid-template-columns:1fr}
  .coke-preview-card{min-height:148px}
  .coke-name-preview{max-width:100%}
}

/* -------------------------------------------------------------------------
   V22 landing-page refinements
   ------------------------------------------------------------------------- */
.coke-brand-logo{
  display:block;
  width:min(245px,72%);
  height:auto;
  filter:brightness(0) invert(1);
  transform:translateZ(0);
}

.coke-can-stage{
  position:absolute;
  z-index:1;
  width:min(76%,405px);
  aspect-ratio:9 / 16;
  left:50%;
  bottom:3.5%;
  transform:translateX(-50%);
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 26px 58px rgba(58,0,5,.42);
  border:1px solid rgba(255,255,255,.42);
  container-type:inline-size;
}

.coke-can-stage .coke-can-visual{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  min-width:0;
  transform:none;
  object-fit:cover;
  object-position:center;
  border:0;
  border-radius:0;
  box-shadow:none;
}

.coke-can-name-canvas{
  position:absolute;
  inset:0;
  z-index:3;
  width:100%;
  height:100%;
  pointer-events:none;
}

.coke-input-help{
  margin:9px 2px 0;
  color:#756b6b;
  font-size:13px;
  font-weight:650;
}

.coke-button-row{
  margin-top:22px;
}

@media (max-width:850px){
  .coke-brand-logo{width:min(210px,60%)}
  .coke-can-stage{
    width:min(44%,250px);
    bottom:-25%;
  }
}

@media (max-width:520px){
  .coke-brand-logo{width:min(185px,66%)}
  .coke-can-stage{
    width:min(52%,215px);
    bottom:-38%;
  }
}

/* V27 synchronized technical control videos. */
.control-video{
  position:absolute;
  width:1px;
  height:1px;
  left:-10000px;
  top:-10000px;
  opacity:0;
  pointer-events:none;
}


/* -------------------------------------------------------------------------
   V41 local-network QR idle state
   ------------------------------------------------------------------------- */
.idle-qr-panel{
  position:fixed;
  z-index:8;
  right:28px;
  bottom:28px;
  width:250px;
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.96);
  color:#111;
  text-align:center;
  box-shadow:0 16px 42px rgba(0,0,0,.28);
  border:1px solid rgba(0,0,0,.08);
}
.idle-qr-kicker{
  color:#d9152a;
  font-size:12px;
  font-weight:800;
  letter-spacing:.18em;
  margin-bottom:6px;
}
.idle-qr-title{
  font-size:20px;
  line-height:1.15;
  font-weight:800;
  margin-bottom:14px;
}
.idle-qr-code-wrap{
  width:190px;
  height:190px;
  margin:0 auto 10px;
  display:grid;
  place-items:center;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
}
.idle-qr-image{
  width:190px;
  height:190px;
  display:block;
}
.idle-qr-status{
  font-size:13px;
  font-weight:700;
}
.idle-qr-url{
  margin-top:5px;
  font-size:10px;
  line-height:1.25;
  overflow-wrap:anywhere;
  color:#555;
}
@media (max-width:700px){
  .idle-qr-panel{right:14px;bottom:14px;width:210px;padding:14px}
  .idle-qr-code-wrap,.idle-qr-image{width:155px;height:155px}
  .idle-qr-title{font-size:17px}
}
