/* ============================================
   gacha.zxzx.app — Gacha Confession
   Toy Capsule Gacha Machine
   ============================================ */

:root {
  --gacha-bg: #1a1a2e;
  --gacha-bg-deep: #0f0f1a;
  --gacha-panel: #16213e;
  --gacha-panel-alt: #1e2a4a;
  --gacha-border: #2a3a5c;
  --gacha-border-bright: #3a4a6c;
  --gacha-red: #e63946;
  --gacha-red-dark: #b02a35;
  --gacha-red-bright: #ff4d5a;
  --gacha-gold: #ffd700;
  --gacha-gold-dim: #cc9900;
  --gacha-chrome: #c0c8d0;
  --gacha-chrome-dark: #8090a0;
  --gacha-blue: #4488ff;
  --gacha-cyan: #00ddff;
  --gacha-green: #22ff66;
  --gacha-magenta: #ff44aa;
  --gacha-amber: #ffaa22;
  --gacha-white: #eeeeff;
  --gacha-gray: #667788;
  --gacha-gray-dark: #334455;

  --font-gacha: 'VT323', 'Share Tech Mono', 'Consolas', monospace;
  --font-display: 'Press Start 2P', 'VT323', monospace;
}

/* ============================================
   ZXZX 2026 DESIGN PASS — Capsule machine
   ============================================ */

body {
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,.4), transparent 18%),
    linear-gradient(135deg, #f7d5dc 0%, #e8455f 42%, #2e6f9e 100%);
}

#gacha-app {
  filter: drop-shadow(18px 24px 0 rgba(0,0,0,.18));
}

.gacha-machine,
.machine-body,
.panel {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 0 18px 42px rgba(0,0,0,.2);
}

.capsule,
.capsule-ball {
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.22));
}

.handle,
.gacha-handle {
  transition: transform 150ms ease;
}

.handle:hover,
.gacha-handle:hover {
  transform: rotate(4deg) scale(1.02);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: var(--font-gacha);
  background: var(--gacha-bg);
  color: var(--gacha-white);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: none;
}

/* ── CRT Scanlines ── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
}

/* CRT glow */
.crt-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(230, 57, 70, 0.04) 0%,
    rgba(255, 215, 0, 0.02) 30%,
    transparent 65%
  );
}

/* ── Main Container ── */
#gacha-app {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
  padding: 16px;
}

/* ── Title Bar ── */
.titlebar {
  background: linear-gradient(90deg, #2a0a0e, #4a1a1e, #2a0a0e);
  border: 2px solid var(--gacha-red-dark);
  border-bottom: none;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.titlebar-icon {
  font-size: 14px;
}

.titlebar-text {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--gacha-gold);
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--gacha-gold);
}

.titlebar-controls {
  display: flex;
  gap: 2px;
}

.titlebar-ctrl {
  width: 16px;
  height: 14px;
  background: var(--gacha-gray-dark);
  border: 1px outset #666;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gacha-bg);
  font-weight: bold;
  font-family: var(--font-gacha);
  cursor: default;
  user-select: none;
}

/* ── Menu Bar ── */
.menu-bar {
  background: var(--gacha-panel-alt);
  border-left: 2px solid var(--gacha-red-dark);
  border-right: 2px solid var(--gacha-red-dark);
  padding: 2px 4px;
  display: flex;
  gap: 0;
}

.menu-item {
  font-family: var(--font-gacha);
  font-size: 15px;
  color: var(--gacha-gray);
  padding: 2px 8px;
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.15s;
}

.menu-item:hover {
  background: rgba(230, 57, 70, 0.12);
  color: var(--gacha-red-bright);
}

.menu-item .underline {
  text-decoration: underline;
  color: var(--gacha-gold);
}

/* ── Machine Stage ── */
.gacha-stage {
  background: var(--gacha-panel);
  border-left: 2px solid var(--gacha-red-dark);
  border-right: 2px solid var(--gacha-red-dark);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 460px;
}

/* ── The Machine ── */
.gacha-machine {
  position: relative;
  width: 300px;
  height: 400px;
  margin: 0 auto;
}

/* Glass dome (top) */
.machine-dome {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 180px;
  background: radial-gradient(ellipse at 40% 35%, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.03) 40%, transparent 70%);
  border: 3px solid var(--gacha-chrome);
  border-radius: 50% 50% 10% 10%;
  overflow: hidden;
  box-shadow:
    inset 0 -20px 40px rgba(0,0,0,0.3),
    0 0 15px rgba(192,200,208,0.2);
}

