:root {
    --background-color: #f0f0f0;
    --container-bg-color: #fff;
    --text-color: #000;
    --input-border-color: #ccc;
    --input-bg-color: #fff;
    --button-bg-color: #2ecc71;
    --button-hover-bg-color: #27ae60;
}

[data-theme="dark"] {
    --background-color: #333;
    --container-bg-color: #444;
    --text-color: #fff;
    --input-border-color: #555;
    --input-bg-color: #666;
    --button-bg-color: #2e7d32; /* Darker green for dark mode */
    --button-hover-bg-color: #1b5e20; /* Even darker green */
}

body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    text-align: center;
    background-color: var(--container-bg-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 600px;
    width: 90%;
}

.theme-switch-wrapper {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}


.number-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    background-color: #3498db;
}

#generate-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    color: #fff;
    background-color: var(--button-bg-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generate-btn:hover {
    background-color: var(--button-hover-bg-color);
}

.history {
    margin-top: 2rem;
}

#history-list {
    list-style: none;
    padding: 0;
}

/* Contact Form Styling */
.contact-form {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--input-border-color);
    text-align: left;
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--input-border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--input-bg-color);
    color: var(--text-color);
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.contact-form button[type="submit"] {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    color: #fff;
    background-color: var(--button-bg-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.contact-form button[type="submit"]:hover {
    background-color: var(--button-hover-bg-color);
}
