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

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-flag {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    cursor: pointer;
}

.language-flag:hover {
    border-color: white;
    transform: scale(1.1);
}

.language-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.content {
    padding: 40px;
}

/* Status Message */
.status-message {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Section Cards */
.section-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.section-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Option Groups */
.option-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.option-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.option-btn:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

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

.option-btn input {
    display: none;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-btn:hover {
    border-color: var(--primary);
}

.checkbox-btn.checked {
    background: #e8f4ff;
    border-color: var(--primary);
    color: var(--primary);
}

.checkbox-btn input {
    display: none;
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 6px;
    line-height: 1.4;
}

/* Preview */
.preview-card {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 30px;
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.preview-icon {
    width: 32px;
    height: 32px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #166534;
}

.preview-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    padding: 15px;
}

.preview-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-item:last-child {
    margin-bottom: 0;
}

.preview-item i {
    color: var(--primary);
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--light);
}

.language-option .flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
}

.language-option .flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.language-option .name {
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .section-card {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .language-selector {
        position: static;
        margin-bottom: 20px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .option-group {
        flex-direction: column;
    }
    
    .option-btn {
        justify-content: center;
    }
}