:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #7b9e87;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    color: var(--primary-color);
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.form-container, .info-panel {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}

/* Form Styles */
.form-container h2, .info-panel h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox input {
    width: auto;
    margin-top: 5px;
}

.checkbox label {
    font-weight: normal;
    font-size: 0.95rem;
}

.form-required {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 14px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    text-decoration: none;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    flex: 2;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

.reset-btn {
    background-color: #e9ecef;
    color: var(--dark-color);
    flex: 1;
}

.reset-btn:hover {
    background-color: #dee2e6;
}

/* Info Panel Styles */
.info-step {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.step-content p {
    color: #666;
    font-size: 0.95rem;
}

/* Hadith Section */
.hadith-section {
    background-color: #f8f9fa;
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.hadith-section i {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.hadith-section p {
    color: #555;
    font-style: italic;
    line-height: 1.6;
}

/* Disclaimer Section */
.disclaimer-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.disclaimer-btn {
    width: 100%;
    padding: 12px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.disclaimer-btn:hover {
    background-color: #ffeaa7;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(133, 100, 4, 0.1);
}

/* Admin Link */
.admin-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.admin-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--danger-color);
    background-color: #f8f9fa;
}

.disclaimer-text {
    line-height: 1.7;
    color: #555;
    margin-bottom: 25px;
}

.disclaimer-text strong {
    color: var(--dark-color);
    display: block;
    margin-bottom: 10px;
}

.disclaimer-text ul {
    margin: 15px 0;
    padding-left: 20px;
}

.disclaimer-text li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

.disclaimer-text li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

html[dir="rtl"] .info-step {
    flex-direction: row-reverse;
}

html[dir="rtl"] .form-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .form-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .checkbox {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

html[dir="rtl"] .form-required {
    flex-direction: row-reverse;
}

html[dir="rtl"] .admin-link {
    text-align: right;
}

html[dir="rtl"] .hadith-section {
    border-left: none;
    border-right: 4px solid var(--accent-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

html[dir="rtl"] .close-modal {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .disclaimer-text ul {
    padding-left: 0;
    padding-right: 20px;
}

html[dir="rtl"] .disclaimer-text li {
    padding-left: 0;
    padding-right: 10px;
}

html[dir="rtl"] .disclaimer-text li:before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .modal-actions {
    justify-content: flex-start;
}

html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
    }
    
    html[dir="rtl"] .close-modal {
        right: auto;
        left: 10px;
    }
}