:root {
    --primary-color: #f0f0f0;
    --secondary-color: #333;
    --accent-color: #ff9800;
    --background-color: #f0f0f0;
    --card-background: #fff;
    --text-color: #333;
    --pattern-opacity: 0.05;
}

body.dark-mode {
    --primary-color: #1a1a1a;
    --secondary-color: #e0e0e0;
    --accent-color: #ff9800;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --text-color: #e0e0e0;
    --pattern-opacity: 0.1;
}

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: var(--background-color);
    background-image: linear-gradient(45deg, rgba(0,0,0,var(--pattern-opacity)) 25%, transparent 25%),
                      linear-gradient(-45deg, rgba(0,0,0,var(--pattern-opacity)) 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, rgba(0,0,0,var(--pattern-opacity)) 75%),
                      linear-gradient(-45deg, transparent 75%, rgba(0,0,0,var(--pattern-opacity)) 75%);
    background-size: 20px 20px;
    transition: background-color 0.3s ease;
}

#app {
    text-align: center;
    background: var(--card-background);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

h1 {
    color: var(--text-color);
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

#numbers-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

#generate-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#generate-btn:hover {
    background-color: #e68a00;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-background);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#bonus-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    margin-top: 20px;
}

.bonus-label {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    transition: color 0.3s ease;
}

#bonus-container {
    display: flex;
    gap: 15px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: var(--accent-color);
}

#auth-title {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-background);
    color: var(--text-color);
    transition: border-color 0.3s;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal-content button[type="submit"] {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content button[type="submit"]:hover {
    background-color: #e68a00;
}

.auth-switch {
    text-align: center;
    color: var(--text-color);
    font-size: 14px;
}

.auth-switch a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.auth-switch a:hover {
    text-decoration: underline;
}

#auth-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

#auth-message.success {
    background-color: #4caf50;
    color: white;
}

#auth-message.error {
    background-color: #f44336;
    color: white;
}

/* User Info Styles */
#user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-background);
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#user-email {
    color: var(--text-color);
    font-size: 14px;
}

#signout-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

#signout-btn:hover {
    background-color: #d32f2f;
}

#auth-prompt {
    margin: 20px 0;
    padding: 20px;
    background: var(--card-background);
    border: 2px dashed var(--accent-color);
    border-radius: 10px;
}

#auth-prompt p {
    color: var(--text-color);
    margin: 0;
}

#auth-prompt a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

#auth-prompt a:hover {
    text-decoration: underline;
}

body.dark-mode .modal-content input {
    border-color: #555;
}

body.dark-mode .modal-content input:focus {
    border-color: var(--accent-color);
}
