/* ==================== Navigation ==================== */
.nav-user-mobile {
    display: none;
}

/* ==================== Sessions List ==================== */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.session-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.session-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.session-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.15);
    transform: translateY(-2px);
}

.session-card:hover::before {
    width: 8px;
}

.session-card.completed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: var(--secondary);
}

.session-card.completed::before {
    background: var(--secondary);
}

.session-card.final-review {
    border-color: #ff5722;
    border-width: 3px;
}

.session-card.final-review::before {
    background: #ff5722;
    width: 6px;
}

.session-info {
    flex: 1;
}

.session-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.session-meta {
    display: flex;
    gap: 20px;
    color: #6c757d;
    font-size: 0.95rem;
}

.session-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(108, 117, 125, 0.08);
    border-radius: 20px;
}

.session-actions {
    display: flex;
    gap: 10px;
}

.session-actions .btn {
    min-width: 120px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.session-actions .btn-primary {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    border: none;
}

.session-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #1a73e8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.session-actions .btn-secondary {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    color: white;
}

.session-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.session-actions .btn-danger {
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    border: none;
}

.session-actions .btn-danger:hover {
    background: linear-gradient(135deg, #e64a19 0%, #ff5722 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

/* أيقونات داخل الأزرار */
.session-actions .btn::before {
    margin-left: 8px;
}

.session-actions .btn-primary::before {
    content: '✓';
}

.session-actions .btn-secondary::before {
    content: '✅';
}

.session-actions .btn-danger::before {
    content: '🔥';
}

/* ==================== Dark Mode for Dashboard ==================== */
body.dark-mode .session-card {
    background: linear-gradient(135deg, #2a2a3a 0%, #252535 100%);
    border-color: #3a3a4a;
}

body.dark-mode .session-card:hover {
    background: linear-gradient(135deg, #2f2f3f 0%, #2a2a3a 100%);
    border-color: #5a9fff;
}

body.dark-mode .session-card.completed {
    background: linear-gradient(135deg, #1e3a2e 0%, #2a4a3a 100%);
    border-color: #28a745;
}

body.dark-mode .session-card.final-review {
    background: linear-gradient(135deg, #3a2a2a 0%, #2a1f1f 100%);
    border-color: #ff5722;
    border-width: 3px;
}

body.dark-mode .session-card.final-review::before {
    background: #ff5722;
    width: 6px;
}

body.dark-mode .session-title {
    color: #ffffff;
}

body.dark-mode .session-meta {
    color: #d0d0d0;
}

body.dark-mode .session-meta span {
    background: rgba(255, 255, 255, 0.08);
    color: #d0d0d0;
}

body.dark-mode .session-notes {
    color: #d0d0d0;
}

body.dark-mode .session-type-badge {
    background: rgba(90, 159, 255, 0.2);
    color: #5a9fff;
    border: 1px solid rgba(90, 159, 255, 0.3);
}

body.dark-mode .session-info {
    color: #ffffff;
}

body.dark-mode .session-card::before {
    background: #5a9fff;
}

body.dark-mode .countdown-card {
    background: linear-gradient(135deg, #5a9fff 0%, #4080d0 100%);
}

body.dark-mode .no-sessions {
    color: #d0d0d0;
    background: #2a2a3a;
    border: 2px dashed #3a3a4a;
}

/* Dark Mode - Buttons */
body.dark-mode .session-actions .btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .session-actions .btn-primary {
    background: linear-gradient(135deg, #5a9fff 0%, #4080d0 100%);
}

body.dark-mode .session-actions .btn-primary:hover {
    background: linear-gradient(135deg, #4080d0 0%, #5a9fff 100%);
    box-shadow: 0 4px 12px rgba(90, 159, 255, 0.5);
}

body.dark-mode .session-actions .btn-secondary {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

body.dark-mode .session-actions .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
}

body.dark-mode .session-actions .btn-danger {
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
}

body.dark-mode .session-actions .btn-danger:hover {
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.5);
}

.session-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
}

.session-type-review {
    background: #e3f2fd;
    color: #1976d2;
}

.session-type-intensive {
    background: #fff3e0;
    color: #f57c00;
}

.session-type-exam_prep {
    background: #ffebee;
    color: #c62828;
}

.session-type-light_review {
    background: #f1f8e9;
    color: #558b2f;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--light);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

/* ==================== Courses List ==================== */
.courses-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
}

.course-item {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-item:last-child {
    border-bottom: none;
}

.course-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.course-item label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.course-code {
    font-weight: 600;
    color: var(--primary);
    margin-left: 10px;
}

.course-difficulty {
    display: flex;
    gap: 2px;
}

.difficulty-star {
    color: var(--warning);
    font-size: 0.8rem;
}

/* ==================== Progress Bar ==================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

/* ==================== Settings Page ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.settings-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.settings-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.settings-card .card-header {
    padding: 20px;
    background: linear-gradient(to left, #f8f9fa, #ffffff);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-card .icon-box {
    width: 40px;
    height: 40px;
    background: rgba(26, 115, 232, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.settings-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.settings-card .card-body {
    padding: 24px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.form-control:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    font-size: 1rem;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 0.85rem;
    background: #e9ecef;
    padding: 8px;
    border-radius: 6px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* ==================== Footer ==================== */
.site-footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.footer-brand p {
    color: #a0a0b0;
    line-height: 1.6;
    max-width: 400px;
}

.footer-links h4,
.footer-legal h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-legal h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-legal a {
    color: #a0a0b0;
    text-decoration: none;
    transition: color 0.3s ease, padding-right 0.3s ease;
    display: inline-block;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: var(--primary);
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Dark Mode Adjustments for Settings & Footer */
body.dark-mode .settings-card {
    background: #2a2a3a;
    border-color: #3a3a4a;
}

body.dark-mode .settings-card .card-header {
    background: linear-gradient(to left, #2f2f3f, #2a2a3a);
    border-bottom-color: #3a3a4a;
}

body.dark-mode .settings-card h3 {
    color: #fff;
}

body.dark-mode .form-control {
    background: #1a1a2e;
    border-color: #3a3a4a;
    color: #fff;
}

body.dark-mode .form-control:focus {
    border-color: var(--primary);
}

body.dark-mode .form-hint {
    background: #1a1a2e;
    color: #a0a0b0;
}

body.dark-mode .site-footer {
    background: #0f0f1a;
}

@media (max-width: 768px) {
    .nav-user-mobile {
        display: block;
    }

    .session-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .session-actions {
        width: 100%;
    }
    
    .session-actions .btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .nav-link {
        justify-content: flex-start;
        padding: 12px 15px;
    }

    .nav-link .icon {
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand h3,
    .footer-links h4,
    .footer-legal h4 {
        justify-content: center;
    }

    .footer-links h4::after,
    .footer-legal h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-brand p {
        margin: 0 auto;
    }
}
