/* ============================================
   WORKOUTS PAGE STYLES
   ============================================ */

/* Workouts Header */
.workouts-header {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 80px 0 60px;
    overflow: hidden;
    border-bottom: 2px solid rgba(220, 38, 38, 0.3);
}

.workouts-welcome {
    position: relative;
    z-index: 2;
}

.workouts-welcome h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}

.workouts-welcome p {
    font-size: 1.2rem;
    color: #b0b0b0;
    max-width: 600px;
}

/* Workout Controls */
.workout-controls {
    background: #1a1a1a;
    padding: 2rem 0;
    border-bottom: 1px solid #333;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.view-toggles {
    display: flex;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.view-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: #b0b0b0;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.view-btn:hover:not(.active) {
    background: #3a3a3a;
    color: white;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    width: 40px;
    height: 40px;
    background: #2a2a2a;
    border: none;
    border-radius: 8px;
    color: #b0b0b0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #dc2626;
    color: white;
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.current-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    min-width: 200px;
    text-align: center;
}

.workout-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    padding: 12px 20px;
    background: #2a2a2a;
    border: 1px solid #404040;
    color: #b0b0b0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #3a3a3a;
    color: white;
    border-color: #dc2626;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

/* Workout Content */
.workout-content {
    padding: 2rem 0 4rem;
    background: #0f0f0f;
    min-height: 600px;
}

.workout-view {
    display: none;
}

.workout-view.active {
    display: block;
}

/* ============================================
   DAY VIEW STYLES
   ============================================ */

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.day-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

.day-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.2rem;
    color: #dc2626;
    font-weight: 700;
}

.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exercise-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.exercise-card:hover {
    border-color: #dc2626;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.exercise-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

.exercise-type {
    padding: 6px 12px;
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.sets-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.set-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.set-row:hover {
    background: rgba(220, 38, 38, 0.1);
}

.set-row.highlight {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
}

.set-label {
    font-weight: 600;
    color: #b0b0b0;
}

.set-data {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.set-rpe {
    color: #dc2626;
    font-weight: 600;
    text-align: right;
}

.exercise-notes {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #dc2626;
}

.exercise-notes p {
    color: #b0b0b0;
    margin: 0;
}

.exercise-actions {
    display: flex;
    gap: 1rem;
}

.log-btn, .video-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.log-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.log-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.video-btn {
    background: #2a2a2a;
    color: #b0b0b0;
    border: 1px solid #404040;
}

.video-btn:hover {
    background: #3a3a3a;
    color: white;
}

/* ============================================
   WEEK VIEW STYLES
   ============================================ */

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.week-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

.week-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transition: width 0.3s ease;
}

.progress-text {
    color: #b0b0b0;
    font-weight: 500;
}

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

.day-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.day-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.day-card.completed {
    border-color: #22c55e;
}

.day-card.current {
    border-color: #dc2626;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
}

.day-card.upcoming {
    border-color: #3b82f6;
}

.day-card.rest {
    border-color: #64748b;
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
}

.day-card .day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #404040;
}

.day-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-badge.current {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.status-badge.upcoming {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-badge.rest {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

.day-summary h4 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.5rem;
}

.exercise-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.exercise-list li {
    color: #b0b0b0;
    padding: 4px 0;
    font-size: 0.9rem;
}

.day-card .day-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #b0b0b0;
    border-top: 1px solid #404040;
    padding-top: 0.5rem;
}

/* ============================================
   MONTH VIEW STYLES
   ============================================ */

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.month-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

.month-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc2626;
}

.stat-label {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.month-calendar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1rem;
}

.day-name {
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.calendar-day:hover {
    background: #3a3a3a;
}

.calendar-day.other-month {
    opacity: 0.3;
    background: #1a1a1a;
}

.calendar-day.current {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    font-weight: 700;
}

.calendar-day.workout {
    border: 2px solid #404040;
}

.calendar-day.workout.completed {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.calendar-day.workout.missed {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.calendar-day.workout.upcoming {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.calendar-day.rest {
    background: #1f1f1f;
    border: 2px solid #64748b;
}

.calendar-day.holiday {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.workout-type {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.calendar-day.upper .workout-type {
    color: #3b82f6;
}

.calendar-day.lower .workout-type {
    color: #22c55e;
}

.calendar-day.recovery .workout-type {
    color: #f59e0b;
}

.calendar-day.deload .workout-type {
    color: #8b5cf6;
}

.calendar-day.rest .workout-type {
    color: #64748b;
}

.month-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.upper {
    background: #3b82f6;
}

.legend-color.lower {
    background: #22c55e;
}

.legend-color.recovery {
    background: #f59e0b;
}

.legend-color.deload {
    background: #8b5cf6;
}

.legend-color.rest {
    background: #64748b;
}

.legend-item span {
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .workouts-welcome h1 {
        font-size: 2.5rem;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggles,
    .date-navigation,
    .workout-actions {
        justify-content: center;
    }

    .day-header,
    .week-header,
    .month-header {
        flex-direction: column;
        gap: 1rem;
    }

    .week-grid {
        grid-template-columns: 1fr;
    }

    .month-stats {
        flex-direction: row;
        gap: 1rem;
    }

    .calendar-header,
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-day {
        padding: 4px;
        font-size: 0.8rem;
    }

    .month-legend {
        gap: 1rem;
    }

    .exercise-actions {
        flex-direction: column;
    }

    .set-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }
}
