:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97bc62;
    --accent-color: #f0f7da;
    --light-color: #f9f9f9;
    --dark-color: #1e3a1e;
    --text-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* رأس الصفحة */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    color: var(--secondary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

nav a:hover, nav a.active {
    background-color: var(--secondary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu a {
    color: white;
    text-decoration: none;
}

.user-menu span {
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* الأزرار */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #7aa04a;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: #333;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* قسم البطل */
.hero {
    background: linear-gradient(to right, var(--primary-color), var(--dark-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* المميزات */
.features {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* التذييل */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* صفحات الداخلية */
.page-container {
    min-height: 60vh;
    padding: 3rem 0;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.main-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.content-header h2 {
    color: var(--primary-color);
}

/* نماذج */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(151, 188, 98, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* الرسائل */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* الجداول */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 700;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* البطاقات */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* صفحة الاختبارات */
.quiz-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.quiz-question {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.quiz-options {
    margin-top: 15px;
}

.quiz-option {
    margin-bottom: 10px;
    padding: 12px 15px;
    background-color: var(--accent-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.quiz-option:hover {
    background-color: #e0edc5;
}

.quiz-option input {
    margin-left: 10px;
}

/* صفحة تسجيل الدخول */
.login-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--primary-color);
}

.user-type-selector {
    display: flex;
    margin-bottom: 30px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.user-type {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-type.active {
    background-color: var(--primary-color);
    color: white;
}

/* تصميم متجاوب */
@media (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        margin-bottom: 30px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--primary-color);
        width: 100%;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        z-index: 1000;
    }
    
    nav ul.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-menu span {
        display: none;
    }
}

@media (max-width: 576px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .action-btns {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* صفحة الطلاب */
.student-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.progress-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

/* صفحة الملف الشخصي */
.profile-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    text-align: center;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 4rem;
    color: var(--primary-color);
}

.profile-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
}