body {
    font-family: 'Cairo', sans-serif;
    background-color: rgba(0, 0, 0, 0);
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-size: 22px;
}

.container {
    position: relative;
    display: flex;
    width: 1500px;
    height: 900px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1f44 0%, #1a3a6c 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
.container.closing {
    animation: fadeOut 0.5s forwards;
}
.container.opening {
    animation: fadeIn 0.5s forwards;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}
.close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.6);
}
.close-button:active {
    transform: scale(0.9);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4);
}

.sidebar {
    width: 400px;
    background: linear-gradient(90deg, #0d3a7e 0%, #125190 100%);
    color: white;
    padding: 30px;
    padding-bottom: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 12px 0 0 12px;
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    transition: background 0.3s;
    position: relative;
    animation: gradientAnimation 15s ease infinite;
    background-size: 200% 200%;
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.settings-icon {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    transition: color 0.3s;
    margin-bottom: -10px;
}
.settings-icon i {
    transition: transform 0.3s;
}
.settings-icon:hover {
    color: rgba(255, 255, 255, 0.8);
}
.settings-icon:hover i {
    transform: rotate(360deg);
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 42px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
.sidebar button {
    width: 100%;
    padding: 18px;
    margin: 12px 0;
    background: linear-gradient(135deg, #0a397e 0%, #124e8a 100%);
    border: none;
    color: white;
    cursor: pointer;
    text-align: right;
    display: flex;
    align-items: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    justify-content: flex-start;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    font-size: 26px;
    letter-spacing: 0.5px;
}
.sidebar button:hover .category-icon,
.sidebar button:hover .subcategory-icon {
    transform: scale(1.2);
    transition: transform 0.3s;
}
.sidebar button:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}
.sidebar button:hover {
    background: linear-gradient(135deg, #115292 0%, #093372 100%);
    box-shadow: 0 6px 15px rgba(15, 52, 96, 0.5);
    transform: translateY(-3px);
    border: 2px solid rgba(255, 255, 255, 0.4);
}
.sidebar button:hover span {
    color: #fff;
    transition: color 0.3s;
}
.sidebar button.active {
    background: linear-gradient(135deg, #0d3a7e 0%, #125190 100%);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    color: white;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
}
.sidebar button i {
    transition: transform 0.3s;
}
.sidebar button:hover i {
    transform: scale(1.2);
}

.content {
    flex: 1;
    padding: 30px;
    box-sizing: border-box;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Cairo', sans-serif;
    font-size: 22px;
    line-height: 1.6;
}
.content h3 {
    color: #fff;
    font-size: 34px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}
.content p {
    color: #fff;
    font-size: 22px;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: right;
}
.content ul {
    margin: 10px 0 20px 20px;
    padding-right: 20px;
}
.content li {
    margin-bottom: 10px;
    color: #fff;
    text-align: right;
    position: relative;
    padding-right: 15px;
}
.content li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: rgba(255, 255, 255, 0.6);
}
.content strong {
    font-weight: bold;
}
.content em {
    font-style: italic;
}
.content a {
    color: #2975a8;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.content a::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #2975a8;
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}
.content a:hover::before {
    visibility: visible;
    transform: scaleX(1);
}
.content a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}
.content a::after {
    content: "🔗";
    margin-left: 5px;
    font-size: 16px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.content a:hover::after {
    opacity: 1;
}
.content a.special {
    background: linear-gradient(135deg, #0a397e 0%, #124e8a 100%);
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.content a.special:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}
.content img {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}
.content img:hover {
    transform: scale(1.05);
}

.content::-webkit-scrollbar {
    width: 8px;
}
.content::-webkit-scrollbar-track {
    background: transparent;
}
.content::-webkit-scrollbar-thumb {
    background-color: #0a1f44;
    border-radius: 4px;
}

#content-area {
    margin-top: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
}
#content-area.visible {
    opacity: 1;
    transform: translateY(0);
}
#content-area.hidden {
    opacity: 0;
}

.category-title {
    background: linear-gradient(135deg, #0a397e 0%, #124e8a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    margin-bottom: 5px;
}
.category-title .icon {
    transition: transform 0.3s;
}
.category-title.active {
    background: linear-gradient(135deg, #0d3a7e 0%, #125190 100%);
}

.icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.subcategory-container {
    padding-left: 20px;
    overflow: hidden;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0px;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}
.subcategory-container.open {
    max-height: 500px;
}
.subcategory-button {
    background: linear-gradient(135deg, #0a397e 0%, #124e8a 100%);
    margin: 8px 0;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, #0d3a7e 0%, #125190 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}
.subcategory-button:hover {
    background: linear-gradient(135deg, #115292 0%, #093372 100%);
    box-shadow: 0 6px 15px rgba(15, 52, 96, 0.5);
    transform: translateY(-3px);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.category-icon {
    margin-right: 10px;
    display: inline-block;
}

.subcategory-icon {
    margin-right: 10px;
}

h1 {
    color: #fff;
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
h2 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
p {
    color: #fff;
    font-size: 22px;
    line-height: 1.6;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    animation: fadeIn 0.3s;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: linear-gradient(135deg, #0a1f44 0%, #1a3a6c 100%);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 80%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: modalopen 0.5s;
}

.settings-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.settings-item span {
    font-size: 22px;
    color: #fff;
    margin-right: 10px;
}
.settings-item button {
    margin-left: 10px;
    background: linear-gradient(135deg, #0a397e 0%, #124e8a 100%);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.settings-item button:hover {
    background: linear-gradient(135deg, #115292 0%, #093372 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(15, 52, 96, 0.4);
}
.settings-item .switch {
    margin-left: 10px;
    position: relative;
    display: inline-block;
    width: 45px;
    height: 20px;
}
.settings-item .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.settings-item .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}
.settings-item .slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
.settings-item input:checked + .slider {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}
.settings-item input:checked + .slider:before {
    transform: translateX(14px);
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}
.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: 0.4s;
    border-radius: 20px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}
input:checked + .slider:before {
    transform: translateX(14px);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.search-bar {
    margin-bottom: 10px;
    padding-right: 20px;
}
.search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 22px;
}

.full-screen-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: zoom-out;
    display: none;
}
.full-screen-img img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    animation: fadeIn 1s;
}

select {
    width: 30%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 22px;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}
select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}
select:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    outline: none;
}
select option {
    padding: 10px;
    background: #0a1f44;
    color: #fff;
}

#externalLinkModal .modal-content {
    background: linear-gradient(135deg, #0a1f44 0%, #1a3a6c 100%);
    margin: 2% auto;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 90%;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: modalopen 0.5s;
    position: relative;
    overflow: hidden;
    height: 80vh;
}
#externalLinkIframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
#externalLinkModal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease;
}
#externalLinkModal .close:hover,
#externalLinkModal .close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
#externalLinkIframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* animations */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}
@keyframes modalopen {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes float {
    0% {
        box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
        transform: translatey(0px);
    }
    50% {
        box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
        transform: translatey(-20px);
    }
    100% {
        box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
        transform: translatey(0px);
    }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.content .arabic-text {
    direction: rtl;
    unicode-bidi: embed;
}

.content li {
    margin-bottom: 10px;
    color: #fff;
    text-align: right;
    position: relative;
    padding-right: 15px;
}

.content li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: rgba(255, 255, 255, 0.6);
}

.content p {
    color: #fff;
    font-size: 22px;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: right;
}

.banner-container {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-image {
    width: 960px;
    height: 540px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.banner-image:hover {
    transform: scale(1.02);
}
