:root {
    --bg-color: oklch(98% 0.01 260);
    --card-bg: oklch(100% 0 0 / 0.8);
    --text-primary: oklch(20% 0.02 260);
    --text-secondary: oklch(50% 0.02 260);
    --accent: oklch(65% 0.25 40); /* Gold/Orange */
    
    --lotto-y: oklch(85% 0.2 90); /* 1-10 */
    --lotto-b: oklch(65% 0.15 250); /* 11-20 */
    --lotto-r: oklch(60% 0.2 25); /* 21-30 */
    --lotto-g: oklch(50% 0.02 0); /* 31-40 */
    --lotto-v: oklch(75% 0.15 150); /* 41-45 */

    --shadow-soft: 0 10px 30px oklch(0% 0 0 / 0.05);
    --shadow-deep: 0 20px 50px oklch(0% 0 0 / 0.1);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, oklch(90% 0.05 30 / 0.2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, oklch(90% 0.05 260 / 0.2) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: auto 0;
}

header {
    text-align: center;
}

.logo {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 5px;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 20px oklch(65% 0.25 40 / 0.3);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.generator-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 40px;
    box-shadow: var(--shadow-deep);
    border: 1px solid oklch(100% 0 0 / 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.ball-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    min-height: 80px;
}

.ball-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px dashed var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.lotto-ball {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15), inset 0 -4px 10px rgba(0,0,0,0.1);
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pop-in {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.ball-1-10 { background: var(--lotto-y); color: oklch(20% 0.05 90); }
.ball-11-20 { background: var(--lotto-b); }
.ball-21-30 { background: var(--lotto-r); }
.ball-31-40 { background: var(--lotto-g); }
.ball-41-45 { background: var(--lotto-v); }

.main-btn {
    position: relative;
    padding: 18px 40px;
    font-size: 1.25rem;
    font-weight: 700;
    border: none;
    border-radius: 20px;
    background: var(--text-primary);
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.main-btn:active {
    transform: scale(0.96);
}

.main-btn:hover {
    box-shadow: 0 10px 30px oklch(20% 0.02 260 / 0.3);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.main-btn:hover .btn-glow {
    left: 100%;
}

.history-section {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
}

.history-section h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: oklch(100% 0 0 / 0.5);
    border-radius: 12px;
    animation: slide-in 0.3s ease-out;
}

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

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

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

.timestamp {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.empty-msg {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

.secondary-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px solid oklch(0% 0 0 / 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: oklch(0% 0 0 / 0.05);
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 20px;
}

.footer-nav {
    margin-bottom: 15px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 8px;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent);
}

/* Custom Scrollbar */
.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: oklch(0% 0 0 / 0.1);
    border-radius: 10px;
}

@media (max-width: 480px) {
    .generator-card {
        padding: 30px 20px;
    }
    
    .lotto-ball {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

