/* BoxFit Pro - Additional Styles */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #DC2626;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B91C1C;
}

/* Loading animations */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #DC2626;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for active elements */
.pulse-red {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Exercise card hover effects */
.exercise-card {
    transition: all 0.3s ease;
}

.exercise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B91C1C, #991B1B);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Progress bar animation */
.progress-bar-animated {
    background: linear-gradient(90deg, #F59E0B, #FBBF24, #F59E0B);
    background-size: 200% 100%;
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress card animations */
.progress-card {
    transition: all 0.3s ease;
}

.progress-card:hover {
    transform: translateY(-2px);
}

.progress-bar-fill {
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Weekly progress chart styles */
.weekly-progress-day {
    transition: all 0.3s ease;
}

.weekly-progress-day:hover {
    transform: scale(1.05);
}

/* Custom progress indicators */
.progress-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--progress-color) 0%, var(--progress-color) var(--progress-percent), #e5e7eb var(--progress-percent), #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-ring::before {
    content: '';
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    position: absolute;
}

.progress-ring-text {
    position: relative;
    z-index: 1;
    font-weight: bold;
    font-size: 0.75rem;
}

/* Achievement card styles */
.achievement-card {
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: scale(1.02);
}

/* Schedule day highlight */
.schedule-day {
    transition: all 0.3s ease;
}

.schedule-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modal animations */
#exercise-modal {
    backdrop-filter: blur(4px);
}

#exercise-modal > div {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Search input with icon styling */
.search-input-container {
    position: relative;
}

.search-input-container input:focus + .search-icon {
    color: #DC2626;
}

/* Enhanced select styling */
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .grid {
        gap: 1rem;
    }
    
    .exercise-card {
        margin-bottom: 1rem;
    }
    
    /* Exercises section mobile optimizations */
    #exercises .bg-white {
        margin: 0 -1rem;
        border-radius: 0;
        border-radius: 1rem 1rem 0 0;
    }
    
    /* Search controls on mobile */
    #category-filter,
    #search-exercises {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Workout intensity indicators */
.intensity-1::after { content: "⭐"; }
.intensity-2::after { content: "⭐⭐"; }
.intensity-3::after { content: "⭐⭐⭐"; }
.intensity-4::after { content: "⭐⭐⭐⭐"; }
.intensity-5::after { content: "⭐⭐⭐⭐⭐"; }

/* Category badges */
.category-strength { 
    background: linear-gradient(135deg, #3B82F6, #1E40AF);
    color: white;
}

.category-plyometric { 
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: white;
}

.category-core { 
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.category-recovery { 
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.category-rotational { 
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

/* Streak fire animation */
.streak-fire {
    animation: fireFlicker 1.5s infinite alternate;
}

@keyframes fireFlicker {
    0% { transform: scale(1) rotate(-1deg); }
    100% { transform: scale(1.1) rotate(1deg); }
}

/* Workout day selector styles */
.workout-day-btn {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.workout-day-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.workout-day-btn.active {
    border-color: #DC2626;
}

/* Workout timer styles */
.timer-display {
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.timer-controls button {
    transition: all 0.3s ease;
}

.timer-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Success message animation */
.success-message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Workout progress indicators */
.workout-stat {
    transition: all 0.3s ease;
}

.workout-stat:hover {
    transform: scale(1.05);
}

/* Mobile navigation */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #1F2937;
        z-index: 100;
        padding: 1rem;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #9CA3AF;
        text-decoration: none;
        font-size: 0.75rem;
        transition: color 0.3s ease;
    }
    
    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: #F59E0B;
    }
    
    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .timer-display {
        font-size: 3rem !important;
    }
}