/* 🔑 반드시 추가 */
* {
    box-sizing: border-box;
}

/* 공통 레이아웃·테마 */
:root {
    --bg: #f8f9fa;
    --text: #1a1a1a;
    --accent: #c41e3a;
    --accent-hover: #a01830;
    --card-bg: #ffffff;
    --border: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
    margin: 0;
    padding: 16px;
    font-size: 18px;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* 타이포 */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 24px;
    text-align: center;
}

h2, h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px;
}

/* 메인 페이지 - 입력 폼 */
.lotto-form {
    max-width: 100%;
    margin: 0 auto;
}

.lotto-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.lotto-form .hint {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

input[type="number"] {
    width: 100%;
    font-size: 20px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-top: 8px;
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    width: 100%;
    font-size: 18px;
    font-weight: 600;
    padding: 14px 24px;
    margin-top: 24px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--accent-hover);
}

/* 결과 페이지 - 세트·카드 */
.result-set {
    margin-bottom: 32px;
}

.result-set:last-of-type {
    margin-bottom: 0;
}

.result-set h3 {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.game-card:last-child {
    margin-bottom: 0;
}

.game-card .game-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.balls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* 로또 볼 스타일 */
.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.ball--1 { background: linear-gradient(135deg, #f5d76e, #e8b923); }
.ball--2 { background: linear-gradient(135deg, #5dade2, #3498db); }
.ball--3 { background: linear-gradient(135deg, #ec7063, #c0392b); }
.ball--4 { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.ball--5 { background: linear-gradient(135deg, #58d68d, #27ae60); }

/* 다시 뽑기 버튼 */
.btn-back {
    display: block;
    margin: 32px auto 0;
    padding: 14px 32px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--accent);
    color: white;
}
