/* settings.css - تنسيقات صفحة الإعدادات */

/* الحاوية الرئيسية */
.settings-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 20px;
}

/* رأس الصفحة */
.settings-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.settings-header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.settings-header p {
    font-size: 1.2em;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* الإجراءات السريعة */
.settings-quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    justify-content: center;
}

.quick-btn {
    padding: 12px 25px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* هيكل الصفحة */
.settings-wrapper {
    display: flex;
    gap: 30px;
    min-height: 800px;
}

/* الشريط الجانبي */
.settings-sidebar {
    flex: 0 0 280px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 15px;
}

.nav-item {
    padding: 18px 20px;
    border: none;
    background: none;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
    font-size: 1.1em;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateX(-5px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-item.active:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-5px);
}

.nav-item i {
    font-size: 1.2em;
    width: 24px;
}

.badge {
    background: #ff4757;
    color: white;
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    margin-right: auto;
}

/* المحتوى الرئيسي */
.settings-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    overflow: hidden;
}

.settings-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

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

.settings-section h2 {
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8em;
}

.settings-section h2 i {
    color: #667eea;
}

/* مجموعات الإعدادات */
.settings-group {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.settings-group h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.4em;
}

/* عنصر الإعداد الفردي */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.setting-info p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

/* المفاتيح */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* أدوات التحكم */
.setting-select,
.setting-input,
.setting-time {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    min-width: 200px;
    background: white;
    transition: all 0.3s ease;
}

