* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    
    /* Color Palette - Modern & Professional */
    --primary: #0f62fe;
    --primary-hover: #0353e9;
    --primary-dark: #0043ce;
    --accent: #00d9ff;
    --accent-dark: #00a8d1;
    
    /* Backgrounds */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fafafa;
    
    /* Surfaces with Glassmorphism */
    --surface: rgba(255,255,255,0.95);
    --surface-strong: #ffffff;
    --surface-glass: rgba(255,255,255,0.8);
    
    /* Text Colors */
    --text-primary: #161616;
    --text-secondary: #525252;
    --text-tertiary: #8d8d8d;
    --text-inverse: #ffffff;
    
    /* Status Colors */
    --success: #24a148;
    --warning: #f1c21b;
    --error: #da1e28;
    --info: #0043ce;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.2);
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography System */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    direction: rtl;
    line-height: 1.6;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #f0f0f0 100%);
    color: var(--text-primary);
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Glassmorphic Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(15, 98, 254, 0.1), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.1), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

img, svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Header - Modern Glassmorphism */
.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
}

.header:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 8px rgba(15, 98, 254, 0.2));
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(15, 98, 254, 0.08);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text);
    font-weight: 600;
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.hero {
    background: linear-gradient(135deg, #1462c0 0%, #00a6ff 100%);
    padding: 5.5rem 0 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.22), transparent 18%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.14), transparent 15%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.4rem, 2.6vw, 3.4rem);
    margin-bottom: 1rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.8s ease both;
}

.hero-subtitle {
    font-size: 1.15rem;
    max-width: 760px;
    margin: 0 auto 2rem;
    opacity: 0.92;
    color: rgba(255,255,255,0.95);
    animation: fadeInUp 0.9s ease both;
}

.hero-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1rem 2.2rem;
    font-size: 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.35s, box-shadow 0.35s, background 0.35s;
    box-shadow: 0 18px 35px rgba(20, 98, 192, 0.16);
}

.hero-btn:hover {
    transform: translateY(-3px);
    background: #f4f7fb;
}

.services, .about {
    padding: 4.5rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.9rem, 2.4vw, 2.4rem);
    margin-bottom: 2.8rem;
    color: var(--primary);
}

.services-grid,
.values-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.service-card,
.value-item,
.feature-card,
.content-card,
.chat-card,
.history-card,
.forum-card,
.modal-content {
    background: var(--surface);
    border: 1px solid rgba(16, 52, 93, 0.08);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.service-card:hover,
.value-item:hover,
.feature-card:hover,
.content-card:hover,
.chat-card:hover,
.history-card:hover,
.forum-card:hover,
.modal-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(20, 98, 192, 0.14);
    border-color: rgba(20, 98, 192, 0.14);
}

.service-card {
    padding: 2rem;
}

.service-icon,
.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title,
.value-title,
.section-title {
    color: var(--primary);
}

.service-description,
.about-text,
.card-text,
.form-label,
.form-note {
    color: var(--muted);
}

.about-content {
    text-align: center;
}

.about-text {
    font-size: 1.05rem;
    max-width: 780px;
    margin: 0 auto 3rem;
}

.value-item {
    text-align: center;
    padding: 2rem 1.5rem;
}

.value-title {
    font-size: 1.05rem;
    margin-top: 0.75rem;
}

.footer {
    background: #072a57;
    color: #dbe9ff;
    padding: 2.5rem 0;
    text-align: center;
}

.footer p,
.footer small {
    color: rgba(255,255,255,0.72);
}

.contact-info {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.card-heading {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.btn,
.button,
.hero-btn,
.nav-link,
.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.btn,
.button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.95rem 1.6rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(20, 98, 192, 0.12);
}

.btn:hover,
.button:hover,
.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(20, 98, 192, 0.18);
}

.logout-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
}

.input,
textarea,
select,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='file'] {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(16, 52, 93, 0.12);
    background: rgba(255,255,255,0.95);
    color: var(--text);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(0, 166, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(0, 166, 255, 0.08);
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 600;
    color: var(--text);
}

.form-note {
    font-size: 0.95rem;
    margin-top: 0.45rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 42, 78, 0.35);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 50;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: min(100%, 720px);
    padding: 2rem;
}

.fade-in,
.animated-card,
.message-list,
.chat-card,
.history-card,
.forum-card,
.table {
    animation: fadeInUp 0.8s ease both;
}

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 166, 255, 0); }
    50% { box-shadow: 0 0 40px rgba(0, 166, 255, 0.12); }
}

.glow {
    animation: pulseGlow 2.5s infinite ease-in-out;
}

.shadow-soft {
    box-shadow: 0 18px 40px rgba(20, 98, 192, 0.08);
}

.status-actions .btn,
.status-actions a {
    white-space: nowrap;
}

/* Hero Section Enhancements */
.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.05rem;
    max-width: 800px;
    margin: 1rem auto 2.5rem;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.92);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.95rem 2.2rem;
    font-size: 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.35s, box-shadow 0.35s, background 0.35s;
}

.hero-btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 18px 35px rgba(20, 98, 192, 0.16);
}

/* Features Section */
.features {
    padding: 4.5rem 0;
    background: linear-gradient(180deg, rgba(230, 240, 255, 0.5), transparent);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid rgba(16, 52, 93, 0.08);
    border-radius: var(--radius);
    padding: 2.2rem;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 70px rgba(20, 98, 192, 0.16);
    border-color: rgba(20, 98, 192, 0.2);
    background: rgba(230, 240, 255, 0.3);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-weight: 700;
}

.feature-description {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-link {
    color: var(--primary);
    font-weight: 600;
    transition: gap 0.25s ease;
    display: inline-block;
}

.feature-link:hover {
    opacity: 0.8;
}

/* About Section Enhancements */
.about-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h3 {
    color: var(--primary);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    text-align: center;
}

.about-section p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto;
}

.about-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem auto 0;
    max-width: 900px;
}

.about-list li {
    background: rgba(230, 240, 255, 0.5);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    color: var(--muted);
}

.about-list li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Footer Enhancements */
.footer {
    background: linear-gradient(135deg, #072a57 0%, #0d3d6b 100%);
    color: #dbe9ff;
    padding: 3.5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-link:hover {
    color: #7bb3ff;
    transform: translateX(-4px);
}

.footer-bottom {
    text-align: center;
}

.footer-text {
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
    .header .container,
    .hero,
    .services,
    .about {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nav {
        gap: 1rem;
    }
}

@media (max-width: 680px) {
    .header .container,
    .hero,
    .services,
    .about {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .services-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }
}
