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

:root {
    /* Dark Mode (Default) */
    --background-start: #1a237e;
    --background-end: #5e35b1;
    --card-background: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --light-text-color: #e0e0e0;
    --button-background: #ff4081;
    --button-hover-background: #f50057;
    --number-circle-1: #f44336;
    --number-circle-2: #e91e63;
    --number-circle-3: #9c27b0;
    --number-circle-4: #673ab7;
    --number-circle-5: #3f51b5;
    --number-circle-6: #2196f3;
    --shadow-color: rgba(0, 0, 0, 0.37);
    --pattern-opacity: 0.2;
}

body.light-mode {
    /* Light Mode */
    --background-start: #f5f7fa;
    --background-end: #c3cfe2;
    --card-background: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.1);
    --text-color: #333333;
    --light-text-color: #666666;
    --button-background: #3f51b5;
    --button-hover-background: #303f9f;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --pattern-opacity: 0.05;
}

body {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, var(--background-start), var(--background-end));
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-attachment: fixed;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-4c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm59-66c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z" fill-opacity=".05" fill="%23fff"/></svg>');
    opacity: var(--pattern-opacity);
    pointer-events: none;
}

.container {
    text-align: center;
    padding: 2rem;
    z-index: 1;
}

.card {
    background: var(--card-background);
    padding: 2.5rem 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    max-width: 500px;
    width: 100%;
    transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-background);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: var(--button-background);
    color: #fff;
}

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

p {
    color: var(--light-text-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.numbers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: popIn 0.5s cubic-bezier(0.26, 0.53, 0.74, 1.48) forwards;
}

/* Specific colors for lotto ranges (optional but nice) */
.number:nth-child(1) { border: 3px solid var(--number-circle-1); }
.number:nth-child(2) { border: 3px solid var(--number-circle-2); }
.number:nth-child(3) { border: 3px solid var(--number-circle-3); }
.number:nth-child(4) { border: 3px solid var(--number-circle-4); }
.number:nth-child(5) { border: 3px solid var(--number-circle-5); }
.number:nth-child(6) { border: 3px solid var(--number-circle-6); }

.generate-btn {
    background: var(--button-background);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.generate-btn:hover {
    background: var(--button-hover-background);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .card {
        padding: 2rem 1.5rem;
    }
    h1 { font-size: 2rem; }
    .number { width: 40px; height: 40px; font-size: 1.1rem; }
}