.machine-dome::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 20px;
  width: 40px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  transform: rotate(-20deg);
}

/* Capsules inside dome */
.capsules-container {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  height: 120px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-end;
  gap: 2px;
  padding: 4px;
}

.capsule-inner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  position: relative;
  flex-shrink: 0;
  box-shadow: inset -3px -3px 6px rgba(0,0,0,0.2), inset 2px 2px 4px rgba(255,255,255,0.15);
}

.capsule-inner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  height: 2px;
  background: rgba(0,0,0,0.15);
}

/* Capsule shaking when dial is turning */
.capsules-container.shaking .capsule-inner {
  animation: capsule-shake 0.12s ease-in-out infinite alternate;
}

.capsules-container.shaking .capsule-inner:nth-child(odd) {
  animation-delay: 0.04s;
  animation-duration: 0.1s;
}

.capsules-container.shaking .capsule-inner:nth-child(3n) {
  animation-delay: 0.08s;
  animation-duration: 0.14s;
}

@keyframes capsule-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1.5px, 0.5px) rotate(-1.5deg); }
  50% { transform: translate(1px, -0.5px) rotate(1deg); }
  75% { transform: translate(-0.5px, 1px) rotate(-0.5deg); }
  100% { transform: translate(1.5px, -1px) rotate(1.5deg); }
}

/* Machine body (bottom) */
.machine-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 220px;
  background: linear-gradient(180deg, var(--gacha-red) 0%, var(--gacha-red-dark) 100%);
  border: 3px solid var(--gacha-chrome);
  border-radius: 8px 8px 12px 12px;
  box-shadow:
    inset 4px 0 12px rgba(255,255,255,0.1),
    inset -4px 0 12px rgba(0,0,0,0.2),
    0 4px 20px rgba(0,0,0,0.4);
}

/* Machine label */
.machine-label {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gacha-gold);
  color: #2a0a0e;
  font-family: var(--font-display);
  font-size: 8px;
  padding: 4px 14px;
  border-radius: 3px;
  border: 2px solid var(--gacha-gold-dim);
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 2;
}

/* Coin slot */
.coin-slot {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 24px;
  background: var(--gacha-chrome-dark);
  border: 2px solid var(--gacha-chrome);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.coin-slot-inner {
  width: 28px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
  border: 1px solid #333;
}

/* Chute / dispensing area */
.machine-chute {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 60px;
  background: #0a0a12;
  border: 2px solid var(--gacha-chrome-dark);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.6);
}

.chute-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(180deg, var(--gacha-chrome-dark), #444);
  border-bottom: 1px solid #222;
}

.chute-opening {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 36px;
  background: #050508;
  border-radius: 0 0 6px 6px;
  border: 1px solid #1a1a1a;
}

/* ── Dial Handle ── */
.dial-area {
  position: absolute;
  top: 50%;
  right: -50px;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.dial-area:active {
  cursor: grabbing;
}

.dial-base {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 40% 35%, #e0e8f0, var(--gacha-chrome), var(--gacha-chrome-dark));
  border-radius: 50%;
  border: 3px solid #667;
  box-shadow:
    0 3px 8px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.3);
}

.dial-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%) rotate(0deg);
  transition: none;
}

.dial-grip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 32px;
  background: linear-gradient(180deg, #f0f4f8, var(--gacha-chrome), var(--gacha-chrome-dark));
  border: 2px solid #667;
  border-radius: 14px 14px 6px 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.dial-grip::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.2));
  border-radius: 6px;
}

.dial-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 40% 35%, #aabbcc, #667);
  border-radius: 50%;
  border: 1px solid #556;
}

.dial-area.turning .dial-knob {
  transition: none;
}

/* Dial tick marks */
.dial-ticks {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.dial-tick {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 6px;
  background: rgba(100, 110, 130, 0.5);
  transform-origin: center -30px;
}

/* ── Hint text ── */
.gacha-hint {
  font-family: var(--font-gacha);
  font-size: 18px;
  color: var(--gacha-amber);
  text-align: center;
  margin-top: 16px;
  text-shadow: 0 0 10px var(--gacha-amber);
  animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.gacha-hint.hidden {
  display: none;
}

/* ── Stats Bar ── */
.gacha-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 12px;
  font-family: var(--font-gacha);
  font-size: 14px;
  color: var(--gacha-gray);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  color: var(--gacha-gold);
  font-weight: bold;
  font-size: 16px;
}

/* ── Capsule Drop Animation ── */
.dropping-capsule {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  z-index: 10;
  animation: capsule-drop 1.0s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  box-shadow: inset -4px -4px 8px rgba(0,0,0,0.2), inset 3px 3px 6px rgba(255,255,255,0.15);
}

.dropping-capsule::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 3px;
  right: 3px;
  height: 3px;
  background: rgba(0,0,0,0.15);
}

