﻿/* ÔöÇÔöÇ Concept2 Rowing Analytics ÔÇô Styles ÔöÇÔöÇ */

:root {
    --c2-blue: #003366;
    --c2-light: #e8f0fe;
    --c2-accent: #0066cc;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ÔöÇÔöÇ Header ÔöÇÔöÇ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
header h1 { color: var(--c2-blue); }
header nav { display: flex; align-items: center; gap: 1rem; }

/* ÔöÇÔöÇ Buttons ÔöÇÔöÇ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
.btn-primary { background: var(--c2-accent); color: #fff; }
.btn-primary:hover { background: #0055aa; }
.btn-secondary { background: #ddd; color: #333; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.85rem; }

/* ÔöÇÔöÇ Sync Status ÔöÇÔöÇ */
.sync-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    background: var(--c2-light);
    border-left: 4px solid var(--c2-accent);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #555;
}
.sync-status .sync-icon { font-size: 1.1rem; }
.sync-status strong { color: var(--c2-blue); }
.sync-status .btn { margin-left: auto; white-space: nowrap; }

/* ÔöÇÔöÇ Filters ÔöÇÔöÇ */
.filters form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}
.filters label { display: flex; flex-direction: column; font-size: 0.85rem; font-weight: 600; }
.filters input, .filters select {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 0.2rem;
}

/* ÔöÇÔöÇ Summary Cards ÔöÇÔöÇ */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.card {
    background: #fff;
    padding: 1.2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
}
.card h3 { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; text-transform: uppercase; }
.card .stat { font-size: 1.6rem; font-weight: 700; color: var(--c2-blue); }
.card .stat-warn { color: #d35400; }

/* ÔöÇÔöÇ Personal Bests ÔöÇÔöÇ */
.personal-bests { margin-bottom: 2rem; }
.personal-bests h2 { color: var(--c2-blue); margin-bottom: 1rem; }
.personal-bests table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.personal-bests th, .personal-bests td { padding: 0.75rem 1rem; text-align: left; }
.personal-bests th { background: var(--c2-blue); color: #fff; }
.personal-bests tr:nth-child(even) { background: var(--c2-light); }

/* ÔöÇÔöÇ Charts ÔöÇÔöÇ */
.charts { margin-bottom: 2rem; }
.charts h2 { color: var(--c2-blue); margin-bottom: 0.3rem; }
.section-desc { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }
.chart-container {
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow-x: auto;  /* allow horizontal scroll for wide charts like heatmap */
}

/* ÔöÇÔöÇ Badges (improving / slowing) ÔöÇÔöÇ */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}
.badge-green { background: #d4edda; color: #155724; }
.badge-red   { background: #f8d7da; color: #721c24; }

/* ÔöÇÔöÇ Regression Controls ÔöÇÔöÇ */
.regression-controls {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.regression-controls .section-desc { flex: 1; }
.reg-filter { display: flex; align-items: center; gap: 0.5rem; }
.reg-filter select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* ÔöÇÔöÇ Cluster Profile Cards ÔöÇÔöÇ */
.cluster-profiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.cluster-card {
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid var(--c2-accent);
}
.cluster-card h4 { color: var(--c2-blue); margin-bottom: 0.3rem; }
.cluster-card p { font-size: 0.85rem; color: #555; margin: 0.15rem 0; }

/* ÔöÇÔöÇ Breakdown ÔöÇÔöÇ */
.breakdown { margin-bottom: 2rem; }
.breakdown h2 { color: var(--c2-blue); margin-bottom: 0.5rem; }
.breakdown ul { list-style: none; }
.breakdown li { padding: 0.3rem 0; }

/* ÔöÇÔöÇ Footer ÔöÇÔöÇ */
footer { text-align: center; padding-top: 2rem; color: #888; font-size: 0.85rem; }
footer a { color: var(--c2-accent); }

/* ── Technique Hints (inline) ── */
.technique-hint {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.8rem;
    background: var(--c2-light);
    border-left: 3px solid var(--c2-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.82rem;
    line-height: 1.5;
}
.technique-label {
    white-space: nowrap;
    font-weight: 700;
    color: var(--c2-blue);
    flex-shrink: 0;
}
.technique-text {
    color: #555;
}
.technique-business {
    display: block;
    margin-top: 0.3rem;
    font-weight: 600;
    color: var(--c2-accent);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}
.technique-link {
    margin-left: 0.5rem;
    font-weight: 600;
    color: var(--c2-blue);
    text-decoration: none;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.technique-link:hover {
    opacity: 1;
    text-decoration: underline;
}
.technique-cases {
    display: block;
    margin-top: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: rgba(0, 51, 102, 0.04);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #444;
    line-height: 1.55;
}
.technique-cases strong {
    color: var(--c2-blue);
}
.technique-cases em {
    color: #555;
    font-style: italic;
}

/* ── Business Applications Showcase ── */
.business-showcase {
    margin: 3rem 0 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--c2-light) 0%, #fff 100%);
    border-radius: var(--radius);
    border: 1px solid #d0ddf0;
}
.business-showcase h2 {
    color: var(--c2-blue);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.showcase-intro {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}
.showcase-card {
    background: #fff;
    padding: 1.4rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,51,102,0.08);
    border-left: 4px solid var(--c2-accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-margin-top: 1.5rem;
}
.showcase-card:target {
    animation: highlight-card 1.5s ease;
}
@keyframes highlight-card {
    0%   { box-shadow: 0 0 0 3px var(--c2-accent); }
    100% { box-shadow: 0 2px 8px rgba(0,51,102,0.08); }
}
.showcase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,51,102,0.14);
}
.showcase-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}
.showcase-card h3 {
    color: var(--c2-blue);
    font-size: 1rem;
    margin-bottom: 0.4rem;
}
.showcase-desc {
    color: #555;
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
    line-height: 1.5;
}
.showcase-kpis {
    list-style: none;
    padding: 0;
    margin: 0;
}
.showcase-kpis li {
    position: relative;
    padding: 0.2rem 0 0.2rem 1.2rem;
    font-size: 0.82rem;
    color: #444;
    line-height: 1.4;
}
.showcase-kpis li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--c2-accent);
    font-weight: 700;
}
.showcase-cta {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #d0ddf0;
}
.showcase-cta p {
    color: #555;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}
