/* ============================================
   c8core Survey — Mono Black/White Style
   Matching login.html aesthetic throughout
   ============================================ */

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

html {
    font-size: 16px;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    background: #ffffff;
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: #000;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    padding: 0.4rem 0.9rem;
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 2px solid transparent;
    transition: all 0.15s;
}

.nav-links a:hover {
    color: #fff;
    border-color: #fff;
}

.nav-links a.active {
    color: #000;
    background: #fff;
    border-color: #fff;
}

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

.logout-btn {
    padding: 0.4rem 0.9rem;
    background: transparent;
    border: 2px solid #555;
    color: #aaa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.15s;
}

.logout-btn:hover {
    border-color: #fff;
    color: #fff;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.container.wide {
    max-width: 1400px;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid #000;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 0.95rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 3rem;
    border: 3px solid #000;
}

.stat-box {
    padding: 2rem;
    text-align: center;
    border-right: 3px solid #000;
}

.stat-box:last-child {
    border-right: none;
}

.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ============================================
   INSIGHTS
   ============================================ */
.insights-section {
    margin-bottom: 3rem;
}

.insights-section h2,
.summary-section h2 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #666;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #000;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 3px solid #000;
}

.insight-card {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid #000;
    background: #fff;
    color: #000;
}

.insight-card:last-child {
    border-bottom: none;
}

.insight-card:nth-child(odd) {
    background: #f7f7f7;
}

/* ============================================
   SUMMARY
   ============================================ */
.summary-section {
    margin-bottom: 3rem;
}

.summary-text {
    border: 3px solid #000;
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #222;
}

.summary-text p + p {
    margin-top: 1rem;
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 3px solid #000;
    transition: all 0.15s;
}

.cta-btn:hover {
    background: #fff;
    color: #000;
}

.cta-btn.secondary {
    background: #fff;
    color: #000;
}

.cta-btn.secondary:hover {
    background: #000;
    color: #fff;
}

/* ============================================
   STATS GRID (All Stats Page)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 2rem;
}

.stat-card {
    border: 3px solid #000;
    padding: 1.5rem;
    background: #fff;
}

.stat-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-card .meta {
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-note {
    font-size: 0.78rem;
    color: #888;
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* Bar charts */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-name {
    flex: 0 0 150px;
    font-size: 0.8rem;
    text-align: right;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 22px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #000;
    transition: width 0.4s ease;
}

.bar-val {
    flex: 0 0 36px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #000;
    text-align: right;
}

.bar-row.leader .bar-name {
    font-weight: 700;
    color: #000;
}

.bar-row.leader .bar-track {
    height: 30px;
}

.bar-row.leader .bar-fill {
    background: #000;
}

.bar-row.leader .bar-val {
    font-size: 1rem;
}

