* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  background: #eef1f6;
  color: #1f2430;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.app {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 상단 잔액 */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(24, 39, 75, 0.08);
}

.balance {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.balance-label {
  font-size: 12px;
  color: #7b8494;
}

.balance-amount {
  font-size: 16px;
  font-weight: 600;
}

.balance-amount b { color: #2b6ef2; }

/* 버튼 공통 */
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { cursor: default; opacity: 0.5; }

.btn-charge {
  background: #2b6ef2;
  color: #fff;
}

/* 상품 */
.packs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pack {
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  border: 2px solid #dfe4ed;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
}

.pack:hover {
  border-color: #2b6ef2;
  box-shadow: 0 3px 10px rgba(43, 110, 242, 0.15);
}

.pack:active { transform: scale(0.98); }

.pack-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2430;
}

.pack-sub {
  font-size: 13px;
  color: #6b7384;
}

.bonus {
  color: #e08a00;
  font-weight: 700;
}

/* 무대 */
.stage {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 2px 6px rgba(24, 39, 75, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.tickets {
  font-size: 14px;
  color: #6b7384;
}

.tickets b {
  color: #2b6ef2;
  font-size: 16px;
}

.score {
  font-size: 64px;
  font-weight: 800;
  color: #2b6ef2;
  line-height: 1.1;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score.pop {
  animation: pop 0.32s ease;
}

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0.4; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

.btn-draw {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  background: #2b6ef2;
  color: #fff;
}

.msg {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  color: #6b7384;
  text-align: center;
}

.msg.ok { color: #1a9e5c; }
.msg.error { color: #d43b3b; }

.rank {
  width: 100%;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #eef1f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-rank {
  width: 100%;
  background: #f4b400;
  color: #3a2c00;
}

.ranking-status {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  color: #6b7384;
  text-align: center;
}

@media (max-width: 360px) {
  .score { font-size: 52px; }
  .pack-title { font-size: 16px; }
}