@keyframes capsule-drop {
  0% { top: 40px; left: 50%; transform: translateX(-50%) scale(0.6) rotate(0deg); opacity: 0; }
  10% { opacity: 1; transform: translateX(-50%) scale(0.7) rotate(5deg); }
  30% { top: 140px; transform: translateX(-50%) scale(0.85) rotate(-8deg); }
  45% { top: 175px; transform: translateX(-50%) scale(0.9) rotate(12deg); }
  50% { top: 170px; transform: translateX(-50%) scale(0.95) rotate(-6deg); }
  60% { top: 200px; transform: translateX(-50%) scale(1) rotate(15deg); }
  72% { top: 340px; transform: translateX(-50%) scale(1) rotate(-10deg); }
  78% { top: 325px; transform: translateX(-50%) scale(1) rotate(8deg); }
  86% { top: 348px; transform: translateX(-50%) scale(1) rotate(-4deg); }
  92% { top: 342px; transform: translateX(-50%) scale(1) rotate(2deg); }
  100% { top: 345px; transform: translateX(-50%) scale(1) rotate(0deg); opacity: 1; }
}

/* ── Dispensed Capsule (clickable) ── */
.dispensed-capsule {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 15;
  box-shadow:
    inset -5px -5px 10px rgba(0,0,0,0.2),
    inset 4px 4px 8px rgba(255,255,255,0.15),
    0 4px 12px rgba(0,0,0,0.3);
  animation: capsule-bounce 0.6s ease-out;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dispensed-capsule::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 5px;
  right: 5px;
  height: 3px;
  background: rgba(0,0,0,0.15);
}

.dispensed-capsule:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow:
    inset -5px -5px 10px rgba(0,0,0,0.2),
    inset 4px 4px 8px rgba(255,255,255,0.15),
    0 6px 20px rgba(255,215,0,0.3);
}

.dispensed-capsule .open-hint {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-gacha);
  font-size: 14px;
  color: var(--gacha-gold);
  white-space: nowrap;
  text-shadow: 0 0 6px var(--gacha-gold);
}

@keyframes capsule-bounce {
  0% { transform: translateX(-50%) translateY(-20px) scale(0.5); }
  30% { transform: translateX(-50%) translateY(8px) scale(1.06) rotate(-4deg); }
  50% { transform: translateX(-50%) translateY(-4px) scale(0.98) rotate(3deg); }
  70% { transform: translateX(-50%) translateY(3px) scale(1.02) rotate(-2deg); }
  85% { transform: translateX(-50%) translateY(-1px) scale(0.99) rotate(1deg); }
  100% { transform: translateX(-50%) translateY(0) scale(1) rotate(0deg); }
}

/* ── Confession Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.confession-modal {
  background: var(--gacha-panel);
  border: 2px solid var(--gacha-gold-dim);
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  padding: 0;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.15),
    0 12px 40px rgba(0,0,0,0.5);
  overflow: hidden;
}

.modal-overlay.active .confession-modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  background: linear-gradient(135deg, var(--gacha-red), var(--gacha-red-dark));
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--gacha-gold);
  letter-spacing: 1px;
  text-shadow: 0 0 8px var(--gacha-gold);
}

.modal-close {
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--gacha-white);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: var(--font-gacha);
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255,255,255,0.15);
}

.modal-body {
  padding: 30px 24px;
  text-align: center;
}

.confession-number {
  font-family: var(--font-gacha);
  font-size: 14px;
  color: var(--gacha-gray);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.confession-text {
  font-family: var(--font-gacha);
  font-size: 22px;
  color: var(--gacha-white);
  line-height: 1.6;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 20px rgba(255,255,255,0.08);
}

.confession-emoji {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
  animation: emoji-float 3s ease-in-out infinite;
}

@keyframes emoji-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.modal-btn {
  font-family: var(--font-gacha);
  font-size: 16px;
  padding: 6px 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  letter-spacing: 1px;
}

.modal-btn-primary {
  background: var(--gacha-gold);
  color: #2a0a0e;
  border: 2px solid var(--gacha-gold-dim);
  font-weight: bold;
}

.modal-btn-primary:hover {
  background: #ffe333;
  box-shadow: 0 0 12px rgba(255,215,0,0.4);
}

.modal-btn-secondary {
  background: transparent;
  color: var(--gacha-gray);
  border: 1px solid var(--gacha-border);
}

.modal-btn-secondary:hover {
  color: var(--gacha-white);
  border-color: var(--gacha-border-bright);
}

/* ── Status Bar ── */
.status-bar {
  background: var(--gacha-panel-alt);
  border-left: 2px solid var(--gacha-red-dark);
  border-right: 2px solid var(--gacha-red-dark);
  border-top: 1px solid var(--gacha-border);
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-gacha);
  font-size: 14px;
  color: var(--gacha-gray);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-bar {
  display: flex;
  gap: 1px;
}

