html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* { 
    box-sizing: border-box; 
}

.page-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}



/* Filter Section */
.filter-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.filter-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-group:last-child {
    margin-bottom: 0;
    border-top: 1px solid #f3f4f6;
    padding-top: 15px;
}

.filter-label {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter-btn input[type="checkbox"] {
    accent-color: #008B74;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #e6f4f1;
    color: #008B74;
    border-color: #008B74;
}

.count-badge {
    background: #f3f4f6;
    color: #4b5563;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.filter-btn.active .count-badge, .filter-btn:hover .count-badge {
    background: #008B74;
    color: #ffffff;
}

.filter-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.clear-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.clear-btn:hover { 
    background: #fecaca; 
}

/* Mobile Sticky Filter Trigger Button */
.mobile-filter-trigger {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #008B74;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0,139,116,0.4);
}

/* Mobile Bottom Sheet Modal */
.mobile-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-filter-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 25px 20px;
    z-index: 99999;
    transition: bottom 0.3s cubic-bezier(0.1, 1, 0.1, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.mobile-filter-sheet.open { 
    bottom: 0 !important; 
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.sheet-header h3 { 
    font-size: 18px; 
    font-weight: 700; 
    color: #111827; 
    margin: 0; 
}

.sheet-close-btn {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

.sheet-body { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    margin-bottom: 20px; 
}

.sheet-section-title { 
    font-size: 14px; 
    font-weight: 700; 
    color: #374151; 
    margin-bottom: 8px; 
}

.sheet-chips { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.sheet-footer { 
    display: flex; 
    gap: 10px; 
}

.sheet-apply-btn {
    flex: 1;
    background: #008B74;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

/* Layout */
.content-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 35px;
    align-items: start;
}

.sidebar-list {
    max-height: 750px;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-list::-webkit-scrollbar { width: 6px; }
.sidebar-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

.exercise-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.exercise-card:hover { border-color: #008B74; transform: translateY(-1px); }
.exercise-card.active { background: #e6f4f1; border-color: #008B74; box-shadow: 0 4px 12px rgba(0, 139, 116, 0.1); }

.exercise-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f3f4f6;
    flex-shrink: 0;
}

.exercise-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.exercise-info span { font-size: 12px; color: #6b7280; display: block; }

/* Details Pane */
.details-pane {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.back-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    color: #111827;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    text-decoration: none;
}

.media-box {
    width: 100%;
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-box video, .media-box img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

.details-pane h2 { font-size: 26px; font-weight: 700; color: #111827; margin-bottom: 15px; }

.badges {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.badge {
    background: #f3f4f6;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge i { color: #008B74; }

.instructions-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.steps-list {
    list-style-type: decimal;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.steps-list li { font-size: 14px; color: #4b5563; line-height: 1.7; }

.no-data { text-align: center; padding: 60px 20px; color: #6b7280; font-size: 16px; }

@media (max-width: 768px) {
    .page-wrapper { padding: 0 12px; margin: 15px auto; }
    .filter-container { display: none !important; }
    .mobile-filter-trigger { display: flex !important; }
    .content-layout { display: block !important; }
}