/**
 * Community page — public profile survey aggregates (no absolute counts)
 */

.community-page {
    --community-cyan: #32d8ff;
    --community-violet: #7c8cff;
    --community-rose: #f472b6;
    --community-emerald: #34d399;
}

.community-page .community-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 2.5rem;
    box-sizing: border-box;
}

.community-page .community-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(900px 480px at 0% 0%, rgba(52, 211, 153, 0.22), transparent 55%),
        radial-gradient(720px 380px at 100% 0%, rgba(124, 140, 255, 0.32), transparent 48%),
        linear-gradient(155deg, rgba(12, 14, 28, 0.97) 0%, rgba(18, 22, 42, 0.98) 100%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    color: #eef2ff;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.community-page .community-header-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.community-page .community-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.community-page .community-hero-badge i {
    color: var(--community-emerald);
}

.community-page .community-hero-title {
    font-size: clamp(1.55rem, 2.2vw + 1rem, 2.15rem);
    font-weight: 900;
    margin: 0 0 0.5rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.community-page .community-hero-lead {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.88);
    max-width: 38rem;
}

.community-page .community-hero-hint {
    margin: 0.85rem 0 0;
    font-size: 0.92rem;
    color: rgba(203, 213, 225, 0.82);
}

.community-page .community-header-icon {
    flex-shrink: 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--community-cyan);
}

.community-page .community-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(203, 213, 225, 0.9);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.community-page .community-disclaimer i {
    color: var(--community-cyan);
    margin-top: 0.1rem;
}

.community-page .community-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.community-page .community-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 18, 35, 0.72);
    padding: 1.25rem 1.35rem 1.35rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.community-page .community-card--wide {
    margin-bottom: 1.25rem;
}

.community-page .community-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.community-page .community-card-head i {
    color: var(--community-violet);
    font-size: 1rem;
}

.community-page .community-card-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: #f1f5f9;
}

.community-page .community-card-desc {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(203, 213, 225, 0.78);
}

.community-page .community-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.community-page .community-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 0.75rem;
    align-items: center;
}

.community-page .community-bars--groups .community-bar-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.community-page .community-bar-label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.3;
}

.community-page .community-bar-badge {
    display: inline-block;
    width: fit-content;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
    background: linear-gradient(90deg, var(--community-cyan), var(--community-violet));
}

.community-page .community-bar-track {
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.community-page .community-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--community-violet), var(--community-rose));
    min-width: 4px;
    transition: width 0.6s ease;
}

.community-page .community-bar-fill--style {
    background: linear-gradient(90deg, var(--community-cyan), var(--community-violet));
}

.community-page .community-bar-fill--group {
    background: linear-gradient(90deg, var(--community-emerald), var(--community-cyan));
}

.community-page .community-bar-row.is-top .community-bar-label > span:last-child {
    color: #fff;
}

.community-page .community-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.community-page .community-empty-icon {
    font-size: 2rem;
    color: var(--community-violet);
    margin-bottom: 0.75rem;
}

.community-page .community-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #f1f5f9;
}

.community-page .community-empty p {
    margin: 0 auto 1.25rem;
    max-width: 28rem;
    color: rgba(203, 213, 225, 0.82);
    line-height: 1.5;
}

.community-page .community-cta {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(600px 280px at 50% 0%, rgba(124, 140, 255, 0.2), transparent 60%),
        rgba(12, 14, 28, 0.85);
    padding: 2rem 1.5rem;
    text-align: center;
}

.community-page .community-cta h2 {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
    color: #f8fafc;
}

.community-page .community-cta p {
    margin: 0 auto 1.15rem;
    max-width: 32rem;
    color: rgba(203, 213, 225, 0.85);
    line-height: 1.5;
}

.community-page .community-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.community-page .community-btn-primary,
.community-page .community-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.community-page .community-btn-primary {
    color: #0f172a;
    background: linear-gradient(90deg, var(--community-cyan), var(--community-violet));
    box-shadow: 0 8px 24px rgba(50, 216, 255, 0.25);
}

.community-page .community-btn-secondary {
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
}

.community-page .community-btn-primary:hover,
.community-page .community-btn-secondary:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

@media (max-width: 768px) {
    .community-page .community-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .community-page .community-header-icon {
        display: none;
    }

    .community-page .community-grid {
        grid-template-columns: 1fr;
    }

    .community-page .community-bar-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* Light mode */
body.light-mode .community-page .community-header,
html[data-theme="light"] .community-page .community-header {
    background:
        radial-gradient(900px 480px at 0% 0%, rgba(52, 211, 153, 0.12), transparent 55%),
        radial-gradient(720px 380px at 100% 0%, rgba(124, 140, 255, 0.15), transparent 48%),
        linear-gradient(155deg, #f8fafc 0%, #eef2ff 100%);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

body.light-mode .community-page .community-hero-lead,
html[data-theme="light"] .community-page .community-hero-lead,
body.light-mode .community-page .community-hero-hint,
html[data-theme="light"] .community-page .community-hero-hint {
    color: rgba(30, 41, 59, 0.78);
}

body.light-mode .community-page .community-card,
html[data-theme="light"] .community-page .community-card {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

body.light-mode .community-page .community-card-head h2,
html[data-theme="light"] .community-page .community-card-head h2,
body.light-mode .community-page .community-bar-label,
html[data-theme="light"] .community-page .community-bar-label {
    color: #0f172a;
}

body.light-mode .community-page .community-card-desc,
html[data-theme="light"] .community-page .community-card-desc,
body.light-mode .community-page .community-disclaimer,
html[data-theme="light"] .community-page .community-disclaimer {
    color: rgba(30, 41, 59, 0.72);
}

body.light-mode .community-page .community-bar-track,
html[data-theme="light"] .community-page .community-bar-track {
    background: rgba(15, 23, 42, 0.08);
}

body.light-mode .community-page .community-cta,
html[data-theme="light"] .community-page .community-cta {
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .community-page .community-cta h2,
html[data-theme="light"] .community-page .community-cta h2 {
    color: #0f172a;
}

body.light-mode .community-page .community-btn-secondary,
html[data-theme="light"] .community-page .community-btn-secondary {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.8);
}
