/* ===== صفحات الشروط والأحكام وسياسة الخصوصية ===== */

/* الصفحة الرئيسية */
.main-content {
    min-height: calc(100vh - 140px);
    background: linear-gradient(135deg, var(--white-off) 0%, var(--white) 100%);
    padding: 2rem 0;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="terms-bg-pattern" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="1" fill="rgba(126,34,206,0.03)"/><circle cx="15" cy="15" r="0.5" fill="rgba(255,215,0,0.03)"/><circle cx="45" cy="20" r="0.5" fill="rgba(126,34,206,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23terms-bg-pattern)"/></svg>');
    opacity: 0.4;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* رأس الصفحة */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #7E22CE 0%, #10011a 100%);
    border-radius: 25px;
    border: 3px solid var(--gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="header-stars" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,215,0,0.2)"/><circle cx="10" cy="10" r="0.5" fill="rgba(255,215,0,0.2)"/><circle cx="30" cy="15" r="0.5" fill="rgba(255,215,0,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23header-stars)"/></svg>');
    opacity: 0.3;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border: 3px solid var(--white);
    position: relative;
    z-index: 1;
}

.header-icon i {
    font-size: 2.2rem;
    color: var(--primary-purple-dark);
}

.page-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.page-description {
    font-size: 1.3rem;
    color: var(--white);
    opacity: 0.9;
    position: relative;
    z-index: 1;
    margin: 0;
}

/* إجراءات الإدارة */
.admin-actions {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-actions .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(126, 34, 206, 0.3);
    transition: all 0.3s ease;
}

.admin-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(126, 34, 206, 0.4);
}

/* رسائل التنبيه */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(72, 187, 120, 0.05) 100%);
    border: 2px solid var(--success);
    color: var(--success);
}

.alert-success i {
    color: var(--success);
    font-size: 1.2rem;
}

/* حاوية المحتوى */
.content-container {
    background: var(--white);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--gold-light);
    position: relative;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.content-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.02) 0%, rgba(255, 215, 0, 0.02) 100%);
    border-radius: 25px;
    z-index: -1;
}

/* محتوى الشروط */
.terms-content {
    line-height: 1.8;
    color: var(--black);
    position: relative;
    z-index: 1;
}

.terms-content h2 {
    color: var(--primary-purple-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--gold);
    position: relative;
}

.terms-content h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gold);
}

.terms-content h3 {
    color: var(--primary-purple);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-right: 1rem;
    position: relative;
}

.terms-content h3::before {
    content: '▶';
    color: var(--gold);
    position: absolute;
    right: 0;
    font-size: 0.8rem;
}

.terms-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-align: justify;
}

.terms-content ul {
    margin: 1rem 0;
    padding-right: 2rem;
}

.terms-content li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.5rem;
}

.terms-content li::before {
    content: '•';
    color: var(--gold);
    font-weight: bold;
    position: absolute;
    right: 0;
    font-size: 1.2rem;
}

.terms-content strong {
    color: var(--primary-purple-dark);
    font-weight: 600;
}

/* نموذج التعديل */
.admin-edit-form {
    background: var(--white-off);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--gold);
    margin-top: 2rem;
}

.admin-edit-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-edit-form label {
    display: block;
    font-weight: 600;
    color: var(--primary-purple-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 15px;
    font-size: 1rem;
    background: var(--white);
    color: var(--black);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-family: inherit;
    line-height: 1.6;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.form-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* قسم العودة */
.back-section {
    text-align: center;
    margin-top: 2rem;
}

.back-section .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
    border: 2px solid var(--primary-purple);
    box-shadow: 0 4px 15px rgba(126, 34, 206, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark) 0%, var(--primary-purple) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(126, 34, 206, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-purple);
    border: 2px solid var(--gold);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-secondary:hover {
    background: var(--gold-light);
    color: var(--primary-purple-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* التجاوب */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
    }
    
    .header-icon i {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-description {
        font-size: 1.1rem;
    }
    
    .content-container {
        padding: 2rem 1.5rem;
    }
    
    .terms-content h2 {
        font-size: 1.6rem;
    }
    
    .terms-content h3 {
        font-size: 1.2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1.5rem 1rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .content-container {
        padding: 1.5rem 1rem;
    }
    
    .terms-content h2 {
        font-size: 1.4rem;
    }
    
    .terms-content h3 {
        font-size: 1.1rem;
    }
    
    .terms-content p {
        font-size: 0.95rem;
    }
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-container {
    animation: fadeInUp 0.6s ease-out;
}

.page-header {
    animation: fadeInUp 0.8s ease-out;
}

/* تأثيرات خاصة */
.content-container::after {
    content: '📄';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

/* تحسينات إضافية */
.terms-content a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.terms-content a:hover {
    color: var(--gold-dark);
    border-bottom-color: var(--gold-dark);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* تأثيرات التحويم للعناصر */
.terms-content h3:hover {
    color: var(--primary-purple-dark);
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.terms-content li:hover {
    color: var(--primary-purple);
    transform: translateX(-3px);
    transition: all 0.3s ease;
}

/* شريط الأدوات في المحرر */
.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--white-off);
    border-radius: 10px;
    border: 2px solid var(--gray-light);
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--primary-purple);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.toolbar-btn:hover {
    background: var(--gold-light);
    border-color: var(--gold);
    color: var(--primary-purple-dark);
    transform: translateY(-2px);
}

.toolbar-btn i {
    font-size: 0.8rem;
}

/* عداد الأحرف */
.character-count {
    text-align: left;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
    background: var(--white-off);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
}

/* رسائل الخطأ */
.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 2px solid #ef4444;
    color: #ef4444;
}

.alert-error i {
    color: #ef4444;
    font-size: 1.2rem;
}

/* تحسينات إضافية للمحرر */
.admin-edit-form textarea {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 400px;
}

.admin-edit-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* تحسينات التجاوب للأدوات الجديدة */
@media (max-width: 768px) {
    .editor-toolbar {
        padding: 0.75rem;
    }
    
    .toolbar-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .character-count {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .editor-toolbar {
        gap: 0.3rem;
        padding: 0.5rem;
    }
    
    .toolbar-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .toolbar-btn i {
        font-size: 0.7rem;
    }
}