/* The Quintessence Still — machine housing, glass reel tubes, readouts. */

.still {
  container-type: inline-size;
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  outline: none;
}
.still:focus-visible .still-body { box-shadow: 0 0 0 3px var(--glass), var(--shadow); }

/* flask neck carrying the apothecary label */
.still-neck {
  width: min(78%, 420px);
  margin: 0 auto -1px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, #FDFCFE, #EFEBF5);
  border: 1px solid rgba(75,42,123,.18);
  border-bottom: 0;
  border-radius: 48px 48px 0 0;
  position: relative;
}
.still-neck::before {
  content: ""; position: absolute; left: 50%; top: -12px; transform: translateX(-50%);
  width: 64px; height: 14px; border-radius: 6px 6px 3px 3px;
  background: var(--cork); box-shadow: inset 0 -3px 0 var(--cork-deep);
}
.still-label {
  text-align: center;
  background: var(--label);
  border: 1px solid var(--cork-deep);
  border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--label), inset 0 0 0 4px rgba(140,106,78,.45);
  padding: 8px 12px 9px;
  color: var(--violet-deep);
}
.still-label strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.25rem, 5cqi, 1.75rem); line-height: 1.1; }
.still-label span { display: block; font-family: var(--f-label); font-size: .78rem; letter-spacing: .07em; color: var(--cork-deep); }

.still-body {
  background: linear-gradient(180deg, #F9F8FC 0%, #EDE9F4 60%, #E4DFEE 100%);
  border: 1px solid rgba(75,42,123,.18);
  border-radius: 38px;
  box-shadow: var(--shadow), 0 30px 60px -38px rgba(47,26,82,.7);
  padding: clamp(14px, 3.4cqi, 24px);
  position: relative;
}
.still-body::before, .still-body::after {
  content: ""; position: absolute; top: 34px; bottom: 34px; width: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--glass-line) 20%, rgba(169,220,215,.2) 85%, transparent);
}
.still-body::before { left: 9px; }
.still-body::after { right: 9px; opacity: .5; }

.still-window {
  position: relative;
  padding: clamp(10px, 2.2cqi, 16px);
  border-radius: 28px;
  background: linear-gradient(180deg, #DCD5E9, #E8E3F0);
  box-shadow: inset 0 2px 10px rgba(47,26,82,.18), inset 0 0 0 1px rgba(75,42,123,.14);
}
.still-reels {
  --cell: clamp(46px, calc((100cqi - 110px) / 5), 104px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 1.6cqi, 12px);
}
.still-reel {
  position: relative;
  height: calc(var(--cell) * 3);
  overflow: hidden;
  border-radius: calc(var(--cell) / 2.2);
  background: linear-gradient(90deg, #FFFFFF 0%, #F6F3FA 22%, #EDE8F4 70%, #E2DCEC 100%);
  box-shadow: inset 0 0 0 1px rgba(75,42,123,.16), 0 6px 14px -10px rgba(47,26,82,.6);
}
/* vapour fade at top and bottom of each tube */
.still-reel::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(233,230,239,.85), rgba(233,230,239,0) 18%, rgba(233,230,239,0) 82%, rgba(220,215,230,.85));
}
/* glass highlight line running down the tube */
.still-reel::after {
  content: ""; position: absolute; z-index: 3; pointer-events: none;
  left: 14%; top: 14%; bottom: 14%; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.95) 20%, var(--glass-line) 60%, transparent);
}
.still-strip { will-change: transform; }
.still-reel.is-spinning .still-strip { filter: blur(1.1px); }
.still-cell {
  height: var(--cell);
  display: grid; place-items: center;
  padding: 13%;
  position: relative;
}
.still-cell svg { width: 100%; height: 100%; }
.still-cell.is-lit::before {
  content: ""; position: absolute; inset: 7%; border-radius: 40%;
  background: rgba(127,200,194,.26);
  box-shadow: inset 0 0 0 2px var(--glass), 0 0 14px rgba(127,200,194,.7);
}
.still-cell.is-lit svg { position: relative; animation: still-bob 1.4s ease-in-out infinite; }
@keyframes still-bob { 50% { transform: translateY(-3px) scale(1.04); } }

