:root {
--color-primary: #6c63ff;
--color-accent: #ff6584;
--color-surface: #ffffff;
--color-muted: #f5f6ff;
--color-text: #1f1f2e;
--color-subtle: #6b7280;
--card-radius: 1.25rem;
--shadow-soft: 0 20px 45px rgba(76, 70, 180, 0.12);
}
html, body, [class*="css"]  {
font-family: 'Manrope', sans-serif;
}
.main-header {
font-size: 2.75rem;
color: var(--color-text);
text-align: center;
margin-bottom: 0.5rem;
font-weight: 700;
letter-spacing: -0.01em;
}
.subtitle {
text-align: center;
color: var(--color-subtle);
font-size: 1.15rem;
margin-bottom: 2.5rem;
}
.metric-card {
background: var(--color-surface);
padding: 1.5rem;
border-radius: var(--card-radius);
box-shadow: var(--shadow-soft);
border: 1px solid rgba(108, 99, 255, 0.08);
}
.insight-card {
/* slightly stronger background and lighter text for better contrast and readability */
background: linear-gradient(135deg, rgba(108, 99, 255, 0.14), rgba(255, 101, 132, 0.12));
padding: 1.5rem;
border-radius: var(--card-radius);
border: 1px solid rgba(108, 99, 255, 0.12);
color: var(--color-subtle);
}
.insight-card p {
margin: 0;
font-size: 1.1rem;
color: inherit; /* inherit the softer color from the card */
}
.emotion-summary {
background: var(--color-muted);
border-radius: var(--card-radius);
padding: 1.5rem;
border: 1px solid rgba(255, 255, 255, 0.6);
}
.stDownloadButton button {
border-radius: 999px;
padding: 0.75rem 1.5rem;
font-weight: 600;
background: var(--color-primary);
color: white;
border: none;
box-shadow: var(--shadow-soft);
}
.stDownloadButton button:hover {
background: #5147ff;
color: white;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-muted, #f5f6ff);
    color: var(--color-text, #1f1f2e);
    font-family: 'Manrope', 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

a {
    color: var(--color-primary, #6c63ff);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(108, 99, 255, 0.08);
}

.site-header__inner {
    margin: 0 auto;
    max-width: 1200px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text, #1f1f2e);
}

.site-brand__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.12), rgba(255, 101, 132, 0.12));
    display: grid;
    place-items: center;
    color: var(--color-primary, #6c63ff);
    font-size: 1.35rem;
    box-shadow: inset 0 0 0 1px rgba(108, 99, 255, 0.18);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-nav a {
    font-weight: 600;
    color: var(--color-text, #1f1f2e);
}

.site-nav a.site-nav__cta {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: var(--color-primary, #6c63ff);
    color: #ffffff;
    box-shadow: var(--shadow-soft, 0 20px 45px rgba(76, 70, 180, 0.12));
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.page__header,
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero__note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--color-primary, #6c63ff);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.hero__actions a {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: var(--shadow-soft, 0 20px 45px rgba(76, 70, 180, 0.12));
}

.hero__actions a.primary {
    background: var(--color-primary, #6c63ff);
    color: #ffffff;
}

.hero__actions a.secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text, #1f1f2e);
    border: 1px solid rgba(108, 99, 255, 0.16);
}

.search-card {
    display: grid;
    gap: 0.75rem;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(108, 99, 255, 0.12);
}

.search-field input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.search-field svg {
    width: 20px;
    height: 20px;
    color: var(--color-subtle, #6b7280);
}

.dataset-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 2.5rem;
}

.dataset-card {
    background: var(--color-surface, #ffffff);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft, 0 20px 45px rgba(76, 70, 180, 0.12));
    border: 1px solid rgba(108, 99, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.dataset-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 45px rgba(76, 70, 180, 0.18);
}

.dataset-card__thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(255, 101, 132, 0.2));
}

.dataset-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dataset-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dataset-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.dataset-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dataset-card__meta span {
    display: block;
    font-size: 0.95rem;
    color: var(--color-subtle, #6b7280);
}

.dataset-card__meta strong {
    display: block;
    color: var(--color-text, #1f1f2e);
    font-size: 1.05rem;
}

.dataset-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.dataset-card__links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.dataset-card__links a {
    font-weight: 600;
}

.dataset-card__links a.summary-link {
    font-size: 0.9rem;
    color: var(--color-subtle, #6b7280);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 1.25rem;
    border: 1px dashed rgba(108, 99, 255, 0.25);
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-subtle, #6b7280);
}

.dataset-meta {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 2.5rem;
}

.card {
    background: var(--color-surface, #ffffff);
    border-radius: var(--card-radius, 1.25rem);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft, 0 20px 45px rgba(76, 70, 180, 0.12));
    border: 1px solid rgba(108, 99, 255, 0.08);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.metric {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.callout {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.callout strong {
    color: var(--color-primary, #6c63ff);
}

.chart-section {
    margin-top: 2.5rem;
}

.chart-section h2 {
    margin-bottom: 0.75rem;
}

.index-table {
    width: 100%;
    border-collapse: collapse;
}

.index-table th,
.index-table td {
    border-bottom: 1px solid rgba(108, 99, 255, 0.12);
    text-align: left;
    padding: 0.75rem;
}

.index-table th {
    font-weight: 600;
    color: var(--color-subtle, #6b7280);
}

.index-table tbody tr:hover {
    background: rgba(108, 99, 255, 0.06);
}

.plotly-chart {
    width: 100%;
    min-height: 420px;
}

.site-footer {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
    color: var(--color-subtle, #6b7280);
    text-align: center;
    font-size: 0.9rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 720px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .dataset-card__meta {
        grid-template-columns: 1fr;
    }

    .dataset-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
