:root {
    --bg-color: #f0f0f0;
    --card-bg: white;
    --text-color: #333;
    --shadow: rgba(0, 0, 0, 0.15);
    --number-bg: #4CAF50;
    --btn-bg: #008CBA;
    --btn-color: white;
    --nav-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f0f0f0;
    --shadow: rgba(0, 0, 0, 0.5);
    --number-bg: #81c784;
    --btn-bg: #4fc3f7;
    --btn-color: #121212;
    --nav-bg: #1e1e1e;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header & Navigation */
.site-header {
    width: 100%;
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--btn-bg);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--btn-bg);
}

.main-content {
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lotto-machine, .contact-form-container, #disqus-container, .info-section, .content-container, .disqus-wrapper {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    text-align: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    width: 100%;
    margin-bottom: 40px;
}

.disqus-wrapper h2 {
    text-align: left;
    margin-bottom: 20px;
}

#disqus-container {
    text-align: left;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

.info-section, .content-container {
    text-align: left;
    line-height: 1.6;
}

.info-section h2, .content-container h1, .content-container h2 {
    color: var(--btn-bg);
    margin-top: 0;
}

.contact-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
    font-size: 14px;
}

.form-group input, .form-group textarea {
    padding: 12px;
    border: 1px solid var(--text-color);
    opacity: 0.7;
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 16px;
    transition: opacity 0.3s, border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    opacity: 1;
    outline: none;
    border-color: var(--btn-bg);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

#submit-btn {
    background-color: var(--btn-bg);
    color: var(--btn-color);
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: opacity 0.3s, transform 0.2s;
}

#submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.numbers-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    gap: 10px;
}

.number {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--number-bg);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#generate-btn, #theme-toggle {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

#generate-btn {
    background-color: var(--btn-bg);
    color: var(--btn-color);
    margin-top: 30px;
    font-size: 18px;
}

#theme-toggle {
    background-color: transparent;
    border: 1px solid var(--btn-bg);
    color: var(--btn-bg);
    padding: 8px 15px;
}

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

/* Footer */
.site-footer {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
    border-top: 1px solid var(--text-color);
    opacity: 0.8;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a, .back-link {
    color: var(--btn-bg);
    text-decoration: none;
    font-weight: bold;
}

.footer-links a:hover, .back-link:hover {
    text-decoration: underline;
}

/* Back to Top Button */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    background-color: var(--btn-bg);
    color: var(--btn-color);
    border: none;
    outline: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: opacity 0.3s;
}

#back-to-top:hover {
    opacity: 0.8;
}

@media (max-width: 600px) {
    .nav-links {
        gap: 10px;
        font-size: 14px;
    }
    .nav-logo {
        font-size: 20px;
    }
    .number {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}