:root {
    --bg-color: #f0f2f5;
    --text-color: #333;
    --container-bg: white;
    --h1-color: #1c3d7d;
    --ball-bg: #fff;
    --ball-border: #ddd;
    --ball-text: #333;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --container-bg: #1e1e1e;
    --h1-color: #bb86fc;
    --ball-bg: #2c2c2c;
    --ball-border: #444;
    --ball-text: #e0e0e0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.top-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem 2rem;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle-checkbox {
    display: none;
}

.theme-toggle-label {
    display: block;
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.theme-toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.theme-toggle-checkbox:checked + .theme-toggle-label {
    background-color: #bb86fc;
}

.theme-toggle-checkbox:checked + .theme-toggle-label::after {
    transform: translateX(20px);
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 600px;
    margin-top: 60px; /* Adjust for header */
    transition: background-color 0.3s;
}

h1 {
    color: var(--h1-color);
    margin-bottom: 1.5rem;
}

#generate-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 1.5rem;
}

#generate-btn:hover {
    background-color: #0056b3;
}

#results-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-set {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1rem;
    color: var(--ball-text);
    background-color: var(--ball-bg);
    border: 1px solid var(--ball-border);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.powerball {
    color: white;
    background-color: #d71e28;
    border-color: #b31018;
}
