:root {
    --bg-color: #f0f2f5;
    --text-color: #333;
    --container-bg: white;
    --h1-color: #1a237e;
    --p-color: #555;
    --btn-bg: #1a237e;
    --btn-hover: #283593;
    --btn-shadow: rgba(26, 35, 126, 0.4);
    --btn-shadow-hover: rgba(26, 35, 126, 0.5);
    --dot-color: #d7d7d7;
}

.dark-theme {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --container-bg: #1e1e1e;
    --h1-color: #bb86fc;
    --p-color: #b0b0b0;
    --btn-bg: #bb86fc;
    --btn-hover: #9965f4;
    --btn-shadow: rgba(187, 134, 252, 0.4);
    --btn-shadow-hover: rgba(187, 134, 252, 0.5);
    --dot-color: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
    background-size: 16px 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    color: var(--h1-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

p {
    color: var(--p-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

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

.number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(145deg, #6e45e2, #88d3ce);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.number:hover {
    transform: translateY(-5px);
}

#generate-btn {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--btn-shadow);
}

.dark-theme #generate-btn {
    color: #121212;
}

#generate-btn:hover {
    background-color: var(--btn-hover);
    box-shadow: 0 6px 20px var(--btn-shadow-hover);
    transform: translateY(-2px);
}

#generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px var(--btn-shadow);
}

#theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 2px solid var(--h1-color);
    color: var(--h1-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background-color: var(--h1-color);
    color: var(--container-bg);
}
