/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --transition: all 0.3s ease;
    --font-family: 'Vazirmatn', 'Vazir', 'Tanha', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.site-title {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.site-subtitle {
    font-size: 1rem;
    color: var(--gray-color);
    font-weight: 400;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--gray-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.875rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    color: white;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Subjects Section */
.subjects {
    padding: 40px 20px;
}

.subjects h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.subject-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.category {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.category h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.category ul {
    list-style-type: none;
}

.category li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.category li:before {
    content: "📚";
    margin-left: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 2px solid var(--light-gray);
    color: var(--gray-color);
}

.footer-note {
    font-size: 0.875rem;
    margin-top: 10px;
    opacity: 0.8;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-color);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-color);
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #fde8e8;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* Dashboard */
.dashboard {
    padding: 20px;
}

.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.welcome-section p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.recent-notes .note-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-notes .note-item:last-child {
    border-bottom: none;
}

.recent-notes .note-item h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.recent-notes .note-item p {
    color: var(--gray-color);
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.subject-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.subject-category h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.subject-category ul {
    list-style-type: none;
}

.subject-category li {
    padding: 8px 0;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
}

.subject-category li:before {
    content: "📖";
    margin-left: 8px;
}

.quick-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.user-info:hover {
    background-color: var(--light-gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.user-menu:hover .menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: block;
    padding: 10px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.menu-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.menu-item.active {
    background-color: var(--light-color);
    color: var(--primary-color);
    font-weight: 500;
}

.menu-item.admin-link {
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
}

.menu-item.logout {
    color: var(--danger-color);
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
}

/* Change Password */
.change-password-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.change-password-box {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.change-password-header {
    text-align: center;
    margin-bottom: 30px;
}

.change-password-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.change-password-form .form-group {
    margin-bottom: 20px;
}

.change-password-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-color);
    font-weight: 500;
}

.change-password-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.change-password-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.change-password-footer {
    text-align: center;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .subject-categories {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .login-box {
        padding: 30px 20px;
    }

    .change-password-box {
        padding: 30px 20px;
    }
}