:root {
    --bg-color: #f0f2f5;
    --container-bg: rgba(255, 255, 255, 0.7);
    --text-color: #1a1a1a;
    --heading-color: #2c3e50;
    --border-color: rgba(255, 255, 255, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glass-blur: 15px;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ball-shadow: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --container-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f1f5f9;
    --heading-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --ball-shadow: rgba(0, 0, 0, 0.6);
}

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow: hidden;
    position: relative;
}

/* Background Decoration */
body::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

body::after {
    content: "";
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

.container {
    background: var(--container-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px var(--shadow-color);
    text-align: center;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: fadeIn 0.8s ease-out;
}

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

header {
    margin-bottom: 40px;
}

h1 {
    color: var(--heading-color);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
}

.lotto-numbers-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    min-height: 70px;
    flex-wrap: wrap;
}

.lotto-ball {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 16px var(--ball-shadow), inset 0 -4px 8px rgba(0,0,0,0.3);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0);
}

@keyframes pop-in {
    to { transform: scale(1); }
}

#generate-btn {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    filter: brightness(1.1);
}

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

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--border-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
}

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

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .sun-icon,
html:not([data-theme="dark"]) .moon-icon {
    display: none;
}
