/* Interactive extension demo — shared by the landing pages.
   Everything is namespaced d- / epop to stay clear of page styles. */

.player{cursor:default}
.dscene{position:absolute;inset:0;width:100%;height:100%;display:block}
.dbar[hidden],.dpanel[hidden],.dsubs[hidden],.dhint[hidden],.dprev[hidden]{display:none !important}

/* ---------- fake stream chat ---------- */
.dchat{
  position:absolute;right:14px;top:56px;bottom:24%;width:180px;
  display:flex;flex-direction:column;justify-content:flex-end;gap:6px;
  pointer-events:none;overflow:hidden;
  -webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 22%);
  mask-image:linear-gradient(180deg,transparent 0%,#000 22%);
}
.dchat .msg{
  align-self:flex-start;max-width:100%;
  background:rgba(0,0,0,.42);border-radius:10px;padding:4px 10px;
  font-size:.72rem;line-height:1.35;color:#cfd6dd;
  animation:dmsg .3s ease;
}
.dchat .msg b{font-weight:700}
@keyframes dmsg{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:719px){.dchat{display:none}}

/* ---------- extension popup mock ---------- */
.epop{
  position:absolute;top:14px;right:14px;z-index:7;width:min(270px,78%);
  background:rgba(14,18,23,.94);border:1px solid rgba(255,255,255,.12);
  border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.5);
  color:#eef2f4;font-size:.8rem;line-height:1.45;text-align:left;
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  animation:dmsg .35s ease;
}
.epop.gone{display:none}
.epop-head{display:flex;align-items:center;gap:8px;padding:11px 13px 0}
.epop-head img{width:20px;height:20px;border-radius:5px}
.epop-head b{font-size:.8rem}
.epop-tag{padding:2px 13px 0;color:#93a2ab;font-size:.7rem}
.epop-body{padding:10px 13px 13px;display:flex;flex-direction:column;gap:9px}
.epop-card{
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);
  border-radius:10px;padding:9px 11px;
}
.epop-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.epop-label{font-size:.66rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8fa4ad}
.epop-pill{font-size:.62rem;font-weight:800;letter-spacing:.05em;padding:2px 8px;border-radius:999px;background:#3ddbc0;color:#06221e}
.epop-card p{margin:6px 0 0;color:#b9c6cd;font-size:.75rem}
.epop-micro{color:#7d8f98;font-size:.68rem;margin:0}
.epop select{
  width:100%;margin-top:5px;padding:6px 8px;border-radius:8px;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);
  color:#eef2f4;font:inherit;font-size:.78rem;
}
.epop .gbtn{
  display:flex;align-items:center;justify-content:center;gap:9px;width:100%;
  background:#fff;color:#1f1f1f;border:none;border-radius:999px;
  padding:8px 12px;font:inherit;font-size:.8rem;font-weight:600;cursor:pointer;
}
.epop .gbtn:hover{background:#f2f2f2}
.epop .gbtn svg{width:15px;height:15px;flex:none}
.epop .gbtn[disabled]{opacity:.7;cursor:default}
.epop .startbtn{
  width:100%;border:none;border-radius:999px;padding:9px 12px;cursor:pointer;
  font:inherit;font-size:.82rem;font-weight:700;color:#06221e;
  background:linear-gradient(180deg,#3ddbc0,#17a58c);
}
.epop .startbtn:hover{filter:brightness(1.07)}
.epop .who{display:flex;align-items:center;gap:8px;font-size:.76rem;color:#d9e2e6}
.epop .who i{
  width:20px;height:20px;border-radius:50%;flex:none;
  background:linear-gradient(135deg,#8a63ff,#3ddbc0);
  display:inline-flex;align-items:center;justify-content:center;
  font-style:normal;font-size:.62rem;font-weight:800;color:#fff;
}
.epop .ok{color:#3ddbc0;font-weight:700}
.dspin{
  width:13px;height:13px;border-radius:50%;flex:none;
  border:2px solid rgba(0,0,0,.2);border-top-color:#1f1f1f;
  animation:dspin .7s linear infinite;
}
@keyframes dspin{to{transform:rotate(360deg)}}

/* ---------- subtitle overlay ---------- */
.dsubs{
  position:absolute;z-index:5;transform:translateX(-50%);
  text-align:center;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;
}
.dsubs.dragging{cursor:grabbing}
.dsubs-box{position:relative;padding:2px 10px}
.dsubs .dprev{
  display:block;margin:0 auto 6px;max-width:100%;width:fit-content;
  background:rgba(0,0,0,.42);border-radius:9px;padding:3px 12px;
  color:rgba(255,255,255,.55);font-weight:500;line-height:1.4;
  font-size:.78em;
}
.dsubs .dorig{
  display:block;margin:0 auto 6px;width:fit-content;max-width:100%;
  background:rgba(0,0,0,.5);border-radius:8px;padding:2px 12px;
  color:#c4cfd6;font-size:.72em;line-height:1.45;
}
.dsubs .dtran{
  display:block;margin:0 auto;width:fit-content;max-width:100%;
  background:rgba(0,0,0,.62);border-radius:11px;padding:7px 16px;
  color:#fff;font-weight:600;line-height:1.4;font-size:1em;
  box-shadow:0 4px 18px rgba(0,0,0,.3);
}
.dsubs .dline.fresh{animation:dmsg .4s ease}
.dsubs .dedge{
  position:absolute;top:8%;bottom:8%;right:-7px;width:14px;cursor:ew-resize;
  display:flex;align-items:center;justify-content:center;touch-action:none;
}
.dsubs .dedge::after{
  content:"";width:4px;height:34px;border-radius:99px;
  background:rgba(255,255,255,.35);opacity:0;transition:opacity .15s;
}
.dsubs:hover .dedge::after,.dsubs .dedge.on::after{opacity:1}
.dsubs .dmovehint{
  position:absolute;left:50%;top:-26px;transform:translateX(-50%);
  font-size:.62rem;letter-spacing:.06em;color:rgba(255,255,255,.55);
  background:rgba(0,0,0,.4);border-radius:999px;padding:2px 10px;white-space:nowrap;
  opacity:0;transition:opacity .15s;pointer-events:none;
}
.dsubs:hover .dmovehint{opacity:1}
@media(prefers-reduced-motion:reduce){
  .dchat .msg,.epop,.dsubs .dline.fresh{animation:none}
  .dspin{animation:dspin 1.4s linear infinite}
}

/* ---------- control bar ---------- */
.dbar{
  position:absolute;left:14px;bottom:14px;z-index:6;
  display:flex;align-items:center;gap:7px;
  animation:dmsg .35s ease;
}
.dbar button{
  border:1px solid rgba(255,255,255,.14);border-radius:999px;
  background:rgba(14,18,23,.85);color:#e8eef1;cursor:pointer;
  font:inherit;font-size:.74rem;font-weight:600;padding:6px 13px;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}
.dbar button:hover{background:rgba(30,38,46,.9)}
.dbar button[aria-pressed="true"]{background:#3ddbc0;color:#06221e;border-color:transparent}
.dbar .dtrial{
  font-size:.72rem;font-weight:600;color:#b9c6cd;
  background:rgba(14,18,23,.85);border:1px solid rgba(255,255,255,.14);
  border-radius:999px;padding:6px 12px;
  font-variant-numeric:tabular-nums;
}

/* ---------- settings panel ---------- */
.dpanel{
  position:absolute;left:14px;bottom:56px;z-index:8;width:min(240px,80%);
  background:rgba(14,18,23,.94);border:1px solid rgba(255,255,255,.12);
  border-radius:13px;box-shadow:0 18px 50px rgba(0,0,0,.5);
  color:#eef2f4;padding:12px 14px;text-align:left;font-size:.76rem;
  display:flex;flex-direction:column;gap:10px;
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  animation:dmsg .25s ease;
}
.dpanel label{display:flex;flex-direction:column;gap:5px;color:#b9c6cd;font-size:.68rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.dpanel input[type=range]{width:100%;accent-color:#3ddbc0}
.dpanel select{
  padding:6px 8px;border-radius:8px;background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.14);color:#eef2f4;font:inherit;font-size:.76rem;
}
.dpanel .dcheck{
  flex-direction:row;align-items:center;gap:8px;cursor:pointer;
  text-transform:none;letter-spacing:0;font-size:.76rem;font-weight:600;color:#e8eef1;
}
.dpanel .dcheck input{accent-color:#3ddbc0;width:14px;height:14px}
.dpanel .dtip{margin:0;color:#7d8f98;font-size:.66rem}

/* ---------- one-time hint ---------- */
.dhint{
  position:absolute;left:50%;bottom:26%;transform:translateX(-50%);z-index:6;
  margin:0;background:rgba(0,0,0,.55);color:#dfe7ea;font-size:.72rem;
  border-radius:999px;padding:5px 14px;white-space:nowrap;pointer-events:none;
  animation:dmsg .4s ease;transition:opacity .6s;
}
.dhint.fade{opacity:0}
@media(max-width:560px){
  .dhint{display:none}
  .epop{font-size:.74rem}
  #frisk-demo{aspect-ratio:4/3}
}
.epop{max-height:88%;overflow-y:auto}
