/* ================================================
   COMMUNITY PAGE
================================================ */

.community-page {
    padding-bottom: 4rem;
}

.community-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 2.5rem 0 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.community-hero__title {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.4rem;
}

.community-hero__title .material-symbols-outlined {
    font-size: 2rem;
    color: #60a5fa;
}

.community-hero__subtitle {
    color: #94a3b8;
    font-size: 1rem;
    margin: 0;
}

.community-section {
    margin-bottom: 3rem;
}

.section-header__sub {
    font-size: 0.85rem;
    color: #6b7280;
    margin-left: auto;
}

/* ================================================
   SUPPORTER WALL
================================================ */

.supporter-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.supporter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.supporter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
}

.supporter-card__avatar .material-symbols-outlined {
    font-size: 3rem;
    color: #f59e0b;
    opacity: 0.9;
}

.supporter-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f1f5f9;
    text-align: center;
    word-break: break-word;
}

.supporter-card__since {
    font-size: 0.75rem;
    color: #9ca3af;
}

.supporter-cta {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

/* ================================================
   TWO-COLUMN LAYOUT (builders + liked)
================================================ */

.community-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ================================================
   LEADERBOARD LIST
================================================ */

.community-leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.community-leaderboard__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.community-leaderboard__item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.community-leaderboard__rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    flex-shrink: 0;
}

.community-leaderboard__item:nth-child(1) .community-leaderboard__rank {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.community-leaderboard__item:nth-child(2) .community-leaderboard__rank {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.community-leaderboard__item:nth-child(3) .community-leaderboard__rank {
    background: rgba(180, 120, 60, 0.2);
    color: #cd7f32;
}

.community-leaderboard__identity {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.community-leaderboard__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-leaderboard__name:hover {
    color: #60a5fa;
}

.community-leaderboard__author {
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
}

.community-leaderboard__author:hover {
    color: #9ca3af;
}

.community-leaderboard__meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #6b7280;
    flex-shrink: 0;
    white-space: nowrap;
}

.community-leaderboard__meta .material-symbols-outlined {
    font-size: 0.9rem;
}

/* ================================================
   NEWEST MEMBERS GRID
================================================ */

.newest-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 1rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.12s ease;
}

.member-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(96, 165, 250, 0.3);
}

.member-card__avatar .material-symbols-outlined {
    font-size: 2.5rem;
    color: #475569;
}

.member-card__name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #e2e8f0;
    text-align: center;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.member-card__joined {
    font-size: 0.72rem;
    color: #6b7280;
    text-align: center;
}

/* ================================================
   ARCHETYPE SPECIALISTS
================================================ */

.archetype-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}

.archetype-tab {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(129, 140, 248, 0.06);
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    white-space: nowrap;
}

.archetype-tab:hover {
    background: rgba(129, 140, 248, 0.14);
    color: #e2e8f0;
    border-color: rgba(129, 140, 248, 0.45);
}

.archetype-tab--active {
    background: rgba(129, 140, 248, 0.18);
    color: #c7d2fe;
    border-color: rgba(129, 140, 248, 0.55);
}

.archetype-panel {
    display: none;
}

.archetype-panel--active {
    display: block;
}

body:not(.dark-mode) .archetype-tab {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
    color: #4b5563;
}

body:not(.dark-mode) .archetype-tab--active {
    background: rgba(99, 102, 241, 0.14);
    color: #3730a3;
    border-color: rgba(99, 102, 241, 0.5);
}

/* ================================================
   EMPTY STATE
================================================ */

.community-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 2rem;
    color: #4b5563;
    text-align: center;
}

.community-empty .material-symbols-outlined {
    font-size: 2.5rem;
}

.community-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* ================================================
   RESPONSIVE
================================================ */

@media (max-width: 768px) {
    .community-two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .supporter-wall {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .newest-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .community-hero__title {
        font-size: 1.5rem;
    }
}

/* ================================================
   LIGHT MODE OVERRIDES
================================================ */

body:not(.dark-mode) .community-hero {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

body:not(.dark-mode) .community-leaderboard__item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body:not(.dark-mode) .community-leaderboard__item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body:not(.dark-mode) .community-leaderboard__name {
    color: #1e293b;
}

body:not(.dark-mode) .community-leaderboard__name:hover {
    color: #2563eb;
}

body:not(.dark-mode) .community-leaderboard__author {
    color: #64748b;
}

body:not(.dark-mode) .member-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body:not(.dark-mode) .member-card:hover {
    background: #f1f5f9;
}

body:not(.dark-mode) .member-card__name {
    color: #1e293b;
}

body:not(.dark-mode) .member-card__avatar .material-symbols-outlined {
    color: #94a3b8;
}

body:not(.dark-mode) .supporter-card__name {
    color: #1e293b;
}
