:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5a623;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --ball-size: 50px;
    --shadow: 0 10px 20px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header .highlight {
    color: var(--primary-color);
}

header p {
    color: #666;
    margin-bottom: 2rem;
}

.lotto-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.ball {
    width: var(--ball-size);
    height: var(--ball-size);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ball.placeholder {
    background: #e0e0e0;
    color: #999;
    box-shadow: none;
    border: 2px dashed #ccc;
}

/* 로또 번호별 색상 (실제 로또 기준) */
.ball.color-1 { background: #fbc400; } /* 1-10 */
.ball.color-2 { background: #69c8f2; } /* 11-20 */
.ball.color-3 { background: #ff7272; } /* 21-30 */
.ball.color-4 { background: #aaa; }    /* 31-40 */
.ball.color-5 { background: #b0d840; } /* 41-45 */

.controls {
    margin-bottom: 2rem;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.primary-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.history {
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.history h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #444;
}

#history-list {
    list-style: none;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.history-balls {
    display: flex;
    gap: 4px;
}

.mini-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
}

.empty-msg {
    color: #999;
    font-style: italic;
    text-align: center;
}
