/* Anis's Workout Dashboard - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    line-height: 1.6;
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
    color: #ffc107;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-bottom: none;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Gradient Cards */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #4dabf7);
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color), #51cf66);
}

.bg-gradient-info {
    background: linear-gradient(135deg, var(--info-color), #74c0fc);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning-color), #ffe066);
}

/* Dashboard Specific Styles */
.superset-preview .badge {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.goals-list {
    max-height: 200px;
    overflow-y: auto;
}

.muscle-frequency-list {
    max-height: 300px;
    overflow-y: auto;
}

.muscle-group-breakdown {
    max-height: 250px;
    overflow-y: auto;
}

/* Recommendation Cards */
.recommendation-card {
    transition: all 0.3s ease;
    position: relative;
}

.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recommendation-icon {
    font-size: 1.5rem;
}

/* Progress and Charts */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Exercise Analysis */
.analysis-content {
    width: 100%;
}

.muscle-frequency-list .progress {
    height: 6px;
}

/* Badges and Tags */
.badge {
    font-size: 0.8rem;
    padding: 0.5em 0.8em;
    border-radius: 8px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover {
    transform: translateY(-1px);
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Modal Enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: none;
    border-radius: 0 0 12px 12px;
}

/* Code and Pre formatting */
pre {
    border-radius: 8px;
    font-size: 0.85rem;
}

code {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

/* Footer */
footer {
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .h4 {
        font-size: 1.25rem;
    }
    
    .muscle-frequency-list,
    .muscle-group-breakdown {
        max-height: 200px;
    }
    
    .recommendation-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .btn-group .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Workout-specific styles */
.workout-preview {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

.workout-preview h3,
.workout-preview h5,
.workout-preview h6 {
    margin-bottom: 0.5rem;
}

.workout-preview ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.workout-preview li {
    margin-bottom: 0.25rem;
}

/* Balance Score Styling */
.balance-score-card {
    text-align: center;
    transition: all 0.3s ease;
}

.balance-score-card:hover {
    transform: scale(1.05);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(13, 110, 253, 0.25);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

/* Custom Scrollbar */
.muscle-frequency-list::-webkit-scrollbar,
.muscle-group-breakdown::-webkit-scrollbar,
.goals-list::-webkit-scrollbar {
    width: 6px;
}

.muscle-frequency-list::-webkit-scrollbar-track,
.muscle-group-breakdown::-webkit-scrollbar-track,
.goals-list::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 3px;
}

.muscle-frequency-list::-webkit-scrollbar-thumb,
.muscle-group-breakdown::-webkit-scrollbar-thumb,
.goals-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.muscle-frequency-list::-webkit-scrollbar-thumb:hover,
.muscle-group-breakdown::-webkit-scrollbar-thumb:hover,
.goals-list::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}