/* UI Fixes Final - Comprehensive Dark Mode Overrides */

/* --- Profile Page Fixes --- */
[data-theme="dark"] .profile-header {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .profile-name {
    color: #ffffff !important;
}

[data-theme="dark"] .profile-username {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .meta-item {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .meta-item i {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .tab-button {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .tab-button.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color) !important;
    background-color: transparent !important;
}

/* --- Weekly Workout Plan Modal/Section Fixes --- */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .wizard-modal-content {
    background-color: #1A1F2E !important;
    color: #ffffff !important;
    border: 1px solid #2D3748 !important;
}

[data-theme="dark"] .day-card {
    background-color: #2D3748 !important;
    border: 1px solid #4A5568 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .day-card.completed {
    background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.8)) !important;
    border-color: #10B981 !important;
}

[data-theme="dark"] .day-name {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .day-date {
    color: #A0AEC0 !important;
}

[data-theme="dark"] .day-stat {
    color: #CBD5E0 !important;
}

/* --- Workout Timer Fixes --- */
[data-theme="dark"] .rest-timer-content {
    background-color: #1A1F2E !important;
    color: #ffffff !important;
}

[data-theme="dark"] .rest-ring-bg {
    stroke: #2D3748 !important;
}

[data-theme="dark"] .rest-ring-animate {
    stroke: var(--primary-color) !important;
}

[data-theme="dark"] .rest-time-remaining {
    color: #ffffff !important;
}

[data-theme="dark"] .rest-subtitle {
    color: #A0AEC0 !important;
}

/* --- Powerlifting Section Fixes --- */
[data-theme="dark"] .powerlifting-container {
    background-color: transparent !important;
}

[data-theme="dark"] .powerlifting-header h2 span {
    color: #ffffff !important;
}

[data-theme="dark"] .day-cycle-info-section,
[data-theme="dark"] .workout-focus-section .workout-notes,
[data-theme="dark"] .workout-user-notes-section .workout-notes,
[data-theme="dark"] .strength-cycle-section .training-maxes,
[data-theme="dark"] .progress-section .progress-tracker,
[data-theme="dark"] .calendar-section .weekly-overview {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .program-timeline {
    background-color: #2D3748 !important;
}

[data-theme="dark"] .timeline-day {
    background-color: #1A1F2E !important;
    color: #ffffff !important;
    border: 1px solid #4A5568 !important;
}

[data-theme="dark"] .timeline-day.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .max-input {
    background-color: #2D3748 !important;
    color: #ffffff !important;
    border: 1px solid #4A5568 !important;
}

/* --- Workout History Fixes --- */
[data-theme="dark"] .feed-post,
[data-theme="dark"] .history-card {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .post-header .post-user-name {
    color: #ffffff !important;
}

[data-theme="dark"] .post-content {
    color: #E2E8F0 !important;
}

[data-theme="dark"] .exercise-summary {
    background-color: #2D3748 !important;
    color: #E2E8F0 !important;
}

/* --- Routines Section Fixes --- */
[data-theme="dark"] .filter-section,
[data-theme="dark"] .routine-filters {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
}

[data-theme="dark"] .category-btn {
    background-color: #2D3748 !important;
    color: #ffffff !important;
    border: 1px solid #4A5568 !important;
}

[data-theme="dark"] .category-btn:hover,
[data-theme="dark"] .category-btn.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .routine-card {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
}

[data-theme="dark"] .routine-card:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .routine-card h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .routine-meta span {
    color: #A0AEC0 !important;
}

/* --- Personality Workout Fixes --- */
[data-theme="dark"] .quick-select-btn {
    background-color: #2D3748 !important;
    color: #ffffff !important;
    border: 1px solid #4A5568 !important;
}

[data-theme="dark"] .quick-select-btn:hover {
    background-color: #4A5568 !important;
}

[data-theme="dark"] .quick-select-btn.selected {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 10px var(--primary-color) !important;
    font-weight: bold !important;
}

/* --- Nutrition Section Complete Redo --- */
[data-theme="dark"] .nutrition-main {
    background-color: var(--bg-body) !important;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .macro-section,
[data-theme="dark"] .water-section,
[data-theme="dark"] .meals-section,
[data-theme="dark"] .generated-meal-card {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .generated-meal-header h4 {
    color: #ffffff !important;
}

[data-theme="dark"] .progress-text {
    color: #A0AEC0 !important;
}

[data-theme="dark"] .date-navigation {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
}

[data-theme="dark"] .current-date {
    color: #ffffff !important;
}

[data-theme="dark"] .date-nav-btn {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .generated-foods li {
    border-bottom: 1px solid #2D3748 !important;
    color: #E2E8F0 !important;
}

[data-theme="dark"] .food-portion {
    color: #A0AEC0 !important;
}

[data-theme="dark"] .macro-item {
    color: #CBD5E0 !important;
}

/* --- Payment Section Fixes --- */
[data-theme="dark"] .pricing-option {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .pricing-option h3 {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .pricing-option .price {
    color: #ffffff !important;
}

[data-theme="dark"] .pricing-option ul li {
    color: #E2E8F0 !important;
}

[data-theme="dark"] #subscription-verification-section {
    background-color: #1A1F2E !important;
    border: 1px solid #2D3748 !important;
}

[data-theme="dark"] #subscription-verification-section h3 {
    color: #ffffff !important;
}

[data-theme="dark"] #subscription-verification-section p {
    color: #A0AEC0 !important;
}
