/* ========================================= */
/* === BASE, VARIABLES & GENERAL STYLES === */
/* ========================================= */

:root {
    --primary-bg-color: #0a101f;
    --primary-bg-color-rgb: 10, 16, 31;
    --card-bg-color-rgb: 40, 50, 70;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #cbd5e1;
    --highlight-color: #818cf8;
    --highlight-color-rgb: 129, 140, 248;
    --highlight-hover-color: #a7a7ff;
    --header-bg-color: rgba(20, 28, 45, 0.25);
    --section-bg-color: rgba(30, 40, 55, 0.25);
    --card-bg-color: rgba(40, 50, 70, 0.2);
    --card-bg-color-transparent: rgba(40, 50, 70, 0.15);
    --border-color-soft: rgba(255, 255, 255, 0.1);
    --border-color-medium: rgba(55, 65, 81, 0.5);
    --link-active-border-color: #6366f1;
    --font-primary: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-fa: 'Vazirmatn', Tahoma, Arial, sans-serif;
    --font-ar: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
    --font-tr: 'Roboto', 'Open Sans', 'Lato', sans-serif;
}

html, body {
    font-family: 'Vazirmatn', var(--font-primary), sans-serif !important;
    font-weight: 400;
}

body {
    background-color: #0a101f;
    color: var(--primary-text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    zoom: 0.9;
}

main {
    flex-grow: 1;
    padding-top: 15px; 
    padding-bottom: 48px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    text-align: left;
}

html[dir="rtl"] .container {
    text-align: right;
}

/* --- Base Typography --- */
h1, h2, h3 {
    font-weight: 700;
    color: #fff;
    margin-top: 0;
}
p {
    color: var(--secondary-text-color);
    font-size: 1.05em;
    margin-bottom: 1.1em;
    line-height: 1.6;
}
a {
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
a:hover {
    text-decoration: underline;
    color: var(--highlight-hover-color);
}
strong, b {
    color: #f3f4f6;
    font-weight: 600;
}

/* --- General Page Section Styling --- */
.page-section {
    padding: 40px 20px;
    background-color: var(--section-bg-color);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    color: #e5e7eb;
    margin: 0 auto 35px auto;
    max-width: 1150px;
    width: 92%;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.22),
                inset 0 0 1px 1px rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-section:last-of-type {
    margin-bottom: 0;
}
.page-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 239, 0.7), transparent);
    opacity: 0.8;
    filter: blur(3px);
}
.page-section .container {
    position: relative;
    z-index: 1;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}
.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--highlight-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}