* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root[data-theme="light"] {
    --head-color: rgba(255, 255, 255, 0.95);
    --primary-color: #333;
    --red-color: #e74c3c;
    --home-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --slateblue: #666;
    --feature: rgba(255, 255, 255, 0.9);
    --Soft-white: rgba(255, 255, 255, 0.8);
    --Light-blue: rgba(102, 126, 234, 0.1);
    --Light-black: rgba(0, 0, 0, 0.15);
    --Soft-shadow-black: rgba(0, 0, 0, 0.05);
    --Soft-gray: #ddd;
    --Glass-blue: rgba(102, 126, 234, 0.4);
    --box-shadow: rgba(0, 0, 0, 0.1);
    --Lavender-color: rgba(118, 75, 162, 0.1);
    --blue-color: #667eea;
    --main-color: rgba(255, 255, 255, 0.2);
    --linear-color: #764ba2;
    --error-message: #ff6b6b;
    --success-message: #51cf66;
}

:root[data-theme="dark"] {
    --bgi: #fff;
    --head-color: #474747;
    --primary-color: #fff;
    --slateblue: #ddd;
    ;
    --feature: #908f8f;
    --Soft-white: #333;
    --home-color: linear-gradient(135deg, #646466 0%, #000000 100%);
    --blue-color: #aca8a8;
    --linear-color: #757575;
    --Light-blue: rgba(100, 120, 220, 0.3);
    --Light-black: rgba(30, 30, 30, 0.6);
    --Soft-shadow-black: rgba(255, 255, 255, 0.05);
    --Soft-gray: #444;
    --Glass-blue: rgba(90, 110, 220, 0.6);
    --box-shadow: rgba(0, 0, 0, 0.3);
    --Lavender-color: rgba(110, 60, 150, 0.4);
    --main-color: rgba(255, 255, 255, 0.1);
    --red-color: #d8433e;
    --error-message: #cc3f3f;
    --success-message: #3fa34d;
}

body {
    font-family: "Arial", sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background: var(--home-color);
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--head-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--main-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--box-shadow);
}

.logo-img img {
    background-color: var(--bgi);
    border-radius: 5px;
}

/* تنسيق زر تبديل الثيم */
.theme-toggle {
    background: var(--main-color);
    border: 1px solid var(--Soft-gray);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-left: 1rem;
    color: var(--primary-color);
}

.theme-toggle:hover {
    background: var(--Light-blue);
    transform: scale(1.1);
    color: var(--blue-color);
}

.theme-toggle span {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* إظهار وإخفاء الأيقونات حسب الثيم */
[data-theme="light"] .dark-icon,
[data-theme="dark"] .light-icon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

[data-theme="light"] .light-icon,
[data-theme="dark"] .dark-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* تأثيرات إضافية */
.theme-toggle {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 900;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--Light-blue);
    color: var(--blue-color);
    transform: translateY(-2px);
}

.nav-link.admin {
    color: var(--red-color);
    border: 2px solid var(--red-color);
}

.nav-link.admin:hover {
    background: var(--red-color);
    color: white;
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Main Content */
.main {
    margin-top: 100px;
    padding: 2rem 0;
}

.content-section {
    background: var(--head-color);
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--box-shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--main-color);
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    color: var(--blue-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--blue-color), var(--linear-color));
    margin: 0.5rem auto;
    border-radius: 2px;
}

.card {
    background: var(--Soft-white);
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 10px;
    border-right: 4px solid var(--blue-color);
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--Light-black);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--slateblue);
    line-height: 1.6;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--Soft-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--feature);
    text-align: center;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-color);
    box-shadow: 0 0 0 3px var(--Light-blue);
}

.form-group ul,
li {
    display: flex;
    list-style: none;
    flex-wrap: nowrap;
    flex-direction: column;
}


textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn {
    background: linear-gradient(45deg, var(--blue-color), var(--linear-color));
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--Glass-blue);
}

/* Admin Panel */
.admin-login {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.admin-panel {
    display: none;
}

.admin-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.admin-card {
    background: var(--feature);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-3px);
}

.admin-card h4 {
    color: var(--blue-color);
    margin-bottom: 1rem;
}

/* Home Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg,
            var(--Light-blue),
            var(--Lavender-color));
    border-radius: 15px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--blue-color), var(--linear-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--slateblue);
    margin-bottom: 2rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--feature);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--box-shadow);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--Light-black);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--head-color);
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 27px var(--Soft-shadow-black);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
        z-index: 1000;
        display: flex;
        /* تأكد من أنها Flex لتظهر العناصر عمودياً */
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features {
        display: grid;
        grid-template-columns: 1fr;
        /* جعل العناصر تحت بعضها في الجوال */
        gap: 20px;
    }

    .container {
        padding: 0 1rem;
    }
}

.logout-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 15px;
    direction: rtl;
    /* دعم RTL */
}

.logout-item {

    color: black;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    /* يمكن إضافة flex-basis أو width/height هنا بناءً على الحاجة */
}

.error-message {
    background: var(--error-message);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    display: none;
}

.alert-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-message.dismissed {
    display: none;
}

.alert-message.success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #28A745;
}

.alert-message.info {
    background-color: #EBF8FF;
    color: #2B6CB0;
    border: 1px solid #3B82F6;
}

.alert-message.secondary {
    background-color: #EBF2F7;
    color: #4A5568;
    border: 1px solid #A0AEC0;
}