/* Alternating bar colors for readability */
.bar-row:nth-child(2n) .bar-fill { background: #333; }
.bar-row:nth-child(3n) .bar-fill { background: #555; }
.bar-row:nth-child(4n) .bar-fill { background: #777; }
.bar-row:nth-child(5n) .bar-fill { background: #999; }

/* Always keep leaders black */
.bar-row.leader .bar-fill { background: #000 !important; }

/* Chart wrapper - kept for legacy but no longer used */
.chart-wrap {
    display: none;
}

/* ============================================
   TAG CLOUD (Artists Page)
   ============================================ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    animation: float 5s ease-in-out infinite;
}

.tag:hover {
    background: #fff;
    color: #000;
    transform: scale(1.08);
}

.tag-sm { font-size: 0.8rem; padding: 0.35rem 0.75rem; }
.tag-md { font-size: 0.95rem; padding: 0.5rem 1rem; }
.tag-lg { font-size: 1.1rem; padding: 0.6rem 1.2rem; }
.tag-xl { font-size: 1.3rem; padding: 0.7rem 1.4rem; font-weight: 700; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.tag:nth-child(2n) { animation-delay: -0.5s; animation-duration: 4s; }
.tag:nth-child(3n) { animation-delay: -1s; animation-duration: 6s; }
.tag:nth-child(5n) { animation-delay: -1.5s; animation-duration: 5s; }
.tag:nth-child(7n) { animation-delay: -2s; animation-duration: 4.5s; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #fff;
    border: 3px solid #000;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.15s;
}

.modal-close:hover { color: #000; }

.modal-box h2 {
    font-size: 1.25rem;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 2px solid #000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-content {
    padding: 1.5rem 2rem 2rem;
}

.response-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.response-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.response-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.response-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #000;
}

.empty { color: #bbb; font-style: italic; }

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.78rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-top: 3px solid #000;
    margin-top: 3rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.loading {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* ── Nav ── */
    .top-nav {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    .nav-brand { font-size: 1rem; }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .nav-links a {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }
    .nav-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: auto;
    }
    .design-switcher label { display: none; } /* hide label on mobile, keep select */
    .design-switcher select { font-size: 0.72rem; padding: 0.25rem 0.4rem; }
    .logout-btn { font-size: 0.72rem; padding: 0.3rem 0.6rem; }

    /* ── Layout ── */
    .container { padding: 1.5rem 1rem; }
    .page-header { margin-bottom: 2rem; }
    .page-header h1 { font-size: 1.5rem; }
    .lead { font-size: 0.85rem; }

    /* ── Stats row ── */
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        border: 3px solid #000;
    }
    .stat-box { padding: 1rem 0.5rem; }
    .stat-num { font-size: 2rem; }
    .stat-label { font-size: 0.65rem; }

    /* ── Stats grid (All Stats page) ── */
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .stat-card { padding: 1rem; }
    .stat-card h3 { font-size: 0.85rem; }

    /* ── Bar charts ── */
    .bar-name { flex: 0 0 85px; font-size: 0.7rem; }
    .bar-val { font-size: 0.8rem; flex: 0 0 28px; }
    .bar-row.leader .bar-name { font-size: 0.8rem; }
    .bar-row.leader .bar-track { height: 24px; }

    /* ── CTA ── */
    .cta-section { flex-direction: column; gap: 0.75rem; }
    .cta-btn { text-align: center; padding: 0.85rem 1.5rem; font-size: 0.85rem; }

    /* ── Summary ── */
    .summary-text { padding: 1.25rem; font-size: 0.9rem; }

    /* ── Modal ── */
    .modal-overlay { padding: 1rem; }
    .modal-box h2 { font-size: 1rem; padding: 1rem; }
    .modal-content { padding: 1rem; }
    .response-text { font-size: 0.9rem; }

    /* ── Tag cloud ── */
    .tag-cloud { padding: 1rem; gap: 0.5rem; }
    .tag-xl { font-size: 1.1rem; }
    .tag-lg { font-size: 0.95rem; }
}

/* ── Design Switcher ─────────────────────────────────────────── */
.design-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-switcher label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
}

.design-switcher select {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
    background: #000;
    color: #fff;
    border: 2px solid #555;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.design-switcher select:hover,
.design-switcher select:focus {
    border-color: #fff;
}

/* ── Key Findings Slider ─────────────────────────────────────── */
.slider-wrap {
    border: 3px solid #000;
    position: relative;
    overflow: hidden;
}

.slider-track {
    position: relative;
    min-height: 280px;
}

.slide {
    display: none;
    padding: 3rem 2.5rem;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.25s ease;
}

.slide.active {
    display: flex;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.slide-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.slide-stat {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.slide-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    max-width: 600px;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-top: 3px solid #000;
    background: #000;
}

.slider-btn {
    background: transparent;
    border: 2px solid #555;
    color: #fff;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.slider-btn:hover {
    border-color: #fff;
    background: #fff;
    color: #000;
}

.slider-counter {
    font-size: 0.85rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    min-width: 60px;
    text-align: center;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem;
    background: #000;
    border-top: 1px solid #333;
}

.slider-dot {
    width: 8px;
    height: 8px;
    background: #555;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}

.slider-dot.active {
    background: #fff;
}

@media (max-width: 768px) {
    .slider-track { min-height: 240px; }
    .slide { padding: 1.75rem 1.25rem; min-height: 240px; }
    .slide-icon { font-size: 1.75rem; }
    .slide-stat { font-size: 2.75rem; }
    .slide-text { font-size: 0.9rem; }
    .slider-btn { font-size: 1rem; padding: 0.35rem 0.75rem; }
}
