/* Body Scans Page Styles */

.scans-header {
    margin-bottom: 2rem;
}

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

.progress-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

.hero-stat-value {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Timeline View */
.transformation-timeline {
    margin-bottom: 3rem;
}

.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);
    border-radius: 2px;
    z-index: 0;
}

.timeline-items {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.timeline-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 4px solid #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.timeline-item.current .timeline-dot {
    width: 32px;
    height: 32px;
    border-color: #8b5cf6;
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.timeline-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
    min-width: 200px;
    transition: all 0.3s;
}

.timeline-item.current .timeline-card {
    border-color: #8b5cf6;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.timeline-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.timeline-type.dexa {
    background: #dbeafe;
    color: #1e40af;
}

.timeline-type.inbody {
    background: #fce7f3;
    color: #9f1239;
}

.timeline-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-metric {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.timeline-metric-label {
    color: #6b7280;
}

.timeline-metric-value {
    font-weight: 700;
    color: #111827;
}

/* Visual Comparison Cards */
.visual-comparison {
    margin-bottom: 3rem;
}

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

.comparison-visual-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.comparison-visual-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.comparison-visual-card.highlight {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

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

.visual-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.visual-card-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.visual-card-badge.baseline {
    background: #fef3c7;
    color: #92400e;
}

.visual-card-badge.current {
    background: #d1fae5;
    color: #065f46;
}

.body-composition-visual {
    margin: 2rem 0;
}

.composition-bar {
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.composition-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.composition-segment:hover {
    filter: brightness(1.1);
}

.composition-segment.fat {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.composition-segment.lean {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.composition-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

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

.scans-achievements {
    margin-bottom: 2rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.achievement-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.achievement-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-card.positive {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.achievement-card.positive:hover {
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
}

.achievement-card.elite {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.achievement-card.elite:hover {
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.4);
}

.achievement-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.achievement-card .achievement-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.achievement-card .achievement-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.scans-stats {
    margin-bottom: 2rem;
}

.progress-rings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
}

.progress-ring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.progress-ring-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 0.75rem;
}

.ring-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.ring-progress.body-fat {
    stroke: #ef4444;
}

.ring-progress.lean-mass {
    stroke: #10b981;
}

.ring-progress.muscle-mass {
    stroke: #8b5cf6;
}

.ring-progress.visceral-fat {
    stroke: #f59e0b;
}

.ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.ring-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.scans-composition {
    margin-bottom: 3rem;
}

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

.composition-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.composition-chart-container {
    position: relative;
    height: 250px;
    margin-top: 1rem;
}


.scan-selector {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rate-of-change {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}

.rate-of-change.positive {
    color: #059669;
}

.rate-of-change.negative {
    color: #dc2626;
}

.scans-comparison {
    margin-bottom: 3rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.comparison-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.comparison-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.metric-values {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    min-width: 80px;
    text-align: right;
}

.metric-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

.metric-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.metric-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

.metric-change.neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.scans-list {
    margin-bottom: 3rem;
}

.scan-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.scan-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.scan-card-date {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.scan-card-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.scan-card-type.dexa {
    background: #dbeafe;
    color: #1e40af;
}

.scan-card-type.inbody {
    background: #fce7f3;
    color: #9f1239;
}

.scan-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.scan-metric {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

.scan-metric-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.scan-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.scan-card-notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: #4b5563;
    font-style: italic;
}

.scans-charts {
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.chart-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

.loading-state,
.error-state,
.info-state {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.error-state {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.info-state {
    color: #059669;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

/* Before/After Slider */
.before-after-section {
    margin-bottom: 3rem;
}

.before-after-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.before-after-metrics {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.before-column, .after-column {
    text-align: center;
}

.before-column h3, .after-column h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-display {
    margin-bottom: 1.5rem;
}

.metric-display-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-display-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #111827;
}

.arrow-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.arrow-icon {
    font-size: 3rem;
    color: #10b981;
    animation: slideRight 1.5s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.change-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    white-space: nowrap;
}

.change-badge.positive {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.change-badge.negative {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stat-value {
        font-size: 2rem;
    }
    
    .timeline-items {
        flex-direction: column;
        gap: 2rem;
    }
    
    .timeline-line {
        display: none;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .scan-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .before-after-metrics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .arrow-divider {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .comparison-cards {
        grid-template-columns: 1fr;
    }
}

