:root {
    --bg-color: #f0f2f5;
    --text-color: #333;
    --container-bg: #ffffff;
    --container-shadow: rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.15);
    --number-bg: #eee;
    --number-text: #333;
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --btn-text: white;
    --separator: #eee;
    --label-color: #555;
    --input-bg: #fff;
    --input-border: #ddd;
    --input-focus: #4CAF50;
}

body.dark-theme {
    --bg-color: #1a1a1a;
    --text-color: #f0f2f5;
    --container-bg: #2d2d2d;
    --container-shadow: rgba(0,0,0,0.3), 0 6px 6px rgba(0,0,0,0.4);
    --number-bg: #444;
    --number-text: #f0f2f5;
    --primary-color: #66bb6a;
    --primary-hover: #81c784;
    --separator: #444;
    --label-color: #bbb;
    --input-bg: #3d3d3d;
    --input-border: #444;
    --input-focus: #66bb6a;
}

body {
    font-family: sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.main-content {
    flex: 1.2;
    max-width: 600px;
}

.sidebar {
    flex: 1;
    min-width: 350px;
}

.card {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px var(--container-shadow);
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1, h2 {
    color: var(--text-color);
    transition: color 0.3s ease;
}

h1 { font-size: 2rem; margin-top: 0; margin-bottom: 20px; text-align: center; }
h2 { font-size: 1.25rem; margin-top: 20px; margin-bottom: 15px; }

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

.number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--number-bg);
    color: var(--number-text);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#generate-btn, #submit-btn {
    background-color: var(--primary-color);
    color: var(--btn-text);
    padding: 12px 24px;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-weight: bold;
    width: 100%;
    margin-bottom: 10px;
}

#generate-btn:hover, #submit-btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.separator {
    border: none;
    height: 1px;
    background-color: var(--separator);
    margin: 30px 0;
}

/* Contact & Comments Section */
.contact-section, .comments-section {
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--label-color);
}

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

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

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

#theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    background-color: rgba(0,0,0,0.05);
}

body.dark-theme #theme-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 1000px) {
    .page-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .main-content, .sidebar {
        width: 100%;
        max-width: 600px;
        min-width: unset;
    }
}

@media (max-width: 600px) {
    .card {
        padding: 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
