* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 0 0 60px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  background-attachment: fixed;
  color: #fff;
  line-height: 1.7;
}

/* ===== 헤더 & 내비게이션 ===== */
.site-header {
  width: 100%;
  padding: 18px 24px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fbc400;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ===== 공통 카드 ===== */
.container {
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 520px;
  width: 90%;
}

.content {
  text-align: left;
  max-width: 760px;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.content h2 {
  font-size: 1.4rem;
  margin: 28px 0 12px;
  color: #fbc400;
}

.content h2:first-of-type {
  margin-top: 12px;
}

.content h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
}

.content p,
.content li {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.content ul,
.content ol {
  padding-left: 24px;
  margin: 8px 0 16px;
}

.content li {
  margin-bottom: 6px;
}

.content a {
  color: #69c8f2;
}

.content strong {
  color: #fff;
}

p.subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* ===== 로또 볼 ===== */
.balls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  min-height: 56px;
  flex-wrap: wrap;
}

.ball {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.2),
              0 4px 8px rgba(0, 0, 0, 0.3);
  animation: pop 0.4s ease backwards;
}

.ball:nth-child(1) { animation-delay: 0s; }
.ball:nth-child(2) { animation-delay: 0.1s; }
.ball:nth-child(3) { animation-delay: 0.2s; }
.ball:nth-child(4) { animation-delay: 0.3s; }
.ball:nth-child(5) { animation-delay: 0.4s; }
.ball:nth-child(6) { animation-delay: 0.5s; }

@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* 공식 로또 색상: 1-10 노랑, 11-20 파랑, 21-30 빨강, 31-40 회색, 41-45 초록 */
.yellow { background: #fbc400; }
.blue   { background: #69c8f2; }
.red    { background: #ff7272; color: #fff; }
.gray   { background: #aaa; color: #fff; }
.green  { background: #b0d840; }

button {
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  background: #fbc400;
  color: #333;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.placeholder {
  color: rgba(255, 255, 255, 0.5);
  align-self: center;
  font-size: 0.95rem;
}

/* ===== 동물상 테스트 ===== */
.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-area:hover {
  border-color: #fbc400;
  background: rgba(255, 255, 255, 0.05);
}

.upload-area img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
}

.upload-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

#file-input {
  display: none;
}

.status {
  min-height: 24px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.result-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bar-label {
  width: 76px;
  text-align: right;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #fbc400;
  border-radius: 11px;
  width: 0;
  transition: width 0.6s ease;
}

.bar-fill.top {
  background: #b0d840;
}

.bar-pct {
  width: 52px;
  text-align: left;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

/* ===== FAQ ===== */
details {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}

details p {
  margin-top: 10px;
}

/* ===== 푸터 ===== */
.site-footer {
  width: 100%;
  max-width: 760px;
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
}

.site-footer nav {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fbc400;
}