/* win callout */
.still-callout {
  position: absolute; left: 50%; top: 50%; z-index: 6;
  transform: translate(-50%, -50%) scale(.85);
  opacity: 0; pointer-events: none;
  text-align: center; white-space: nowrap;
  padding: 10px 26px 12px;
  border-radius: 999px;
  background: rgba(252,251,254,.94);
  border: 1px solid var(--glass);
  box-shadow: 0 0 0 5px rgba(127,200,194,.22), 0 16px 34px -16px rgba(47,26,82,.7);
  color: var(--violet-deep);
  transition: opacity .3s ease, transform .4s cubic-bezier(.2,.9,.3,1.3);
}
.still-callout.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.still-callout-kicker { display: block; font-family: var(--f-label); font-size: .82rem; letter-spacing: .08em; color: var(--glass-deep); }
.still-callout strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 6cqi, 2.1rem); line-height: 1.1; }
.still-callout.is-jackpot {
  background: var(--violet-deep); color: #fff; border-color: var(--glass-line);
  box-shadow: 0 0 0 6px rgba(127,200,194,.35), 0 0 34px rgba(127,200,194,.6), 0 20px 40px -18px rgba(47,26,82,.9);
  padding: 14px 32px 16px;
}
.still-callout.is-jackpot strong { color: #fff; font-size: clamp(1.7rem, 7.5cqi, 2.7rem); }
.still-callout.is-jackpot .still-callout-kicker { color: var(--glass-line); }

/* vapour swirl flourish on a win */
.still-vapor { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: visible; }
.still-vapor path { fill: none; stroke-linecap: round; opacity: 0; stroke-dasharray: 260; stroke-dashoffset: 260; }
.still-vapor path:nth-child(1) { stroke: var(--glass); stroke-width: 2.2; }
.still-vapor path:nth-child(2) { stroke: #9A86C0; stroke-width: 1.6; }
.still-vapor path:nth-child(3) { stroke: var(--glass-line); stroke-width: 2; }
.still-vapor.is-rising path { animation: still-wisp 2.2s ease-out forwards; }
.still-vapor.is-rising path:nth-child(2) { animation-delay: .18s; }
.still-vapor.is-rising path:nth-child(3) { animation-delay: .34s; }
@keyframes still-wisp {
  0% { opacity: 0; stroke-dashoffset: 260; transform: translateY(24px); }
  25% { opacity: .95; }
  70% { opacity: .7; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: -60; transform: translateY(-36px); }
}

/* readouts */
.still-readouts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin: 16px 0 12px;
}
.readout {
  text-align: center;
  background: rgba(252,251,254,.8);
  border: 1px solid rgba(75,42,123,.12);
  border-radius: 18px;
  padding: 8px 6px 10px;
}
.readout span { display: block; font-family: var(--f-label); font-size: .8rem; letter-spacing: .07em; color: var(--ink-soft); }
.readout b {
  position: relative; isolation: isolate;
  display: grid; place-items: center; min-height: 52px; padding-top: 10px;
  font-family: var(--f-body); font-weight: 600; font-size: clamp(1.15rem, 4.6cqi, 1.55rem); line-height: 1;
  color: var(--violet-deep); font-variant-numeric: tabular-nums;
}
.readout b::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("/et-assets/img/vial.svg") center / auto 100% no-repeat;
  filter: drop-shadow(0 0 8px rgba(127,200,194,.5));
  opacity: .8;
}
.readout-balance { border-color: rgba(46,124,118,.35); }

/* controls */
.still-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.bet-step { display: inline-flex; align-items: center; gap: 6px; background: rgba(252,251,254,.85); border: 1px solid rgba(75,42,123,.16); border-radius: 999px; padding: 5px; }
.bet-step button, .still-reset {
  font: 600 .95rem var(--f-body); color: var(--violet-deep); cursor: pointer;
  background: var(--pane-hi); border: 1px solid rgba(75,42,123,.2); border-radius: 999px;
}
.bet-step button { width: 40px; height: 40px; font-size: 1.25rem; line-height: 1; }
.bet-step small { font-family: var(--f-label); font-size: .82rem; color: var(--ink-soft); padding: 0 4px; letter-spacing: .04em; }
.still-reset { padding: 12px 16px; }
.bet-step button:hover:not(:disabled), .still-reset:hover:not(:disabled) { border-color: var(--glass-deep); }
.still-spin {
  font: 600 1.12rem var(--f-body); letter-spacing: .02em; cursor: pointer;
  color: #fff; border: 0; border-radius: 999px; padding: 15px 20px;
  background: var(--violet);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 4px rgba(127,200,194,.28), 0 14px 26px -16px rgba(47,26,82,1);
  transition: background .2s ease, transform .1s ease;
}
.still-spin:hover:not(:disabled) { background: var(--violet-deep); }
.still-spin:active:not(:disabled) { transform: translateY(1px); }
.still button:disabled { opacity: .45; cursor: not-allowed; }
.still.is-short .still-spin { background: #8D84A0; box-shadow: none; }

.still-msg {
  min-height: 2.9em; margin: 12px 0 0; text-align: center; font-size: .94rem; color: var(--ink-soft);
}
.still-msg.is-win { color: var(--glass-deep); font-weight: 600; }
.still-msg.is-warn { color: #7A3553; font-weight: 600; }
.still-free {
  margin: 4px 0 0; text-align: center; font-family: var(--f-label); font-size: .82rem; letter-spacing: .06em; color: var(--cork-deep);
}

@container (max-width: 470px) {
  .still-controls { grid-template-columns: 1fr 1fr; }
  .still-spin { grid-column: 1 / -1; order: -1; }
  .bet-step { justify-content: space-between; }
  .still-callout { padding: 8px 18px 10px; }
  .still-cell { padding: 7%; }
  .still-callout.is-jackpot { padding: 10px 18px 12px; white-space: normal; width: 86%; }
}
