/* NargesFit - Main Stylesheet */
/* Color Palette: #CD2C58, #E06B80, #FFE6D4, #FFFFFF */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #CD2C58;
    --accent: #E06B80;
    --soft-bg: #FFE6D4;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border: #f0f0f0;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: var(--soft-bg);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--accent);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--soft-bg);
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-dark);
    font-weight: 500;
}

.btn-logout {
    padding: 0.5rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(205, 44, 88, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(205, 44, 88, 0.15);
    transform: translateY(-3px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--soft-bg);
}

.card-title {
    font-size: 1.5rem;
    margin: 0;
}

/* Exercise Card */
.exercise-card {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.exercise-thumb {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.exercise-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(205, 44, 88, 0.3);
}

.exercise-info {
    flex: 1;
}

.exercise-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.exercise-desc {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.exercise-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--soft-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.meta-icon {
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #b02449;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(205, 44, 88, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-secondary {
    background: var(--accent);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-done {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    background: var(--primary);
    color: white;
}

.btn-done:hover:not(:disabled) {
    background: #b02449;
}

.btn-done:disabled {
    background: var(--success);
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-done.completed {
    background: var(--success);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(205, 44, 88, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--soft-bg);
    color: var(--primary);
    font-weight: 600;
}

.table tr:hover {
    background: rgba(255, 230, 212, 0.3);
}

/* Day Tabs */
.day-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.day-tab {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--soft-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
}

.day-tab:hover {
    border-color: var(--accent);
}

.day-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
}

/* Footer */
.main-footer {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-text {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Modal/Lightbox */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    background: transparent;
}

.modal-close {
    position: absolute;
    top: -40px;
    left: 0;
    background: white;
    color: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.modal-media {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

.modal-media video {
    max-width: 95vw;
    max-height: 90vh;
}

/* Prevent scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    background: var(--soft-bg);
    color: var(--primary);
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-info {
    background: var(--soft-bg);
    color: var(--primary);
    border: 1px solid var(--accent);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary);
}

.spinner {
    border: 4px solid var(--soft-bg);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.75rem;
    min-width: 60px;
}

.mobile-nav-item i {
    font-size: 1.5rem;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .main-header .nav-menu {
        display: none;
    }

    .main-header .user-info {
        display: none;
    }

    .header-content {
        padding: 1rem;
        justify-content: center;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Show mobile bottom nav */
    .mobile-bottom-nav {
        display: block;
    }

    /* Add padding to body for bottom nav */
    body {
        padding-bottom: 70px;
    }

    .main-content {
        padding-bottom: 1rem;
    }

    .exercise-card {
        flex-direction: column;
    }

    .exercise-thumb {
        width: 100%;
        height: 200px;
    }

    .day-tabs {
        flex-wrap: wrap;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .schedule-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .nav-menu {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
