/* Custom CSS for Arabic QR Code Generator */

/* Body and general styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

/* Card styling */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Form styling */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button styling */
.btn {
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
    border: none;
}

/* Tab styling */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    margin-left: 5px;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.nav-tabs .nav-link:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

/* QR Result styling */
.qr-result {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
}

.qr-result img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Alert styling */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

/* Footer styling */
footer {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animation for form submission */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 8px 20px;
        font-size: 1rem;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form labels */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Input focus effects */
.form-control:focus,
.form-select:focus {
    transform: translateY(-2px);
}

/* Image preview styling */
#imagePreview {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

#preview {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#preview:hover {
    transform: scale(1.05);
}

/* Form improvements */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.form-control[type="file"] {
    padding: 8px 12px;
}

/* Better spacing for form rows */
.row.mb-3 {
    margin-bottom: 1.5rem !important;
}

/* Enhanced input focus */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

/* Validation styling */
.is-invalid {
    border-color: #dc3545;
}

.is-valid {
    border-color: #28a745;
}

/* File input custom styling */
.form-control[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* تخصيص البطاقات */
.gradient-preview {
    width: 40px;
    height: 20px;
    border-radius: 5px;
    display: inline-block;
    margin-left: 8px;
    border: 1px solid #ddd;
}

.form-check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-check-label:hover {
    background: rgba(0,0,0,0.05);
}

.form-check-input:checked + .form-check-label {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid #667eea;
}

/* معاينة البطاقة */
#vcard_preview {
    transition: all 0.3s ease;
}

.vcard-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: white;
    position: relative;
}

.vcard-layout-modern {
    padding: 20px;
    text-align: center;
    color: white;
    min-height: 200px;
}

.vcard-layout-professional {
    background: white;
    color: #333;
    padding: 20px;
    min-height: 200px;
}

.vcard-layout-creative {
    position: relative;
    padding: 20px;
    min-height: 200px;
    color: white;
}

.vcard-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.vcard-title {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.vcard-company {
    font-size: 11px;
    opacity: 0.8;
    padding: 3px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    display: inline-block;
}

/* الخلفيات المتدرجة */
.bg-gradient-luxury {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-gold {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.bg-gradient-ocean {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
}

.bg-gradient-sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bg-gradient-forest {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

.bg-gradient-royal {
    background: linear-gradient(135deg, #141e30 0%, #243b55 100%);
}

.bg-gradient-rose {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* تحسينات إضافية */
.form-control-color {
    width: 100%;
    height: 45px;
}

/* تأثيرات الانتقال */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
