:root {
    --bg-color: #f0f2f5;
    --text-color: #1c1e21;
    --container-bg: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --number-bg: #ffffff;
    --number-border: #e4e6eb;
    --number-text: #050505;
    --button-bg: #007bff;
    --button-hover: #0056b3;
    --toggle-bg: #e4e6eb;
    --header-bg: #ffffff;
    --border-color: #e4e6eb;
}

[data-theme="dark"] {
    --bg-color: #18191a;
    --text-color: #e4e6eb;
    --container-bg: #242526;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --number-bg: #3a3b3c;
    --number-border: #4e4f50;
    --number-text: #ffffff;
    --button-bg: #2d88ff;
    --button-hover: #1b74e4;
    --toggle-bg: #3a3b3c;
    --header-bg: #242526;
    --border-color: #3a3b3c;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.site-header {
    width: 100%;
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--button-bg);
}

#theme-btn {
    background-color: var(--toggle-bg);
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

main {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.container, .contact-container, .comments-container, .content-section {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

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

.content-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--button-bg);
}

.content-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-section ul {
    padding-left: 1.5rem;
}

.subtitle {
    margin-top: -1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.faq-item p {
    margin-top: 0;
}

.contact-container h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--number-border);
    background-color: var(--number-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

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

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

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--button-hover);
}

.container {
    text-align: center;
}

h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 2rem;
    min-height: 60px;
}

.number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--number-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid var(--number-border);
    color: var(--number-text);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, background-color 0.3s ease;
}

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

#generate {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: var(--button-bg);
    color: white;
    transition: background-color 0.2s ease, transform 0.1s active;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

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

#generate:active {
    transform: scale(0.98);
}

.site-footer {
    width: 100%;
    text-align: center;
    padding: 2rem;
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}
