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

:root {
    --font-family: 'Poppins', sans-serif;
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --container-background: rgba(255, 255, 255, 0.8);
    --text-color: #333;
    --primary-color: #4a90e2;
    --primary-gradient: linear-gradient(135deg, #4a90e2 0%, #2a6cb5 100%);
    --number-gradient: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    --background-gradient: linear-gradient(135deg, #2c3e50 0%, #1a2833 100%);
    --container-background: rgba(26, 40, 51, 0.8);
    --text-color: #f0f0f0;
    --primary-color: #5a9ee2;
    --primary-gradient: linear-gradient(135deg, #5a9ee2 0%, #3a7cc5 100%);
    --number-gradient: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: var(--font-family);
    background: var(--background-gradient);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2rem;
    margin: 0;
    transition: background 0.5s ease;
}

.container {
    background: var(--container-background);
    backdrop-filter: blur(10px);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    width: 100%;
    max-width: 600px;
    border: 1px solid var(--border-color);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    margin: 0;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
}

.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: block; }
body.dark-mode .theme-toggle .fa-sun { display: block; }
body.dark-mode .theme-toggle .fa-moon { display: none; }

.controls {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-color);
}

#game-count {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
}

#generate-btn {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

#generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
}

body.dark-mode #generate-btn {
    box-shadow: 0 4px 15px rgba(90, 158, 226, 0.3);
}

body.dark-mode #generate-btn:hover {
    box-shadow: 0 8px 25px rgba(90, 158, 226, 0.4);
}

.results-container {
    margin-top: 2.5rem;
    display: grid;
    gap: 1.5rem;
}

.game-result {
    background: var(--container-background);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.game-result h3 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    color: var(--text-color);
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.lotto-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 5px var(--shadow-color);
    transform: scale(0);
    animation: popIn 0.3s ease forwards;
}

/* 1-10: Yellow */
.lotto-number.range-1 {
    background: linear-gradient(135deg, #fbcB00 0%, #F4A800 100%);
    color: #533f00;
}

/* 11-20: Blue */
.lotto-number.range-2 {
    background: linear-gradient(135deg, #00BFFF 0%, #1E90FF 100%);
}

/* 21-30: Red */
.lotto-number.range-3 {
    background: linear-gradient(135deg, #FF4B2B 0%, #FF416C 100%);
}

/* 31-40: Grey/Black */
.lotto-number.range-4 {
    background: linear-gradient(135deg, #888 0%, #555 100%);
}

/* 41-45: Green */
.lotto-number.range-5 {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
     color: #003c5a;
}


@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    to {
        transform: scale(1);
    }
}