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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 2000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    padding: clamp(15px, 3vw, 30px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    font-size: clamp(16px, 2.5vw, 24px);
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    font-size: clamp(12px, 1.5vw, 16px);
    color: #666;
    margin-bottom: clamp(20px, 2vw, 25px);
}

/* DISCLAIMER SECTION STYLES */
.disclaimer-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #8e94a8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.disclaimer-title {
    color: #2c3e50;
    font-size: clamp(18px, 2vw, 24px);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.disclaimer-content {
    font-size: clamp(13px, 1.3vw, 15px);
    line-height: 1.6;
    color: #34495e;
}

.disclaimer-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.disclaimer-content ol,
.disclaimer-content ul {
    margin: 15px 0 15px 30px;
}

.disclaimer-content ol li,
.disclaimer-content ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.disclaimer-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.disclaimer-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    font-size: clamp(12px, 1.2vw, 14px);
}

.disclaimer-warning strong {
    color: #856404;
    font-weight: 700;
}

svg {
    width: 100%;
    height: auto;
    min-height: clamp(800px, 120vw, 1600px);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* NEW PATHWAY VISUALIZATION STYLES - OVERRIDE ALL EXISTING */
.container .pathway-container {
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.pathway-title {
    text-align: left;
    font-size: 18px;
    font-weight: bold;
    color: #cc0000;
    margin-bottom: 30px;
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: inline-block;
    width: fit-content;
}

/* STRESS INITIATORS ROW */
.container .pathway-container .stress-initiators-row {
    display: flex !important;
    justify-content: center !important;
    gap: 20px !important;
    margin-bottom: 40px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
}

.container .pathway-container .stress-card {
    background: #ffe6e6 !important;
    border: 2px solid #cc0000 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    height: fit-content !important;
    flex: 0 0 auto !important;
    width: fit-content !important;
    min-width: 160px !important;
    max-width: 350px !important;
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    align-self: flex-start !important;
}

.stress-card.trauma-card,
.stress-card.prolactin-card {
    background: #ffe6e6;
    border-color: #cc0000;
}

.container .pathway-container .stress-card.immunological {
    min-width: 400px !important;
    max-width: 600px !important;
    width: fit-content !important;
    height: fit-content !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: flex-start !important;
}

.container .pathway-container .immunological-content {
    display: flex !important;
    gap: 20px !important;
    width: 100% !important;
}

.container .pathway-container .immune-section,
.container .pathway-container .infection-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.container .pathway-container .immune-variants-grid,
.container .pathway-container .infections-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3px 10px !important;
    margin-top: 5px !important;
}

.container .pathway-container .immune-variants-grid .citation-link,
.container .pathway-container .infections-grid .citation-link {
    font-size: 9px !important;
    text-align: left !important;
}

.stress-card h3 {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.citation-link {
    font-size: 10px;
    text-align: center;
    margin: 3px 0;
    cursor: pointer;
    color: #0066cc;
}

.citation-link:hover {
    text-decoration: underline;
}

.mechanism-label {
    font-size: 10px;
    text-align: center;
    margin: 3px 0;
    font-style: italic;
    color: #666;
}

/* IMMUNOLOGICAL STRESS SPECIAL LAYOUT - OLD STYLES */
.immune-section, .infection-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.immune-section strong, .infection-section strong {
    font-size: 11px;
    margin-bottom: 5px;
    text-align: center;
}

/* OVERRIDE FOR NEW LAYOUT */
.container .pathway-container .immune-section strong,
.container .pathway-container .infection-section strong {
    font-size: 10px !important;
    margin-bottom: 5px !important;
    text-align: center !important;
}

/* ROS AND INTERVENTION ROW */
.container .pathway-container .ros-intervention-row {
    display: flex !important;
    justify-content: space-between !important;
    gap: 30px !important;
    margin-bottom: 40px !important;
    align-items: flex-start !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

.container .pathway-container .ros-card {
    background: #fff4e6 !important;
    border: 2px solid #ff9900 !important;
    min-width: 180px !important;
    width: fit-content !important;
    height: fit-content !important;
    max-width: 250px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

.container .pathway-container .intervention-card {
    background: #e6ffe6 !important;
    border: 2px solid #009900 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    flex: 0 0 auto !important;
    min-width: 320px !important;
    width: fit-content !important;
    height: fit-content !important;
    max-width: 450px !important;
    align-self: flex-start !important;
}

.intervention-card h3 {
    color: #009900;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.intervention-item {
    margin-bottom: 12px;
    text-align: center;
}

.intervention-item strong {
    display: block;
    font-size: 11px;
    margin-bottom: 3px;
}

.dose-label {
    font-size: 10px;
    color: #666;
    margin: 2px 0;
}

.mechanism-label.synergy {
    color: #0066cc;
    font-weight: bold;
}

.intervention-item.stress-management strong {
    color: #6600cc;
}

/* VITAMIN REGENERATION DETAIL CARD */
.container .pathway-container .detail-card {
    background: #ffffcc !important;
    border: 2px solid #ffcc00 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    min-width: 160px !important;
    width: fit-content !important;
    height: fit-content !important;
    max-width: 220px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

.detail-card h4 {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

.detail-text {
    font-size: 9px;
    text-align: center;
    margin: 2px 0;
}

/* OLD ARROW SYSTEM REMOVED - Now using canvas for all arrows */

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .stress-initiators-row {
        flex-wrap: wrap;
    }
    
    .stress-card.immunological {
        min-width: 250px;
    }
    
    .ros-intervention-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .stress-initiators-row,
    .ros-intervention-row {
        flex-direction: column;
    }
    
    .stress-card,
    .intervention-card,
    .detail-card {
        min-width: 100%;
    }
}

/* INFLAMMATORY PATHWAY SECTION */
.container .pathway-container .inflammatory-section {
    margin-top: 40px !important;
    margin-bottom: 40px !important;
}

.container .pathway-container .inflammatory-title {
    text-align: left !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #ff9900 !important;
    margin-bottom: 25px !important;
    position: relative !important;
    z-index: 3 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 10px 25px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: inline-block !important;
    width: fit-content !important;
}

.container .pathway-container .inflammatory-row {
    display: flex !important;
    justify-content: center !important;
    gap: 40px !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
}

.container .pathway-container .inflammatory-card {
    background: #fff0cc !important;
    border: 2px solid #ff9900 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    min-width: 180px !important;
    width: fit-content !important;
    height: fit-content !important;
    max-width: 220px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

.container .pathway-container .inflammatory-card h3 {
    font-size: 12px !important;
    font-weight: bold !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    color: #333 !important;
}

.container .pathway-container .anti-inflammatory-card {
    background: #e6ffe6 !important;
    border: 2px solid #009900 !important;
    min-width: 250px !important;
    max-width: 300px !important;
}

.container .pathway-container .anti-inflammatory-card h3 {
    color: #009900 !important;
}

/* INFLAMMATORY ARROWS */
.container .pathway-container .inflammatory-arrow-container {
    position: relative !important;
    height: 40px !important;
    margin: 20px 0 !important;
}

.container .pathway-container .arrow.ros-to-inflammatory {
    position: absolute !important;
    height: 2px !important;
    background: #333 !important;
    transform-origin: left center !important;
}

/* FIBROTIC TRANSFORMATION SECTION */
.container .pathway-container .fibrotic-subtitle {
    text-align: left !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #0066cc !important;
    margin: 30px 0 20px 0 !important;
    position: relative !important;
    z-index: 3 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 10px 25px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: inline-block !important;
    width: fit-content !important;
}

.container .pathway-container .fibrotic-row {
    display: flex !important;
    justify-content: center !important;
    gap: 40px !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    margin-bottom: 30px !important;
}

.container .pathway-container .fibrotic-card {
    background: #e6f3ff !important;
    border: 2px solid #0066cc !important;
    border-radius: 8px !important;
    padding: 15px !important;
    min-width: 180px !important;
    width: fit-content !important;
    height: fit-content !important;
    max-width: 250px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

.container .pathway-container .fibrotic-card h3 {
    font-size: 12px !important;
    font-weight: bold !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    color: #333 !important;
}

.container .pathway-container .tgf-inhibition-card {
    background: #e6ffe6 !important;
    border: 2px solid #009900 !important;
    min-width: 280px !important;
    max-width: 350px !important;
}

.container .pathway-container .tgf-inhibition-card h3 {
    color: #009900 !important;
}

/* PATHWAY AND INTERVENTIONS LAYOUT */
.container .pathway-container .pathway-interventions-layout {
    display: flex !important;
    gap: 30px !important;
    margin-bottom: 25px !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
}

.container .pathway-container .main-pathway {
    flex: 1 1 60% !important;
    display: flex !important;
    justify-content: center !important;
}

.container .pathway-container .interventions-sidebar {
    flex: 0 0 auto !important;
    min-width: 300px !important;
    max-width: 600px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

.container .pathway-container .pathway-row {
    display: flex !important;
    gap: 40px !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: center !important;
}

/* INTERVENTION CARDS IN SIDEBAR */
.container .pathway-container .interventions-sidebar .intervention-card {
    margin-bottom: 0 !important;
    width: fit-content !important;
    height: fit-content !important;
    flex: 0 0 auto !important;
    min-width: 250px !important;
    max-width: 350px !important;
    align-self: flex-start !important;
}

.container .pathway-container .interventions-sidebar .detail-card {
    margin-bottom: 0 !important;
    width: fit-content !important;
    height: fit-content !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

/* COMPREHENSIVE ARROW SYSTEM FOR PATHWAY CONNECTIONS */

/* ARROWS NOW HANDLED BY CANVAS - Removed CSS pseudo-element arrows */
.stress-card,
.ros-card,
.inflammatory-card,
.fibrotic-card {
    position: relative;
}

/* REMOVED OLD ARROW STYLES - Now using canvas for all arrows */

/* CANVAS-BASED ARROW SYSTEM */
.pathway-container {
    position: relative !important;
}

.pathway-arrows-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1 !important;  /* Changed from 10 to 1 to appear below cards */
}

/* Ensure cards appear above arrows */
.stress-card,
.ros-card,
.inflammatory-card,
.fibrotic-card,
.intervention-card,
.detail-card,
.disease-card {
    position: relative !important;
    z-index: 2 !important;
}

/* Ensure all layer titles appear above arrows */
.pathway-title,
.inflammatory-title,
.fibrotic-subtitle,
.disease-subtitle,
.stress-initiators-row::before {
    position: relative !important;
    z-index: 3 !important;
}

/* Left-align the title containers */
.inflammatory-section,
.disease-section {
    text-align: left !important;
}

/* DISEASE MANIFESTATION SECTION */
.container .pathway-container .disease-section {
    margin-top: 40px !important;
    margin-bottom: 40px !important;
}

.container .pathway-container .disease-subtitle {
    text-align: left !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #800080 !important;
    margin: 30px 0 20px 0 !important;
    position: relative !important;
    z-index: 3 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 10px 25px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: inline-block !important;
    width: fit-content !important;
}

.container .pathway-container .disease-row {
    display: flex !important;
    justify-content: center !important;
    gap: 60px !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    margin-bottom: 30px !important;
}

.container .pathway-container .disease-card {
    background: #f5e6ff !important;
    border: 2px solid #800080 !important;
    border-radius: 10px !important;
    padding: 20px 25px !important;
    width: fit-content !important;
    height: fit-content !important;
    min-width: 450px !important;
    max-width: 600px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

.container .pathway-container .disease-card h3 {
    color: #800080 !important;
    font-size: 16px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
    font-weight: bold !important;
}

.container .pathway-container .fibrosis-type {
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #ddd !important;
}

.container .pathway-container .fibrosis-type:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.container .pathway-container .fibrosis-type strong {
    color: #660066 !important;
    display: block !important;
    margin-bottom: 5px !important;
    font-size: 13px !important;
    text-align: center !important;
    font-weight: bold !important;
}

.container .pathway-container .fibrosis-type .citation-link,
.container .pathway-container .fibrosis-type .mechanism-label {
    font-size: 11px !important;
    line-height: 1.4 !important;
    margin-left: 10px !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 5 !important;
}

.container .pathway-container .fibrosis-type .citation-link:hover {
    color: #0044aa !important;
    text-decoration: underline !important;
}

/* PATHWAY ROW STYLES */
.pathway-row {
    position: relative;
    margin-bottom: 40px;
}

.pathway-row:last-child {
    margin-bottom: 30px;
}

/* RESPONSIVE BEHAVIOR */
@media (max-width: 768px) {
    .pathway-arrows-canvas {
        display: none !important;
    }
    
    .pathway-row {
        margin-bottom: 20px;
    }
}

/* SVG BACKUP STYLES - Keep separate from main styles */

text {
    font-family: Arial, sans-serif;
    font-size: clamp(9px, 1.2vw, 11px);
    fill: #333;
}

.pathway-label {
    font-weight: bold;
    font-size: clamp(10px, 1.4vw, 12px);
}

.intervention-label {
    fill: #009900;
    font-weight: bold;
    font-size: clamp(8px, 1.1vw, 10px);
}

/* SVG text styles */
text.dose-label {
    fill: #666;
    font-size: clamp(7px, 1vw, 9px);
}

text.mechanism-label {
    fill: #0066cc;
    font-style: italic;
    font-size: clamp(8px, 1.1vw, 10px);
}

.legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #ccc;
    padding: 15px;
    font-size: 12px;
}

.legend-item {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.legend-line {
    width: 30px;
    height: 2px;
    margin-right: 10px;
    display: inline-block;
}

/* Enhanced SVG text responsiveness - removed duplicates */

/* SVG Citation links */
text.citation-link {
    fill: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    transition: fill 0.3s ease;
}

text.citation-link:hover {
    fill: #0044aa;
}

/* Tooltip styling */
.tooltip {
    position: absolute;
    background: white;
    border: 2px solid #0066cc;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 400px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    display: none;
    animation: tooltipFadeIn 0.3s ease;
    pointer-events: auto;
    cursor: default;
}

.tooltip.visible {
    display: block;
}

.tooltip-title {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.tooltip-authors {
    color: #666;
    font-style: italic;
    margin-bottom: 6px;
    font-size: 12px;
}

.tooltip-journal {
    color: #0066cc;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 12px;
}

.tooltip-links {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.tooltip-link {
    color: #00aa00;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    display: inline-block;
    padding: 6px 10px;
    background: #f0fff0;
    border-radius: 5px;
    margin: 3px 3px 0 0;
    transition: all 0.3s ease;
    border: 1px solid #d0f0d0;
}

.tooltip-link:hover {
    background: #e6ffe6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 170, 0, 0.2);
}

.open-all-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.open-all-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
}

/* Information Cards Section Styles */
.cards-container, .calculator-container {
    max-width: 2000px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.section-title {
    text-align: center;
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
}

.info-card h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9ff, #e6f0ff);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2rem;
}

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

.mechanism-list {
    list-style: none;
    padding: 0;
}

.mechanism-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    line-height: 1.4;
}

.mechanism-list li:last-child {
    border-bottom: none;
}

.protocol-summary {
    text-align: center;
}

.protocol-summary p {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.5;
}

.protocol-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.highlight {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.safety-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.safety-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.safety-stat.good span:first-child {
    color: #22c55e;
    font-weight: bold;
}

.safety-stat.warning span:first-child {
    color: #f59e0b;
    font-weight: bold;
}

/* Alert Card Styles */
.alert-card {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border: 2px solid #f59e0b;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
    text-align: center;
}

.alert-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.alert-card h3 {
    color: #92400e;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alert-card p {
    color: #92400e;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.alert-card strong {
    font-weight: 700;
    color: #7c2d12;
}

/* Recommendation Section Styles */
.recommendation-section {
    margin-top: 25px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 10px;
    border-left: 4px solid #0ea5e9;
}

.recommendation-section h4 {
    color: #0c4a6e;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.recommendation-text {
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.apply-recommendation-btn {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-recommendation-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Calculator Action Buttons */
.calculator-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding: 20px;
}

.calculate-btn, .reset-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.calculate-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.reset-btn {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #475569, #334155);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.3);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Redox Alert Styles */
.redox-alert {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fef7cd, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    border-left: 4px solid #d97706;
}

.redox-alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #92400e;
    font-weight: 600;
    font-size: 0.95rem;
}

.redox-icon {
    font-size: 1.2rem;
}

.redox-disclaimer {
    color: #7c2d12;
    font-size: 0.85rem;
    line-height: 1.4;
    font-style: italic;
}

.redox-disclaimer strong {
    color: #991b1b;
    font-weight: 700;
}

/* Calculator Section Styles */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.calculator-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.calculator-panel h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.input-group input, .input-group select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.component-item {
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.component-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.component-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.component-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.component-item .component-name {
    font-weight: 600;
    color: #333;
}

.component-item .component-dose {
    color: #667eea;
    font-weight: 500;
    font-size: 0.9rem;
}

.component-effects {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
}

.effect {
    color: #666;
}

.synergy-indicator {
    color: #22c55e;
    font-weight: 500;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.result-section {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.result-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.outcome-metric, .pk-metric, .monitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.outcome-metric:last-child, .pk-metric:last-child, .monitor-item:last-child {
    border-bottom: none;
}

.metric-label, .pk-label, .monitor-time {
    color: #666;
    font-size: 0.9rem;
}

.metric-value, .pk-value, .monitor-action {
    font-weight: 600;
    color: #667eea;
}

.components-list {
    margin-bottom: 20px;
}

.components-list h5 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1rem;
}

.therapy-component {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
}

.therapy-component:hover {
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.therapy-component .component-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.therapy-component .component-dose {
    color: #667eea;
    font-size: 0.9rem;
}

.dose-adjustment {
    font-size: 0.8rem;
    color: #8b5cf6;
    margin-top: 4px;
}

.no-components {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

.monitoring-schedule {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cost-analysis {
    background: #fff9e6;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #fbbf24;
}

.cost-analysis h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: #666;
}

.cost-item strong {
    color: #f59e0b;
}

/* Progress bars */
.progress-container {
    margin: 10px 0;
    position: relative;
}

.progress-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

/* Style native progress element */
progress {
    width: 100%;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 10px;
    overflow: hidden;
}

/* Progress bar background (track) */
progress::-webkit-progress-bar {
    background-color: #e2e8f0;
    border-radius: 10px;
}

/* Progress bar fill */
progress::-webkit-progress-value {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Firefox progress bar */
progress::-moz-progress-bar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Progress value text */
.progress-value {
    position: absolute;
    top: 30px;
    right: 0;
    color: #333;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Old div-based progress bar styles (kept for compatibility) */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
}

.warning-item {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 10px;
    border-radius: 6px;
    margin: 5px 0;
}

.synergy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 6px;
    background: #f8f9ff;
    border: 1px solid #e1e5e9;
}

.synergy-item.high {
    background: #f0fdf4;
    border-color: #22c55e;
}

.synergy-item.moderate {
    background: #fffbeb;
    border-color: #f59e0b;
}

.synergy-pair {
    font-weight: 500;
    color: #333;
}

.synergy-factor {
    font-weight: 600;
    color: #667eea;
}

.synergy-type {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.dose-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.adjustment {
    font-size: 0.8rem;
    color: #f59e0b;
    font-weight: 500;
}

.stage-info {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stage-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cards-container, .calculator-container {
        margin: 10px;
        padding: 20px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .components-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Legend enhancement - removed duplicate, styles merged into base .legend */

/* Responsive adjustments */
@media (max-width: 1200px) {
    .legend {
        position: static;
        margin: 20px auto;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        border-radius: 15px;
    }
    
    svg {
        min-height: 100vw;
        border-radius: 10px;
    }
    
    .tooltip {
        max-width: 90vw;
        left: 5vw !important;
        font-size: 12px;
    }
    
    text {
        font-size: clamp(7px, 1.5vw, 9px);
    }
    
    .pathway-label {
        font-size: clamp(8px, 1.6vw, 10px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 8px;
        border-radius: 10px;
    }
    
    svg {
        border-radius: 8px;
    }
}

/* Interactive enhancements for all SVG boxes */
.pathway-box,
.trauma-box,
.ros-box,
.inflammation-box,
.fibrosis-box,
.intervention-box,
.final-box {
    transition: all 0.3s ease;
    cursor: pointer;
}

.pathway-box.hovered,
.trauma-box.hovered,
.ros-box.hovered,
.inflammation-box.hovered,
.fibrosis-box.hovered,
.final-box.hovered {
    filter: brightness(1.08) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    stroke-width: 3;
    transform: translateY(-2px);
}

.intervention-box.hovered {
    filter: brightness(1.12) drop-shadow(0 6px 20px rgba(0, 170, 0, 0.3));
    stroke-width: 3;
    transform: translateY(-3px);
}

/* Text within SVG should not interfere with hover */
svg text {
    pointer-events: none;
}

/* Exception: citation links should be clickable */
svg text.citation-link {
    pointer-events: auto;
    cursor: pointer;
}

.arrow:hover,
.inhibition-arrow:hover,
.activation-arrow:hover,
.synergy-arrow:hover {
    stroke-width: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Special Contribution Literature Section */
.contribution-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px 30px;
    margin-top: 40px;
    border-top: 3px solid #1976d2;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contribution-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.contribution-section h2 {
    text-align: center;
    color: #1976d2;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 700;
}

.contribution-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
    text-align: justify;
}

.paulis-publications {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

.paulis-publications h3 {
    color: #1976d2;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 10px;
}

.publications-list {
    list-style: none;
    padding: 0;
}

.publications-list li {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #1976d2;
    transition: all 0.3s ease;
}

.publications-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.1);
}

.publications-list li strong {
    color: #1976d2;
    font-size: 1.05rem;
    line-height: 1.5;
}

.publications-list li em {
    color: #666;
    font-size: 0.95rem;
    margin-top: 8px;
    display: block;
}

.contribution-footer {
    font-style: italic;
    color: #666;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}
