/* Scoped styles for Magic Question Ball plugin — keep them in magic-ball.css */
/* All selectors are scoped under #magic-ball-app to avoid theme collisions */

#magic-ball-app { --bg: #0f1724; --card: #0b1220; --accent: #64b5ff; --muted: #98a2b3; --glass: rgba(255,255,255,0.04); display:block; font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color:#e6eef8; padding:32px; box-sizing:border-box; }
#magic-ball-app *{ box-sizing:border-box; }

/* container */
#magic-ball-app .container{
  width:100%;
  max-width:920px;
  display:grid;
  gap:20px;
  grid-template-columns: 420px 1fr;
  align-items:start;
  margin: 0 auto;
}

/* Left: the ball and controls */
#magic-ball-app .panel{
  background: linear-gradient(180deg,var(--card), #071026 140%);
  border-radius:18px;
  padding:22px;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6);
  border: 1px solid rgba(255,255,255,0.03);
}

#magic-ball-app .title{ font-size:20px; font-weight:600; margin-bottom:8px; letter-spacing:0.2px}
#magic-ball-app .subtitle{ color:var(--muted); font-size:13px; margin-bottom:18px}

#magic-ball-app .ball-wrap{ display:flex; align-items:center; justify-content:center; margin:12px 0 18px; }

#magic-ball-app .ball{
  width:240px; height:240px; border-radius:50%;
  background: radial-gradient(circle at 35% 30%, #1b2c50 0%, #021029 45%, #000 100%);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 30px 50px rgba(2,6,23,0.6), inset 0 -10px 30px rgba(0,0,0,0.6);
  position:relative;
  transform-origin:center;
}

#magic-ball-app .triangle{
  width:0; height:0;
  border-left:58px solid transparent;
  border-right:58px solid transparent;
  border-bottom:100px solid #051832;
  transform: translateY(10px) rotate(0deg);
  display:flex; align-items:center; justify-content:center;
  position:relative;
}

#magic-ball-app .triangle .answer{
  position:absolute;
  top:10px; left:50%; transform:translateX(-50%);
  width:110px; height:80px;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  font-weight:700; font-size:12px;
  color:#e6eef8;
  line-height:1.1;
  padding:8px;
}

/* Shake animation */
#magic-ball-app .shaking{
  animation: shake 700ms cubic-bezier(.36,.07,.19,.97);
}
@keyframes shake{
  0%{ transform: rotate(0deg) translateX(0); }
  20%{ transform: rotate(-8deg) translateX(-6px); }
  40%{ transform: rotate(8deg) translateX(6px); }
  60%{ transform: rotate(-6deg) translateX(-4px); }
  80%{ transform: rotate(6deg) translateX(3px); }
  100%{ transform: rotate(0deg) translateX(0); }
}

#magic-ball-app .controls{ display:flex; gap:8px; margin-top:6px; }
#magic-ball-app .input{
  flex:1;
  background:var(--glass);
  border:1px solid rgba(255,255,255,0.04);
  color:inherit;
  padding:10px 12px;
  border-radius:10px;
  font-size:14px;
  outline:none;
}
#magic-ball-app .btn{
  background:linear-gradient(180deg,var(--accent), #2b95e8);
  border:none;
  padding:10px 14px;
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
  color:#042433;
  box-shadow: 0 6px 18px rgba(44,149,232,0.18);
}
#magic-ball-app .btn:active{ transform:translateY(1px) }

#magic-ball-app .panel-right{ padding:22px; border-radius:18px; background:linear-gradient(180deg,#071026, #041122); box-shadow: 0 8px 30px rgba(2,6,23,0.6); border:1px solid rgba(255,255,255,0.03) }

#magic-ball-app .section-title{ font-weight:700; font-size:13px; margin-bottom:10px; color:#d7e9ff }

#magic-ball-app .history{
  max-height:360px; overflow:auto; padding:8px; display:flex; flex-direction:column; gap:8px;
}
#magic-ball-app .history .item{
  background: rgba(255,255,255,0.02);
  border-radius:10px; padding:10px; font-size:13px;
  display:flex; justify-content:space-between; gap:10px; align-items:center;
}
#magic-ball-app .answer-text{ font-weight:700; color:var(--accent) }

#magic-ball-app .small{ font-size:12px; color:var(--muted)}
#magic-ball-app .row{ display:flex; gap:8px; align-items:center }

#magic-ball-app .actions{ margin-top:12px; display:flex; gap:8px; flex-wrap:wrap }
#magic-ball-app .linklike{ background:transparent; border:1px dashed rgba(255,255,255,0.03); padding:8px 10px; border-radius:8px; color:var(--muted); font-size:13px; cursor:pointer }

#magic-ball-app footer.small{ color:var(--muted); margin-top:10px; font-size:12px; }

/* Responsive */
@media (max-width:880px){
  #magic-ball-app .container{ grid-template-columns: 1fr; padding:10px }
  #magic-ball-app .ball{ width:200px; height:200px }
}
