/* ===== COELHO CIENTISTA — REMASTER CSS ===== */
*{box-sizing:border-box;}

.ak-potion-game-box{
  max-width:940px;
  margin:20px auto;
  background:#ffffff;
  border-radius:32px;
  padding:15px;
  text-align:center;
  box-shadow:0 20px 50px rgba(50,35,90,0.15);
  font-family:'Segoe UI',Arial,sans-serif;
}

.ak-potion-game-box h2{
  margin:0 0 6px;
  color:#20205f;
  font-size:34px;
  font-weight:950;
}

.ak-potion-game-box > p{
  margin:0 0 14px;
  color:#5f5878;
  font-weight:800;
}

/* ---- canvas wrap ---- */
.ak-potion-canvas-wrap{
  position:relative;
  width:100%;
  max-width:900px;
  margin:0 auto;
  border-radius:20px;
  overflow:hidden;
}

#akPotionCanvas{
  width:100%;
  max-width:760px;
  height:auto;
  background:#1a3a1a;
  border:3px solid #4a2d8a;
  border-radius:18px;
  display:block;
  margin:0 auto;
  touch-action:none;
  cursor:default;
}

/* ---- HUD overlay ---- */
#akPotionHud{
  position:absolute;
  top:12px;
  left:12px;
  right:12px;
  display:flex;
  gap:8px;
  pointer-events:none;
}

.ak-hud-pill{
  background:rgba(10,5,30,0.78);
  border:1.5px solid rgba(180,140,255,0.4);
  border-radius:999px;
  padding:5px 14px;
  color:#fff;
  font-size:14px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:6px;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.ak-hud-pill .ico{
  font-size:16px;
}

/* ---- start overlay ---- */
#akPotionStartOverlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:rgba(8,4,24,0.72);
  border-radius:16px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  border:none;
  cursor:default;
  z-index:90;
}

#akPotionStartOverlay h1{
  color:#fff;
  font-size:28px;
  font-weight:900;
  margin-bottom:8px;
  text-shadow:0 0 20px #9b6dff;
}

#akPotionStartOverlay p{
  color:#c8b0ff;
  font-size:14px;
  margin-bottom:24px;
  text-align:center;
  max-width:340px;
  line-height:1.6;
}

#akPotionStartOverlay.ak-hide{
  display:none;
}

.ak-potion-start-btn{
  background:linear-gradient(135deg,#7c3dff,#c03dff);
  border:none;
  border-radius:999px;
  padding:14px 36px;
  color:#fff;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 28px rgba(160,80,255,0.5);
  transition:transform .15s;
}

.ak-potion-start-btn:hover{
  transform:scale(1.05);
}

.ak-potion-start-btn.green{
  background:linear-gradient(135deg,#20c768,#0fa850);
  box-shadow:0 8px 28px rgba(32,199,104,0.5);
}

.ak-potion-start-btn.red{
  background:linear-gradient(135deg,#ff3060,#ff6030);
  box-shadow:0 8px 28px rgba(255,50,60,0.5);
}

/* ---- message bar ---- */
#akPotionMessage{
  position:absolute;
  bottom:12px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(10,5,30,0.82);
  border:1.5px solid rgba(180,140,255,0.35);
  border-radius:999px;
  padding:7px 22px;
  color:#a0f0c0;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
  max-width:96%;
  overflow:hidden;
  text-overflow:ellipsis;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  pointer-events:none;
  transition:opacity .3s;
  z-index:60;
}

/* ---- D-pad antigo escondido no celular ---- */
.ak-potion-controls{
  display:grid;
  grid-template-columns:repeat(3,68px);
  justify-content:center;
  gap:6px;
  margin-top:12px;
}

.ak-potion-controls button{
  width:68px;
  height:56px;
  border:1.5px solid rgba(180,140,255,0.4);
  border-radius:14px;
  background:rgba(120,80,220,0.85);
  color:#fff;
  font-size:22px;
  font-weight:950;
  cursor:pointer;
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  transition:background .1s,transform .08s;
}

.ak-potion-controls button:active{
  background:rgba(180,120,255,0.9);
  transform:scale(.95);
}

#akPotionAction{
  background:rgba(20,160,80,0.85) !important;
  border-color:rgba(80,220,140,0.4) !important;
}

#akPotionAction:active{
  background:rgba(30,200,100,0.9) !important;
}

.ak-empty-control{
  visibility:hidden;
}

/* ==================== JOYSTICK MOBILE ==================== */
.ak-virtual-joystick{
  position:absolute !important;
  left:12px !important;
  bottom:12px !important;
  width:56px !important;
  height:56px !important;
  background:rgba(120,80,220,.28) !important;
  border:2px solid rgba(180,140,255,.75) !important;
  border-radius:50% !important;
  z-index:80 !important;
  touch-action:none !important;
  display:none !important;
  box-shadow:0 0 12px rgba(120,80,220,.35);
}

.ak-joystick-knob{
  position:absolute !important;
  top:50% !important;
  left:50% !important;
  width:24px !important;
  height:24px !important;
  background:#fff !important;
  border:2px solid #7040c0 !important;
  border-radius:50% !important;
  transform:translate(-50%,-50%);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

/* ==================== BOTÃO POÇÃO MOBILE ==================== */
#akPotionActionMobile{
  position:absolute !important;
  right:12px !important;
  bottom:14px !important;
  width:46px !important;
  height:46px !important;
  border-radius:50% !important;
  border:2px solid rgba(80,220,140,.85) !important;
  background:rgba(20,160,80,.9) !important;
  display:none !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  z-index:80 !important;
  box-shadow:0 0 10px rgba(0,0,0,.25);
  touch-action:none !important;
}

/* mostra joystick e botão só depois de começar */
.ak-potion-started .ak-virtual-joystick,
.ak-potion-started #akPotionActionMobile{
  display:flex !important;
}

/* ---- poção desenhada ---- */
.ak-flask-css{
  position:relative;
  width:21px;
  height:29px;
  display:block;
  transform:rotate(-14deg);
}

.ak-flask-css:before{
  content:"";
  position:absolute;
  left:8px;
  top:0;
  width:6px;
  height:11px;
  background:#fff;
  border-radius:3px 3px 1px 1px;
}

.ak-flask-css:after{
  content:"";
  position:absolute;
  left:2px;
  bottom:0;
  width:18px;
  height:19px;
  background:linear-gradient(
    to bottom,
    #ffffff 0%,
    #ffffff 45%,
    #b77cff 46%,
    #8f4fff 100%
  );
  clip-path:polygon(35% 0,65% 0,100% 100%,0 100%);
  border-radius:0 0 9px 9px;
}

/* ==================== RESPONSIVO ==================== */
@media(max-width:768px){
  .ak-potion-game-box{
    padding:15px 10px;
    border-radius:24px;
  }

  .ak-potion-game-box h2{
    font-size:26px;
  }

  #akPotionCanvas{
    width:100% !important;
    height:auto !important;
    max-height:68vh;
  }

  .ak-potion-controls{
    display:none !important;
  }

  .ak-hud-pill{
    font-size:12px;
    padding:4px 10px;
  }

  #akPotionMessage{
    font-size:10px;
    padding:5px 10px;
    bottom:10px;
  }
}