/* ============================================
   HEALTHCHECK - GROSS HEALTH TOOLS
   Style: Friendly, Clean, Medical-Tech
   ============================================ */

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-family: 'Nunito', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.text-blue { color: var(--primary); }
.logo span { color: var(--text-muted); font-weight: 700; }

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Disclaimers */
.disclaimer-banner {
    background-color: var(--warning-bg);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #92400e;
}

.disclaimer-banner i {
    color: var(--warning);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

/* Navigation */
.tool-nav {
    display: flex;
    background: var(--border-color);
    border-radius: 12px;
    padding: 0.3rem;
    margin-bottom: 2.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.tool-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-btn {
    flex: 1 0 auto; /* Allow buttons to size based on content, don't shrink */
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    color: var(--text-dark);
}

.nav-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Main Content Area */
.main-content {
    flex: 1;
}

.tool-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tool-section.active {
    display: block;
}

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

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Tool 1: Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.color-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.color-card:hover, .color-card.selected {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.color-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* Results Box */
.result-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

#result-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    border-bottom: 2px solid var(--bg-main);
    padding-bottom: 0.5rem;
}

.result-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.result-content li {
    margin-bottom: 0.5rem;
}

.doctor-warning {
    margin-top: 1.5rem;
    background: var(--danger-bg);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: #991b1b;
    font-size: 0.95rem;
}

.doctor-warning i {
    color: var(--danger);
    margin-top: 0.2rem;
}

/* Did You Eat / Lifestyle Highlight */
.did-you-eat {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    color: #166534;
    font-weight: 600;
}

/* Action Buttons (Odors, Sleep) */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.action-btn:hover, .action-btn.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Bruise Timeline */
.timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 2rem 0 3rem 0;
    padding: 0 1rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 24px; /* Center of the circle */
    left: 2rem;
    right: 2rem;
    height: 4px;
    background: var(--border-color);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.timeline-step:hover, .timeline-step.selected {
    transform: scale(1.1);
}

.timeline-step.selected .bruise-circle {
    box-shadow: 0 0 0 4px white, 0 0 0 6px var(--text-dark);
}

.bruise-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    border: 2px solid white;
}

.timeline-step span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Tool 2: Stomach Mapper */
.mapper-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.svg-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.stomach-svg {
    width: 100%;
    height: auto;
    display: block;
}

.quadrant {
    fill: rgba(14, 165, 233, 0.1);
    stroke: var(--primary);
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quadrant:hover {
    fill: rgba(14, 165, 233, 0.3);
}

.quadrant.selected {
    fill: rgba(14, 165, 233, 0.5);
    stroke-width: 3;
}

.center-quad {
    fill: rgba(245, 158, 11, 0.1);
    stroke: var(--warning);
}
.center-quad:hover { fill: rgba(245, 158, 11, 0.3); }
.center-quad.selected { fill: rgba(245, 158, 11, 0.5); stroke-width: 3; }

.svg-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    fill: var(--text-dark);
    pointer-events: none;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .mapper-container {
        grid-template-columns: 1fr;
    }
    
    .tool-nav {
        flex-direction: column;
    }
    
    .svg-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
}