.setting-select:focus,
.setting-input:focus,
.setting-time:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-time {
    min-width: 120px;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* التحكم بحجم الخط */
.font-size-control {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 8px 15px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
}

.size-btn {
    background: none;
    border: 2px solid #667eea;
    color: #667eea;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.size-btn:hover {
    background: #667eea;
    color: white;
}

.size-value {
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

/* السلايدر */
.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 300px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slider-value {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

/* الأزرار */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

/* خيارات الثيم */
.theme-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.theme-option {
    flex: 1;
    min-width: 150px;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-option input:checked + label {
    border-color: #667eea;
    background: #f8f9fa;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.light-theme {
    background: white;
}

.light-theme .theme-header {
    height: 20px;
    background: #f8f9fa;
}

.light-theme .theme-content {
    height: 60px;
    background: white;
}

.dark-theme {
    background: #1e1e1e;
}

.dark-theme .theme-header {
    height: 20px;
    background: #2d2d2d;
}

.dark-theme .theme-content {
    height: 60px;
    background: #1e1e1e;
}

.auto-theme {
    background: linear-gradient(135deg, white 50%, #1e1e1e 50%);
}

.auto-theme .theme-header {
    height: 20px;
    background: linear-gradient(135deg, #f8f9fa 50%, #2d2d2d 50%);
}

.auto-theme .theme-content {
    height: 60px;
}

/* خيارات الألوان */
.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.color-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-option.active {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* خيارات اللغة */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.language-option.active {
    border-color: #667eea;
    background: #f8f9fa;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.language-option.active .fa-check {
    color: #667eea;
}

.language-option .fa-check {
    color: transparent;
    font-size: 1.2em;
    margin-right: auto;
}

.language-option.active .fa-check {
    color: #667eea;
}

.lang-flag {
    font-size: 2em;
}

.lang-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.lang-info p {
    color: #666;
    font-size: 0.9em;
}

/* الملف الشخصي */
.account-profile {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #667eea;
    object-fit: cover;
}

.change-avatar {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #667eea;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.profile-info h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #333;
}

.profile-info p {
    color: #666;
    margin-bottom: 5px;
}

.member-since {
    font-size: 0.9em;
    color: #888;
}

/* الاشتراكات */
.subscription-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 20px;
}

.subscription-info h4 {
    margin-bottom: 10px;
    font-size: 1.4em;
}

.subscription-type {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.subscription-features {
    opacity: 0.9;
    font-size: 0.9em;
}

.subscription-features-list {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.subscription-features-list h5 {
    margin-bottom: 15px;
    color: #333;
}

.subscription-features-list ul {
    list-style: none;
    padding: 0;
}

.subscription-features-list li {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscription-features-list li i {
    color: #28a745;
}

/* استخدام البيانات */
.data-usage {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.usage-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.usage-item h4 {
    margin-bottom: 10px;
    color: #333;
}

.progress-container {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.usage-text {
    color: #666;
    font-size: 0.9em;
}

.data-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* النسخ الاحتياطي */
.backup-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.backup-info p {
    margin-bottom: 10px;
    color: #333;
}

.backup-info span {
    font-weight: bold;
    color: #667eea;
}

.backup-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* الاختصارات */
.shortcuts-list {
    margin-top: 20px;
}

.shortcuts-list h5 {
    margin-bottom: 15px;
    color: #333;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.shortcut-item kbd {
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9em;
}

.shortcut-item span {
    color: #333;
    margin-right: auto;
}

/* عن التطبيق */
.about-app {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.app-logo i {
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-info h3 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
}

.app-version {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 15px;
}

.app-description {
    color: #666;
    line-height: 1.6;
    max-width: 600px;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.detail-item h4 {
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item p {
    color: #666;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.link-card:hover i {
    color: white;
}

.link-card i {
    font-size: 2em;
    color: #667eea;
}

.team-members {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.member-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
}

.member-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.member-info p {
    color: #666;
    font-size: 0.9em;
}

/* المودال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

/* الوضع الليلي */
.dark-mode .settings-sidebar,
.dark-mode .settings-content,
.dark-mode .settings-group,
.dark-mode .setting-select,
.dark-mode .setting-input,
.dark-mode .setting-time,
.dark-mode .font-size-control,
.dark-mode .account-profile,
.dark-mode .subscription-features-list,
.dark-mode .usage-item,
.dark-mode .backup-info,
.dark-mode .shortcut-item,
.dark-mode .about-app,
.dark-mode .detail-item,
.dark-mode .link-card,
.dark-mode .team-member {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #3d3d3d;
}

.dark-mode .setting-info h4,
.dark-mode .settings-group h3,
.dark-mode .settings-section h2,
.dark-mode .profile-info h3,
.dark-mode .app-info h3,
.dark-mode .detail-item h4,
.dark-mode .member-info h4 {
    color: #e0e0e0;
}

.dark-mode .setting-info p,
.dark-mode .lang-info p,
.dark-mode .profile-info p,
.dark-mode .app-description,
.dark-mode .detail-item p,
.dark-mode .member-info p {
    color: #aaa;
}

.dark-mode .subscription-card {
    background: linear-gradient(135deg, #4458b3 0%, #643a92 100%);
}

.dark-mode .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

/* التجاوب */
@media (max-width: 1024px) {
    .settings-wrapper {
        flex-direction: column;
    }
    
    .settings-sidebar {
        position: static;
        width: 100%;
        flex: none;
    }
    
    .settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-item {
        flex: 1;
        min-width: 150px;
        justify-content: center;
        text-align: center;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        margin: 0;
        font-size: 1.5em;
    }
}

@media (max-width: 768px) {
    .settings-container {
        padding: 10px;
    }
    
    .settings-header {
        padding: 20px;
    }
    
    .settings-header h1 {
        font-size: 2em;
        flex-direction: column;
        gap: 10px;
    }
    
    .settings-content {
        padding: 20px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .setting-select,
    .setting-input,
    .setting-time,
    .slider-container,
    .font-size-control {
        width: 100%;
        min-width: auto;
    }
    
    .theme-options,
    .color-options {
        justify-content: center;
    }
    
    .account-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .subscription-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .data-actions,
    .backup-actions {
        flex-direction: column;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .settings-quick-actions {
        flex-direction: column;
    }
    
    .quick-btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav-item {
        min-width: 80px;
    }
    
    .theme-option {
        min-width: 120px;
    }
    
    .color-option {
        min-width: 80px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
}