/* طراحی مدرن و کامل برای تمام صفحات */

/* ============================================
   Variables & Root Styles
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    font-size: 16px;
}

body {
    font-family: 'Yekan Bakh FaNum', 'Tahoma', Arial, sans-serif !important;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* ============================================
   Header Styles
   ============================================ */
/* ============================================
   Header Styles
   ============================================ */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 900;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

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

.logo-img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 2rem;
    height: 2rem;
    justify-content: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    min-height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Yekan Bakh FaNum', 'Tahoma', Arial, sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'Yekan Bakh FaNum', 'Tahoma', Arial, sans-serif;
    transition: all 0.2s;
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: #065f46;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: #991b1b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
    color: #1e40af;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: #92400e;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    max-width: 450px;
    width: 100%;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.auth-links a {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Course Pages
   ============================================ */
.courses-page {
    padding: 2rem 0;
}

.courses-filter {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.courses-filter form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.courses-filter input,
.courses-filter select {
    flex: 1;
    min-width: 200px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.course-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.course-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}

.course-detail-page {
    padding: 2rem 0;
}

.course-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.course-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.course-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.lessons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.lesson-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
}

.lesson-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.lesson-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.lesson-item:hover::before {
    opacity: 1;
}

.lesson-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.lesson-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.lesson-status.incomplete {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

/* ============================================
   Lesson Page
   ============================================ */
.lesson-page {
    padding: 2rem 0;
}

.lesson-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.lesson-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.lesson-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.lesson-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.lesson-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.lesson-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-height: 300px;
}

.lesson-content .prose {
    direction: rtl;
    text-align: right;
    line-height: 1.8;
}

.lesson-content .prose h1,
.lesson-content .prose h2,
.lesson-content .prose h3,
.lesson-content .prose h4,
.lesson-content .prose h5,
.lesson-content .prose h6 {
    direction: rtl;
    text-align: right;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 900;
}

.lesson-content .prose p {
    direction: rtl;
    text-align: right;
    margin-bottom: 1.5rem;
}

.lesson-content .prose ul,
.lesson-content .prose ol {
    direction: rtl;
    text-align: right;
    padding-right: 2rem;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.lesson-content .prose li {
    margin-bottom: 0.5rem;
}

.lesson-content .prose blockquote {
    direction: rtl;
    text-align: right;
    border-right: 4px solid var(--primary);
    border-left: none;
    padding-right: 1rem;
    padding-left: 0;
    margin: 2rem 0;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius);
    font-style: italic;
}

.lesson-content .prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem auto;
    display: block;
}

