@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Poppins:wght@600;700&display=swap");

:root {
  --bg: #f8f9fa;
  --ink: #212529;
  --muted: #6c757d;
  --accent: #007bff;
  --accent-deep: #0056b3;
  --panel: #ffffff;
  --ring: rgba(0, 123, 255, 0.4);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app {
  flex: 1;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.hero {
  text-align: center;
  padding: 48px 24px;
  background-color: var(--panel);
  border-bottom: 1px solid #dee2e6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

.hero h1 {
  font-family: "Poppins", "Arial Black", sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  margin: 0;
  color: var(--accent-deep);
}

.subhead {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.panel {
  background: var(--panel);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid #e9ecef;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.primary {
  appearance: none;
  border: none;
  background-image: linear-gradient(45deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 30px rgba(0, 123, 255, 0.3);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 123, 255, 0.4);
}

.primary:focus-visible {
  outline: 4px solid var(--ring);
  outline-offset: 4px;
}

.meta {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  animation: rise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
  transform: translateY(10px);
}

.line .label {
  font-weight: 700;
  color: var(--muted);
  min-width: 80px;
  font-size: 1rem;
}

.ball {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
  background: linear-gradient(140deg, #4dabf7, #007bff);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bonus {
  background: linear-gradient(140deg, #8ce99a, #51cf66);
}

.divider {
  color: var(--muted);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 4px;
}

.footer {
  text-align: center;
  padding: 24px;
  background-color: var(--panel);
  border-top: 1px solid #dee2e6;
  color: var(--muted);
  margin-top: auto;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .app {
    padding: 32px 18px 48px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .line .label {
    min-width: 100%;
    margin-bottom: 8px;
  }
}