.lang-btn {
  font-family: var(--font-gacha);
  font-size: 13px;
  padding: 2px 5px;
  background: var(--gacha-panel);
  border: 1px solid var(--gacha-border);
  color: var(--gacha-gray);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover {
  color: var(--gacha-red-bright);
  border-color: var(--gacha-red-dark);
}

.lang-btn.active {
  background: var(--gacha-red-dark);
  color: var(--gacha-red-bright);
  border-color: var(--gacha-red);
  text-shadow: 0 0 6px var(--gacha-red);
}

/* ── Footer ── */
.gacha-footer {
  background: var(--gacha-panel-alt);
  border: 2px solid var(--gacha-red-dark);
  border-top: none;
  padding: 8px 10px;
  text-align: center;
  font-family: var(--font-gacha);
  font-size: 13px;
  color: var(--gacha-gray-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--gacha-gray);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--gacha-red-bright);
  text-shadow: 0 0 6px var(--gacha-red);
}

.footer-sep {
  color: var(--gacha-border);
}

/* ── Utilities ── */
.text-red { color: var(--gacha-red); }
.text-green { color: var(--gacha-green); }
.text-amber { color: var(--gacha-amber); }
.text-gold { color: var(--gacha-gold); }
.text-cyan { color: var(--gacha-cyan); }
.text-gray { color: var(--gacha-gray); }
.text-white { color: var(--gacha-white); }

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gacha-panel);
}

::-webkit-scrollbar-thumb {
  background: var(--gacha-border);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gacha-border-bright);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #gacha-app {
    padding: 4px;
  }

  .titlebar-text {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .menu-bar {
    display: none;
  }

  .gacha-stage {
    padding: 12px 8px;
  }

  .gacha-machine {
    width: 260px;
    height: 360px;
  }

  .machine-dome {
    width: 190px;
    height: 155px;
  }

  .machine-body {
    width: 210px;
    height: 195px;
  }

  .capsule-inner {
    width: 22px;
    height: 22px;
  }

  .dial-area {
    right: -40px;
    width: 65px;
    height: 65px;
  }

  .dial-base {
    width: 50px;
    height: 50px;
  }

  .dial-knob {
    width: 65px;
    height: 65px;
  }

  .dial-grip {
    width: 24px;
    height: 28px;
  }

  .dial-ticks {
    width: 60px;
    height: 60px;
  }

  .gacha-hint {
    font-size: 15px;
  }

  .confession-text {
    font-size: 18px;
  }

  .machine-label {
    font-size: 7px;
  }
}

@media (max-width: 400px) {
  .gacha-machine {
    width: 230px;
    height: 330px;
  }

  .gacha-stage {
    min-height: 400px;
    padding: 12px 4px;
  }

  .machine-dome {
    width: 170px;
    height: 140px;
  }

  .machine-body {
    width: 190px;
    height: 180px;
  }

  .dial-area {
    right: -35px;
    width: 55px;
    height: 55px;
  }

  .dial-base {
    width: 42px;
    height: 42px;
  }

  .dial-knob {
    width: 55px;
    height: 55px;
  }

  .dial-grip {
    width: 20px;
    height: 24px;
  }

  .modal-body {
    padding: 20px 16px;
  }

  .confession-text {
    font-size: 16px;
  }

  .gacha-stats {
    gap: 16px;
    font-size: 12px;
  }

  .stat-value {
    font-size: 14px;
  }
}