.lesson-content .prose code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.lesson-content .prose pre {
    background: var(--text-primary);
    color: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.lesson-actions {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   User Dashboard
   ============================================ */
.user-dashboard {
    padding: 2rem 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stats .stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.dashboard-stats .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dashboard-stats .stat-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.dashboard-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
}

.dashboard-sections {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.dashboard-sections h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.courses-list {
    display: grid;
    gap: 1rem;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.course-item h4 {
    margin: 0;
    font-size: 1.125rem;
}

/* ============================================
   Cart & Checkout
   ============================================ */
.cart-page,
.checkout-page {
    padding: 2rem 0;
}

.cart-items,
.checkout-items {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.cart-item,
.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child,
.checkout-item:last-child {
    border-bottom: none;
}

.cart-summary,
.checkout-summary {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 900;
    font-size: 1.125rem;
}

/* ============================================
   Static Pages
   ============================================ */
.page-content {
    padding: 2rem 0;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.page-body {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    line-height: 1.8;
}

.page-body p {
    margin-bottom: 1.5rem;
}

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

/* ============================================
   Footer
   ============================================ */
.main-footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

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

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 5px;
    transition: background 0.3s ease;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero-pattern-overlay {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.hero-image {
    border-radius: var(--radius-2xl);
    transition: transform 0.3s;
}

.hero-image:hover {
    transform: scale(1.02);
}

.hero-fallback {
    display: none;
}

.hero-fallback-star-delay {
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Responsive Design
   ============================================ */
/* ============================================
   Mobile Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    /* Header در موبایل ساده‌تر می‌شود */
    .main-header {
        padding: 0.75rem 0;
    }
    
    .main-header .container {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .logo-link {
        font-size: 1rem;
    }
    
    .logo-img {
        height: 2rem;
    }
    
    /* مخفی کردن منوی اصلی در موبایل (چون bottom nav داریم) */
    .main-nav {
        display: none;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .user-name {
        display: none; /* مخفی کردن نام کاربر در موبایل */
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        padding: 0.5rem !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background: #1f2937 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        min-height: 3px !important;
    }
    
    /* بهبود spacing برای bottom nav */
    main {
        padding-bottom: 80px; /* فاصله برای bottom nav */
    }
    /* Header در موبایل ساده‌تر می‌شود */
    .main-header {
        padding: 0.5rem 0;
    }
    
    .main-header .container {
        padding: 0 1rem;
        gap: 0.75rem;
    }
    
    .logo-link {
        font-size: 1rem;
    }
    
    .logo-img {
        height: 2rem;
    }
    
    /* منوی موبایل */
    .main-nav {
        display: none !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        transition: right 0.3s ease;
        padding: 4rem 1.5rem 2rem;
        overflow-y: auto;
        direction: rtl;
    }
    
    .main-nav.active {
        right: 0;
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-nav .nav-link {
        padding: 1rem;
        border-radius: 8px;
        text-decoration: none;
        color: #1f2937;
        font-weight: 600;
        transition: all 0.3s;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .main-nav .nav-link:hover,
    .main-nav .nav-link.active {
        background: #f3f4f6;
        color: #6366f1;
    }
    
    /* Overlay برای بستن منو */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .user-name {
        display: none; /* مخفی کردن نام کاربر در موبایل */
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        padding: 0.5rem !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background: #1f2937 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        min-height: 3px !important;
    }
    
    /* بهبود spacing برای bottom nav */
    main {
        padding-bottom: 80px !important; /* فاصله برای bottom nav */
    }
    
    body {
        padding-bottom: 80px; /* فاصله برای bottom nav */
    }
    
    .courses-grid,
    .lessons-list {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .course-header h1,
    .lesson-header h1 {
        font-size: 1.5rem;
    }
    
    .course-description,
    .lesson-description {
        font-size: 1rem;
    }
    
    .lesson-actions {
        flex-direction: column;
    }
    
    .lesson-actions > div {
        width: 100%;
    }
    
    .lesson-actions button,
    .lesson-actions a {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .courses-filter form {
        flex-direction: column;
    }
    
    .courses-filter input,
    .courses-filter select {
        width: 100%;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .course-header,
    .lesson-header {
        padding: 1.5rem;
    }
    
    .lesson-content {
        padding: 1.5rem;
    }
}

/* ============================================
   Bottom Navigation Bar - Mobile App Style
   ============================================ */
.bottom-nav {
    display: none; /* پیش‌فرض مخفی - فقط در موبایل نمایش داده می‌شود */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    direction: rtl;
    justify-content: space-around;
    align-items: center;
    height: 70px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 4px;
    min-width: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-item:hover {
    color: #6366f1;
}

.bottom-nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.bottom-nav-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.bottom-nav-item.active {
    color: #6366f1;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* انیمیشن برای تغییر صفحه */
.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item.active::before {
    transform: scaleX(1);
}

/* نمایش فقط در موبایل */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
    }
    
    body {
        padding-bottom: 80px !important;
    }
    
    main {
        padding-bottom: 80px !important;
    }
}

/* برای تبلت و دسکتاپ مخفی می‌شود */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    main {
        padding-bottom: 0 !important;
    }
}

/* بهبود برای صفحه‌های لمسی */
@media (hover: none) and (pointer: coarse) {
    .bottom-nav-item {
        padding: 12px 4px;
    }
    
    .bottom-nav-icon {
        font-size: 26px;
    }
    
    .bottom-nav-label {
        font-size: 12px;
    }
}

/* Safe area برای iPhone X و بالاتر */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}
