:root {
    --bg-color: #f0f2f5;
    --container-bg: #fff;
    --text-color: #333;
    --primary-color: #007bff;
    --secondary-text: #6c757d;
    --border-color: #dee2e6;
    --history-item-bg: #f8f9fa;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --primary-color: #3f51b5;
    --secondary-text: #b0b0b0;
    --border-color: #333;
    --history-item-bg: #2c2c2c;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 20px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all var(--transition-speed);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.sun-icon { display: block; font-size: 20px; }
.moon-icon { display: none; font-size: 20px; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.container {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    width: 100%;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.generator-container {
    margin-bottom: 30px;
}

.numbers {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#generate-btn {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#generate-btn:hover {
    background-color: #218838;
}

.history-container {
    text-align: left;
}

h2 {
    color: var(--secondary-text);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

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

#history-list li {
    background-color: var(--history-item-bg);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .number {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    #generate-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
}