/* تنسيقات عامة للكونتينر */
.scl-generator-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    direction: rtl; /* دعم اللغة العربية */
}

/* تضمين الخطوط للواجهة */
@font-face {
    font-family: 'Amiri';
    src: url('../fonts/Amiri-Regular.ttf') format('truetype');
    font-weight: normal;
}
@font-face {
    font-family: 'Noto Sans';
    src: url('../fonts/NotoSans-Regular.ttf') format('truetype');
    font-weight: normal;
}

.scl-generator-container,
.scl-generator-container input,
.scl-generator-container select,
.scl-generator-container button {
    font-family: 'Amiri', 'Noto Sans', Tahoma, sans-serif; 
}


.scl-generator-container h2 {
    color: #4A90E2;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.scl-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* تنسيقات حقول الإدخال */
.scl-field {
    margin-bottom: 20px;
}

.scl-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.scl-field input[type="text"],
.scl-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    direction: rtl;
}

/* زر التوليد */
#scl-generate-button {
    width: 100%;
    padding: 15px;
    background-color: #4A90E2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

#scl-generate-button:hover {
    background-color: #357ABD;
}

/* منطقة الرسائل */
.scl-status-box {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
}

.scl-status-box.error {
    background-color: #fcebeb;
    color: #D9534F;
    border: 1px solid #D9534F;
}

.scl-status-box.success {
    background-color: #e9fceb;
    color: #5CB85C;
    border: 1px solid #5CB85C;
}

/* منطقة النتائج */
#scl-results h3 {
    text-align: center;
    color: #5CB85C;
    margin-top: 30px;
    margin-bottom: 20px;
}

.scl-output-section {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.scl-cover-preview {
    flex: 1;
    text-align: center;
}

#scl-cover-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scl-story-text {
    flex: 2;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    max-height: 500px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.scl-story-text h4,
.scl-cover-preview h4 {
    color: #4A90E2;
    margin-top: 0;
}

#scl-story-output p {
    margin-bottom: 1em;
    line-height: 1.6;
    text-align: justify;
}

/* زر التصدير */
.scl-export-button {
    width: 100%;
    padding: 15px;
    background-color: #5CB85C;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.scl-export-button:hover {
    background-color: #4CAE4C;
}

/* تنسيق التحميل (Loader) */
.scl-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4A90E2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* استجابة الشاشة الصغيرة */
@media (max-width: 600px) {
    .scl-output-section {
        flex-direction: column;
    }
    .scl-story-text {
        max-height: 300px;
    }
}