/* FitFuel.AI - Modern Fitness App Styling */

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --gradient-bg: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-color);
}

/* Header & Navigation */
.navbar {
    background: var(--gradient-bg);
    box-shadow: 0 2px 20px rgba(99, 102, 241, 0.1);
    padding: 1rem 0;
}

.navbar-nav {
    align-items: center;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 0.75rem;
    padding: 0.5rem 0.75rem !important;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: var(--gradient-bg);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: var(--gradient-bg);
    color: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-bg);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-select {
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

/* Intake Form Specific */
.intake-container {
    max-width: 800px;
    margin: 2rem auto;
}

.form-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.toggle-section {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.toggle-section:hover {
    text-decoration: underline;
}

/* Dashboard Stats */
.stats-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.stats-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Macro Breakdown */
.macro-bar {
    height: 20px;
    border-radius: 10px;
    background-color: var(--border-color);
    overflow: hidden;
    margin-bottom: 1rem;
}

.macro-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.protein-fill { background-color: #ef4444; }
.carbs-fill { background-color: #3b82f6; }
.fats-fill { background-color: #f59e0b; }

.macro-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

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

.macro-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
}

/* Meal Plan */
.meal-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.meal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.meal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.meal-macros {
    display: flex;
    justify-content: space-around;
    background-color: var(--light-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.meal-macro {
    text-align: center;
}

.meal-macro-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.meal-macro-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Charts */
.chart-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

/* Barcode Scanner */
.scanner-container {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.scanner-video {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
}

/* Grocery List */
.grocery-list {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.grocery-category {
    margin-bottom: 2rem;
}

.grocery-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.grocery-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.grocery-item:hover {
    background-color: var(--light-color);
}

.grocery-item:last-child {
    border-bottom: none;
}

.grocery-item-name {
    font-weight: 600;
}

.grocery-item-quantity {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .stats-value {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .meal-macros {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Utilities */
.text-gradient {
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-lg {
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.bg-gradient {
    background: var(--gradient-bg);
}

/* Photo upload styling */
.photo-upload-box {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.photo-upload-box:hover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.photo-upload-box.has-image {
    border-color: var(--success-color);
    background: #f1f8e9;
}

.photo-preview {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 400px;
    position: relative;
}

.photo-preview img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.photo-preview .remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Competition mode styling */
.competition-mode-active {
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

/* Health tracking ranges */
.form-range {
    height: 6px;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Enhanced modal sizing */
.modal-xl {
    max-width: 1200px;
}

/* Health tracking section */
.health-tracking-section {
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Photo upload card styling */
.photo-upload-card {
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
    height: 100%;
}

.photo-upload-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photo-upload-card .card-header {
    border-bottom: 1px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pose-guidance {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pose-guidance ul {
    margin-bottom: 0;
}

.pose-guidance li {
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.pose-icon {
    margin-bottom: 0.5rem;
}

.photo-upload-card input[type="file"] {
    border: 2px dashed #6c757d;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.photo-upload-card input[type="file"]:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.photo-upload-card input[type="file"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Progress Page Hero Header */
.hero-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* Full-width hero header for progress page - match other banners exactly */
.progress-banner-full-width .hero-header {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    border-radius: 15px;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 4s ease-in-out infinite;
}

.hero-circle-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    right: -100px;
    animation-delay: -1s;
}

.hero-circle-2 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: -75px;
    animation-delay: -2s;
}

.hero-circle-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    right: 10%;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero-header {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Progress Page Banner Consistency */
.progress-banner-full-width {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: 15px;
    padding-right: 15px;
}

.progress-banner-full-width .card {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
}

.progress-banner-full-width .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px 15px 0 0;
    padding: 1.25rem;
}

.progress-banner-full-width .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.progress-banner-full-width .card-body {
    padding: 2rem;
}

/* Progress bar width fix */
.progress-banner-full-width .progress {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.progress-banner-full-width .card-body .progress {
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile responsiveness for full-width banners */
@media (max-width: 768px) {
    .progress-banner-full-width {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .progress-banner-full-width .card-body {
        padding: 1.5rem;
    }
}

/* Progress Photos Styling */
.progress-photo-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.progress-photo {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}
