:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    font-size: 16px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.language-switcher {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lang-btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    margin-top: 40px;
}

#subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form Styles */
.form-container {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

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

label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    cursor: pointer;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
}

.checkbox-item:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: var(--primary-color);
}

/* Button Styles */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: var(--shadow);
}

.generate-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Prompt Section */
.prompt-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.prompt-section.hidden {
    display: none;
}

.prompt-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.prompt-container {
    position: relative;
    background: #1e293b;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.prompt-container pre {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: #047857;
}

.copy-btn.copied {
    background: #059669;
}

.prompt-actions {
    display: flex;
    justify-content: center;
}

.secondary-btn {
    padding: 12px 24px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Footer */
footer {
    margin-top: auto;
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
        margin-top: 30px;
    }

    #subtitle {
        font-size: 1rem;
    }

    .form-container {
        padding: 20px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .language-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }

    .prompt-container {
        padding: 15px;
    }

    .prompt-container pre {
        font-size: 13px;
    }

    .copy-btn {
        position: static;
        width: 100%;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .form-section h2 {
        font-size: 1.3rem;
    }

    .checkbox-item {
        padding: 10px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Form validation styles */
input:invalid,
textarea:invalid,
select:invalid {
    border-color: #ef4444;
}

input:valid,
textarea:valid,
select:valid {
    border-color: var(--success-color);
}

/* Loading state */
.generate-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.generate-btn:disabled:hover {
    background: var(--text-secondary);
    transform: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
