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

:root {
    --bg-color: #f4f7f6;
    --text-color: #333;
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --danger-color: #e74c3c;
    --ball-size: 50px;
    
    /* Lotto Ball Colors */
    --color-1-10: #fbc400; /* Yellow */
    --color-11-20: #69c8f2; /* Blue */
    --color-21-30: #ff7272; /* Red */
    --color-31-40: #aaaaaa; /* Gray */
    --color-41-45: #b0d840; /* Green */
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

header h1 {
    margin: 0 0 10px;
    color: var(--primary-color);
}

header p {
    color: #666;
    margin-bottom: 30px;
}

.ball-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    min-height: 60px;
}

.ball, .placeholder-ball {
    width: var(--ball-size);
    height: var(--ball-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    box-shadow: inset -3px -3px 5px rgba(0,0,0,0.2), 2px 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ball:hover {
    transform: scale(1.1);
}

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

/* Ball color ranges */
.ball.range-10 { background-color: var(--color-1-10); }
.ball.range-20 { background-color: var(--color-11-20); }
.ball.range-30 { background-color: var(--color-21-30); }
.ball.range-40 { background-color: var(--color-31-40); }
.ball.range-45 { background-color: var(--color-41-45); }

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.generate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.generate-btn:hover {
    background-color: #357abd;
}

.history-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.history-section h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

#history-list {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.history-item {
    background: #f1f1f1;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    gap: 5px;
    animation: fadeIn 0.5s ease;
}

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

.clear-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.8rem;
}

.clear-btn:hover {
    color: var(--danger-color);
}

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