/* ============================================
   Papo de Psicólogos — Styles
   ============================================ */

:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #00B894;
    --secondary-dark: #00A381;
    --accent: #FD79A8;
    --bg: #F8F9FE;
    --bg-card: #FFFFFF;
    --bg-dark: #2D3436;
    --text: #2D3436;
    --text-light: #636E72;
    --text-muted: #B2BEC3;
    --border: #DFE6E9;
    --border-light: #F0F0F5;
    --shadow: 0 2px 12px rgba(108, 92, 231, 0.08);
    --shadow-lg: 0 8px 30px rgba(108, 92, 231, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    border: none;
    text-decoration: none;
}
.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    padding: 6px 10px;
}
.btn-ghost:hover {
    background: var(--border-light);
    color: var(--primary);
}

/* ---- Header ---- */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--primary);
    line-height: 1.2;
}

.tagline {
    font-size: 12px;
    color: var(--text-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

#user-name {
    font-weight: 500;
    font-size: 14px;
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #A29BFE 50%, var(--accent) 100%);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    max-width: 700px;
    margin: 0 auto 16px;
    line-height: 1.3;
}

.hero p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.inspiration-prompt {
    margin-top: 30px;
    padding: 14px 28px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    display: inline-block;
    font-style: italic;
    font-size: 15px;
}

/* ---- Psychologist Carousel ---- */
.psi-carousel-section {
    background: linear-gradient(135deg, #f8f7ff 0%, #f0eeff 100%);
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border);
}

.psi-carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}

.psi-carousel-link:hover {
    opacity: 0.92;
}

.psi-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.psi-carousel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.psi-carousel-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    opacity: 0.7;
    transition: opacity 0.15s;
}

.psi-carousel-link:hover .psi-carousel-cta {
    opacity: 1;
}

.psi-carousel-nav {
    display: flex;
    gap: 6px;
}

.psi-carousel-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.psi-carousel-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8f7ff;
}

.psi-carousel-track {
    overflow: hidden;
    padding: 4px 0;
}

.psi-carousel-inner {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: psi-scroll 120s linear infinite;
}

.psi-carousel-inner:hover {
    animation-play-state: paused;
}

@keyframes psi-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.psi-carousel-placeholder {
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px;
    text-align: center;
    width: 100%;
}

.psi-card {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    cursor: default;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.psi-card-clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.psi-card-clickable:hover .psi-card-photo {
    border-color: #f1c40f;
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.4);
}

.psi-card-tier-badge {
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    padding: 1px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.psi-card:hover {
    transform: translateY(-2px);
}

/* Mosaic Overlay */
.psi-mosaic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.psi-mosaic-container {
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    width: 100%;
    max-width: 1100px;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.psi-mosaic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border, #e0e0e0);
}

.psi-mosaic-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin: 0;
}

.psi-mosaic-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-muted, #999);
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.psi-mosaic-close:hover {
    background: var(--surface, #f5f5f5);
    color: var(--text-primary, #333);
}

.psi-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.psi-mosaic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid var(--border, #e0e0e0);
    background: var(--surface, #fafafa);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.psi-mosaic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary, #6C5CE7);
}

.psi-mosaic-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid var(--border, #e0e0e0);
}

.psi-mosaic-card:hover .psi-mosaic-photo {
    border-color: var(--primary, #6C5CE7);
}

.psi-mosaic-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.psi-mosaic-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.psi-mosaic-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    line-height: 1.3;
}

.psi-mosaic-crp {
    font-size: 11px;
    color: var(--text-muted, #999);
}

.psi-mosaic-desc {
    font-size: 11px;
    color: var(--text-secondary, #666);
    line-height: 1.4;
    margin-top: 4px;
}

.psi-mosaic-available {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #27ae60;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 6px;
    align-self: center;
}

@media (max-width: 768px) {
    .psi-mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .psi-mosaic-container {
        padding: 20px;
    }
    .psi-mosaic-overlay {
        padding: 20px 12px;
    }
}

@media (max-width: 480px) {
    .psi-mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .psi-mosaic-photo {
        width: 60px;
        height: 60px;
    }
    .psi-mosaic-name {
        font-size: 12px;
    }
}

.psi-card-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--primary-light);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.psi-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.psi-card-photo .psi-card-initials {
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
}

.psi-card-initials-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    background: var(--primary);
}

.psi-card-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psi-card-city {
    font-size: 10px;
    color: var(--text-light);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psi-card-crp {
    font-size: 9px;
    color: var(--primary);
    background: rgba(108, 92, 231, 0.08);
    padding: 2px 8px;
    border-radius: 50px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

/* ---- Filters ---- */
.filters-section {
    background: #fff;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 65px;
    z-index: 90;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    transition: border-color var(--transition);
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-tag {
    padding: 6px 16px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-tag:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.origin-filter {
    display: flex;
    gap: 8px;
}

.origin-btn {
    padding: 6px 16px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.origin-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.origin-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* ---- Feed ---- */
.feed-section {
    padding: 40px 0;
}

.feed-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.feed-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
}

.feed-tab:hover {
    color: var(--primary);
    background: var(--border-light);
    border-radius: 8px 8px 0 0;
}

.feed-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.btn-fetch-articles {
    margin-left: auto;
    padding: 8px 16px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    align-self: center;
    margin-bottom: 4px;
}
.btn-fetch-articles:hover {
    background: var(--primary);
    color: #fff;
}
.btn-fetch-articles.fetching {
    pointer-events: none;
    opacity: .7;
}
.btn-fetch-articles .spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.feed-content {
    min-height: 200px;
}

.articles-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    width: 100%;
}
.articles-grid > * {
    min-width: 0;
    max-width: 100%;
}
.articles-grid > .article-card,
.articles-grid > a.article-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}
@media (max-width: 900px) { .articles-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px) { .articles-grid { grid-template-columns: 1fr !important; } }

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Comments Feed Tab */
.comments-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-feed-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition);
}

.comment-feed-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.comment-feed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-feed-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.comment-feed-article {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.comment-badge-reply {
    font-size: 10px;
    background: var(--border-light);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---- Article Card ---- */
/* Affiliate card in feed */
.affiliate-feed-card {
    background: linear-gradient(135deg, #6C5CE7 0%, #a855f7 100%) !important;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border: none !important;
}
.affiliate-feed-card .article-card-body { color: #fff; }
.affiliate-feed-card h4 { color: #fff !important; }
.affiliate-feed-card .article-card-summary { color: rgba(255,255,255,0.85) !important; }
.affiliate-feed-icon {
    font-size: 48px;
    text-align: center;
    padding: 20px 0 0;
}
.affiliate-tag {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}
.affiliate-cta-mini {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
}
.affiliate-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,92,231,0.4) !important;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

a.article-card.has-image {
    display: flex;
    flex-direction: column;
}

a.comment-feed-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card-img {
    height: 140px;
    overflow: hidden;
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card-body {
    padding: 14px;
    flex: 1;
    min-width: 0;
}

.article-card:not(.has-image) {
    padding: 16px;
}

.article-card:not(.has-image) .article-card-body {
    padding: 0;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.article-card-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--border-light);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text);
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.article-card-source {
    font-weight: 500;
    color: var(--text-light);
}

.article-card-domain {
    display: inline-block;
    font-size: 11px;
    color: var(--primary);
    margin-bottom: 8px;
    opacity: 0.8;
}

.article-card-summary {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.article-like-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.article-like-btn:hover {
    border-color: var(--accent);
    background: rgba(255, 118, 117, 0.08);
    transform: scale(1.05);
}

.article-like-btn.liked {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 118, 117, 0.08);
}

.article-card-comments {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-view {
    padding: 6px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-view:hover {
    background: var(--primary-dark);
}

/* ---- Load More Button ---- */
.btn-load-more {
    margin-top: 8px;
    padding: 12px 20px;
    border-style: dashed;
    font-size: 13px;
    color: var(--text-light);
    border-color: var(--border);
}

.btn-load-more:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108, 92, 231, 0.04);
}

/* ---- Translate Button ---- */
.btn-translate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #EDE7F6;
    border: 1px solid var(--primary-light);
    border-radius: 50px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 10px;
}

.btn-translate:hover {
    background: var(--primary);
    color: #fff;
}

.btn-translate:disabled {
    opacity: 0.6;
    cursor: wait;
}

.translate-result {
    padding: 10px 14px;
    background: #F3E5F5;
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 10px;
}

/* ---- PWA Install Banner ---- */
.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.pwa-banner-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pwa-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-banner-text strong {
    font-size: 14px;
}

.pwa-banner-text span {
    font-size: 12px;
    opacity: 0.85;
}

.pwa-banner .btn-primary {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    flex-shrink: 0;
}

.pwa-banner .btn-primary:hover {
    background: #f0f0f5;
}

.pwa-banner-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.pwa-banner-close:hover {
    color: #fff;
}

@media (max-width: 480px) {
    .pwa-banner-content {
        flex-wrap: wrap;
    }
    .pwa-banner-text {
        min-width: 150px;
    }
}

/* ---- Modal ---- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 20px;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

.modal-small {
    max-width: 440px;
}

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

.modal-close {
    position: sticky;
    top: 10px;
    float: right;
    margin: 10px 10px 0 0;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--border-light);
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.modal-close:hover {
    background: var(--border);
}

.modal-body {
    padding: 30px;
}

/* Modal Article */
.article-source-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.modal-article h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-article-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 20px;
}

.modal-article-content p {
    margin-bottom: 12px;
}

.modal-article > .btn {
    margin-bottom: 30px;
}

/* Modal Discussion */
.modal-discussion {
    border-top: 2px solid var(--border-light);
    padding-top: 24px;
}

.modal-discussion h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 12px;
}

.discussion-prompt {
    background: linear-gradient(135deg, rgba(108,92,231,0.08), rgba(162,155,254,0.08));
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 3px solid var(--primary);
}

.discussion-prompt p {
    font-style: italic;
    color: var(--primary);
    font-size: 14px;
}

.login-prompt {
    text-align: center;
    padding: 30px;
    background: var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.login-prompt p {
    margin-bottom: 12px;
    color: var(--text-light);
}

/* Comment Form */
.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color var(--transition);
}

.comment-form textarea:focus {
    border-color: var(--primary);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* Sort Options */
.sort-options {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sort-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.sort-btn.active {
    background: var(--bg);
    border-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

/* Comments */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
}

.comment-author-link {
    color: #6C5CE7;
    text-decoration: none;
    cursor: pointer;
}

.comment-author-link:hover {
    text-decoration: underline;
}

.comment-avatar-link {
    text-decoration: none;
}

.comment-profile-link {
    font-size: 12px;
    color: #6C5CE7;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #e0d8ff;
    border-radius: 16px;
    background: #f8f6ff;
    transition: background 0.2s;
    white-space: nowrap;
}

.comment-profile-link:hover {
    background: #ede8ff;
    text-decoration: none;
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}

.comment-action:hover {
    background: var(--border-light);
    color: var(--primary);
}

.comment-action.liked {
    color: var(--accent);
}

.comment-owner-action {
    opacity: 0.6;
}

.comment-owner-action:hover {
    opacity: 1;
}

.comment-delete:hover {
    color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.1) !important;
}

.comment-edited {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 4px;
}

.edit-comment-input {
    width: 100%;
    min-height: 60px;
    padding: 10px 12px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: var(--bg-card);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.edit-comment-input:focus {
    outline: none;
    border-color: var(--primary);
}

.edit-comment-actions {
    display: flex;
    gap: 8px;
}

/* Reactions */
.comment-reactions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.reaction-pill:hover {
    background: #EDE7F6;
    border-color: var(--primary-light);
}

.reaction-pill.reaction-active {
    background: #EDE7F6;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.reaction-add {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px dashed var(--border);
    border-radius: 50%;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.reaction-add:hover {
    background: var(--border-light);
    border-color: var(--primary-light);
    color: var(--primary);
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    margin-bottom: 6px;
}

.reaction-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition);
}

.reaction-option:hover {
    background: var(--border-light);
    transform: scale(1.2);
}

/* Article actions row */
.modal-article-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.btn-accent {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-accent:hover {
    opacity: .9;
    transform: translateY(-1px);
}
.btn-generate-post {
    font-size: 14px;
}

/* Article Frame Modal (iframe) */
.modal-frame {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.frame-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.frame-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.frame-domain {
    font-size: 12px;
    color: var(--text-muted);
}

.frame-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.frame-header-actions .modal-close {
    position: static;
}

.frame-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.frame-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.frame-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.frame-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #fff;
    padding: 40px;
    text-align: center;
}

.frame-fallback p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 8px;
}

/* Source link in modal */
.modal-source-link {
    margin-left: auto;
}

.modal-source-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color var(--transition);
}

.modal-source-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Replies */
.replies {
    margin-top: 12px;
    margin-left: 20px;
    padding-left: 16px;
    border-left: 2px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply {
    padding: 12px;
    background: #fff;
    border-radius: var(--radius-sm);
}

.reply-form {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.reply-form input {
    flex: 1;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.reply-form input:focus {
    border-color: var(--primary);
}

.reply-form button {
    padding: 8px 16px;
}

/* ---- Login Modal ---- */
.login-modal-body {
    text-align: center;
}

.login-header {
    margin-bottom: 24px;
}

.login-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.login-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
}

.login-error {
    padding: 10px 14px;
    background: #FFF0F0;
    border: 1px solid #FFD0D0;
    border-radius: var(--radius-sm);
    color: #D63031;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}

.login-divider {
    text-align: center;
    margin: 20px 0 16px;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    background: #fff;
    padding: 0 12px;
    position: relative;
    font-size: 13px;
    color: var(--text-muted);
}

.login-help {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.remember-me-row {
    display: flex; align-items: center; margin: 8px 0 4px;
}
.remember-me-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem; color: #636e72; cursor: pointer;
    user-select: none;
}
.remember-me-label input[type="checkbox"] {
    accent-color: #6c5ce7; width: 16px; height: 16px; cursor: pointer;
}

.btn-forgot-password {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    text-align: center;
    font-family: inherit;
}

.btn-forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.forgot-password-text {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.forgot-password-message {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.forgot-success {
    background: #F0FFF4;
    border: 1px solid #C6F6D5;
    color: #276749;
}

.forgot-error {
    background: #FFF0F0;
    border: 1px solid #FFD0D0;
    color: #D63031;
}

.forgot-fallback-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--primary);
    font-size: 12px;
    text-decoration: underline;
}

/* ---- Community Section ---- */
.community-section {
    padding: 50px 0;
    background: #fff;
}

.community-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.community-section > .container > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.trending-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.trending-card {
    padding: 18px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition);
}

.trending-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.trending-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.trending-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

/* ---- Empty States ---- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Community Links ---- */
/* Affiliate Section */
.affiliate-section { padding: 50px 0; background: var(--bg); }
.affiliate-card { position: relative; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); padding: 0; }
.affiliate-glow { position: absolute; top: -60%; right: -20%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(108,92,231,0.25) 0%, transparent 70%); pointer-events: none; }
.affiliate-content { position: relative; z-index: 1; padding: 40px 36px; }
.affiliate-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #a78bfa; background: rgba(167,139,250,0.12); padding: 5px 14px; border-radius: 20px; border: 1px solid rgba(167,139,250,0.2); margin-bottom: 16px; }
.affiliate-content h2 { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: #fff; margin: 0 0 12px; line-height: 1.3; }
.affiliate-subtitle { font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.7; margin: 0 0 28px; max-width: 600px; }
.affiliate-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.affiliate-step { display: flex; align-items: flex-start; gap: 14px; }
.affiliate-step-num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #6C5CE7, #a855f7); color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.affiliate-step strong { color: #fff; font-size: 14px; display: block; margin-bottom: 2px; }
.affiliate-step p { color: rgba(255,255,255,0.55); font-size: 13px; margin: 0; line-height: 1.4; }
.affiliate-highlight { display: flex; align-items: flex-start; gap: 10px; background: rgba(253,203,110,0.1); border: 1px solid rgba(253,203,110,0.25); border-radius: 12px; padding: 14px 16px; margin-bottom: 28px; }
.affiliate-highlight span { font-size: 20px; flex-shrink: 0; }
.affiliate-highlight p { color: rgba(255,255,255,0.7); font-size: 13px; margin: 0; line-height: 1.5; }
.affiliate-cta { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 12px; font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6C5CE7, #a855f7); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 20px rgba(108,92,231,0.4); }
.affiliate-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(108,92,231,0.5); }
.affiliate-note { font-size: 12px; color: rgba(255,255,255,0.4); margin: 12px 0 0; }
@media (max-width: 640px) {
    .affiliate-content { padding: 28px 20px; }
    .affiliate-content h2 { font-size: 22px; }
    .affiliate-cta { width: 100%; justify-content: center; padding: 14px 20px; }
}

.links-section {
    padding: 50px 0;
    background: var(--bg);
}

.links-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.links-section > .container > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.link-card {
    display: flex;
    gap: 18px;
    padding: 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.link-card-telegram {
    border-color: #E3F2FD;
}
.link-card-telegram:hover {
    border-color: #0088cc;
}
.link-card-telegram .link-card-icon {
    color: #0088cc;
    background: #E3F2FD;
}
.link-card-telegram .link-card-cta {
    color: #0088cc;
}

.link-card-whatsapp {
    border-color: #E8F5E9;
}
.link-card-whatsapp:hover {
    border-color: #25D366;
}
.link-card-whatsapp .link-card-icon {
    color: #25D366;
    background: #E8F5E9;
}
.link-card-whatsapp .link-card-cta {
    color: #25D366;
}

.link-card-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-card-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.link-card-content p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 10px;
}

.link-card-cta {
    font-size: 13px;
    font-weight: 600;
}

/* Sponsor Offer Section */
.sponsor-offer-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f6ff 0%, #eee8ff 100%);
}

.sponsor-offer-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(108,92,231,0.12);
    border: 2px solid #e8e0ff;
}

.sponsor-offer-header {
    text-align: center;
    margin-bottom: 30px;
}

.sponsor-offer-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.sponsor-offer-header h2 {
    font-size: 1.6rem;
    color: #2d3436;
    margin: 0 0 8px;
}

.sponsor-offer-header p {
    color: #636e72;
    font-size: 0.95rem;
    margin: 0;
}

.sponsor-offer-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.sponsor-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f6ff;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #2d3436;
}

.sponsor-benefit span {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sponsor-offer-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sponsor-plan {
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sponsor-plan:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108,92,231,0.15);
}

.sponsor-plan-annual {
    border-color: #6C5CE7;
    background: linear-gradient(135deg, #faf8ff 0%, #f0ebff 100%);
}

.sponsor-plan-badge {
    display: inline-block;
    background: #6C5CE7;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.sponsor-plan-badge-vip {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
}

.sponsor-plan h3 {
    font-size: 1.2rem;
    color: #2d3436;
    margin: 0 0 12px;
}

.sponsor-plan-price {
    margin-bottom: 8px;
}

.sponsor-price-original {
    display: block;
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.sponsor-price-value {
    font-size: 2rem;
    font-weight: 800;
    color: #6C5CE7;
}

.sponsor-price-period {
    font-size: 0.9rem;
    color: #636e72;
}

.sponsor-plan-savings {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 12px;
}

.sponsor-plan-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #6C5CE7;
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
}

.sponsor-plan-btn:hover {
    background: #5a4bd1;
    transform: scale(1.02);
}

.sponsor-plan-btn-vip {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
}

.sponsor-plan-btn-vip:hover {
    background: linear-gradient(135deg, #e67e22, #c0392b);
}

@media (max-width: 600px) {
    .sponsor-offer-benefits {
        grid-template-columns: 1fr;
    }
    .sponsor-offer-plans {
        grid-template-columns: 1fr;
    }
    .sponsor-offer-card {
        padding: 24px 16px;
    }
    .sponsor-price-value {
        font-size: 1.6rem;
    }
}

/* Ranking Section */
.ranking-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.ranking-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.ranking-section > .container > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 14px;
}

.ranking-list {
    max-width: 600px;
    margin: 0 auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.ranking-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.ranking-top3 {
    border-left: 3px solid var(--primary);
}

.ranking-position {
    font-size: 20px;
    min-width: 32px;
    text-align: center;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.ranking-bar-bg {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.ranking-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.ranking-details {
    font-size: 11px;
    color: var(--text-muted);
}

.ranking-score {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Footer ---- */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    font-size: 14px;
    opacity: 0.9;
}

.footer-sub {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 6px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .feed-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .hero h2 {
        font-size: 22px;
    }

    .hero {
        padding: 40px 0 30px;
    }

    .search-bar {
        flex-direction: column;
    }

    .filter-tags {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .modal {
        padding: 10px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-article h2 {
        font-size: 20px;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filters-section {
        position: static;
    }

    .psi-card {
        flex: 0 0 90px;
    }

    .psi-card-photo {
        width: 52px;
        height: 52px;
    }

    .psi-card-photo .psi-card-initials {
        font-size: 17px;
    }

    .psi-carousel-track {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 18px;
    }
}

/* ============================================
   Profile Page Styles
   ============================================ */

/* Sponsor profile banner */
.sponsor-banner {
    background: linear-gradient(135deg, #6C5CE7, #a855f7);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.sponsor-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sponsor-banner-star {
    font-size: 16px;
}

.profile-page {
    padding: 24px 0 60px;
    min-height: 60vh;
}

.profile-back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: opacity 0.2s;
}

.profile-back-link:hover {
    opacity: 0.7;
}

.profile-loading {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

.profile-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.profile-not-found {
    text-align: center;
    padding: 60px 0;
}

.profile-not-found h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.profile-not-found p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.profile-content {
    max-width: 680px;
    margin: 0 auto;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 32px;
    background: linear-gradient(135deg, #f8f7ff 0%, #f0eeff 100%);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.profile-photo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-photo {
    width: 140px;
    aspect-ratio: 12 / 16;
    border-radius: 16px;
    border: 4px solid var(--primary-light);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-initials {
    color: #fff;
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
}

.profile-tier-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    padding: 3px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(241, 196, 15, 0.3);
    white-space: nowrap;
}

.profile-tier-badge.tier-ouro {
    display: inline-block;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.profile-crp {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-city {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.profile-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-status.status-ativo {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.profile-status.status-inativo {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.profile-available {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #27ae60;
    margin-top: 4px;
}

.profile-bio-text {
    white-space: pre-line;
    line-height: 1.7;
    color: var(--text-secondary);
}

.profile-price-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #27ae60;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.profile-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 14px;
}

.schedule-day strong {
    color: var(--text-primary);
}

.schedule-day span {
    color: var(--text-secondary);
}

.profile-source-note {
    text-align: center;
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
}

.profile-source-note p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.profile-source-note a {
    color: var(--primary);
    text-decoration: underline;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.profile-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.profile-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.profile-cta {
    display: block;
    text-align: center;
    width: 100%;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #25D366;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #1ebe57;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-whatsapp svg {
    flex-shrink: 0;
}

/* Profile CTA section — two buttons stacked */
.profile-cta-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-marcar-consulta {
    background: linear-gradient(135deg, #6C5CE7, #a855f7) !important;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3) !important;
}

.btn-marcar-consulta:hover {
    background: linear-gradient(135deg, #5a4bd1, #9333ea) !important;
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4) !important;
}

.btn-conhecer-psi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #25D366;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-conhecer-psi:hover {
    background: #1ebe57;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-conhecer-psi svg {
    flex-shrink: 0;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(108, 92, 231, 0.08);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(108, 92, 231, 0.15);
}

@media (max-width: 600px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .profile-photo {
        width: 120px;
        aspect-ratio: 12 / 16;
    }

    .profile-photo-initials {
        font-size: 32px;
    }

    .profile-name {
        font-size: 22px;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Admin Panel Styles
   ============================================ */

.btn-admin {
    background: #E17055;
    color: #fff;
    border: none;
}
.btn-admin:hover {
    background: #D35400;
}

.btn-danger {
    background: #D63031;
    color: #fff;
    border: none;
}
.btn-danger:hover {
    background: #C0392B;
}

.modal-admin {
    width: 95vw;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 36px;
    background: linear-gradient(180deg, #2D3436 0%, #3E4447 100%);
    color: #fff;
    border-top: 4px solid #E17055;
    border-radius: var(--radius-lg);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.admin-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #fff;
}

.admin-notification {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.admin-notification-success {
    background: #00B894;
    color: #fff;
}
.admin-notification-error {
    background: #D63031;
    color: #fff;
}

/* Stats Grid */
.admin-stats-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.admin-stat-card {
    flex: 1;
    min-width: 120px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}

.admin-stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-stat-ok { color: #00B894; font-size: 14px; }
.admin-stat-warn { color: #FDCB6E; font-size: 14px; }

.admin-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 0;
}

.admin-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.admin-tab:hover {
    color: rgba(255,255,255,0.8);
}

.admin-tab.active {
    color: #E17055;
    border-bottom-color: #E17055;
}

.admin-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.admin-section {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.admin-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
}

.admin-section-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
}

/* Plan Info */
.plan-info-grid { display: flex; flex-direction: column; gap: 4px; }
.plan-info-item {
    font-size: 0.8rem; color: rgba(255,255,255,0.7); padding: 4px 0;
}
.plan-info-item strong { color: #fdcb6e; }

/* News Filter Config */
.news-filter-config { margin-top: 12px; }
.news-sources-list {
    display: flex; flex-direction: column; gap: 6px; margin-top: 4px;
}
.news-source-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: rgba(255,255,255,0.8); cursor: pointer;
}
.news-source-item input[type="checkbox"] {
    accent-color: #6c5ce7; width: 16px; height: 16px;
}

.admin-rankings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Ranking Table */
.admin-ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-ranking-table thead th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-ranking-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background var(--transition);
}

.admin-ranking-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

.admin-ranking-table td {
    padding: 10px 12px;
    color: rgba(255,255,255,0.85);
}

.ranking-pos {
    font-size: 16px;
    width: 36px;
}

.ranking-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.ranking-avatar {
    width: 28px;
    height: 28px;
    background: rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.ranking-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-light);
}

.ranking-total {
    color: #E17055;
}

/* Admin Profile Management */
.admin-profile-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.05); margin-bottom: 6px; }
.admin-profile-row.is-hidden { opacity: 0.5; }
.admin-profile-row.is-excluded { opacity: 0.35; text-decoration: line-through; }
.admin-profile-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: rgba(108,92,231,0.3); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; overflow: hidden; }
.admin-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-profile-info { flex: 1; min-width: 0; }
.admin-profile-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-profile-meta { font-size: 11px; color: rgba(255,255,255,0.5); }
.admin-profile-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.admin-profile-badge-hidden { background: #fdcb6e; color: #2d3436; }
.admin-profile-badge-excluded { background: #d63031; color: #fff; }
.admin-profile-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-profile-btn { padding: 5px 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; font-size: 11px; font-weight: 500; cursor: pointer; background: transparent; color: rgba(255,255,255,0.7); transition: all 0.15s; }
.admin-profile-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.admin-profile-btn-danger { border-color: rgba(214,48,49,0.5); color: #ff7675; }
.admin-profile-btn-danger:hover { background: rgba(214,48,49,0.2); color: #ff7675; }
.admin-profile-btn-restore { border-color: rgba(0,184,148,0.5); color: #55efc4; }
.admin-profile-btn-restore:hover { background: rgba(0,184,148,0.2); color: #55efc4; }

/* API Config */
.admin-api-fields {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.admin-field-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}

.admin-field-input {
    display: flex;
    gap: 8px;
}

.admin-field-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition);
}

.admin-field-input input::placeholder {
    color: rgba(255,255,255,0.3);
}

.admin-field-input input:focus {
    border-color: #E17055;
}

.admin-field-readonly input {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background var(--transition);
}

.btn-icon:hover {
    background: rgba(255,255,255,0.2);
}

.admin-api-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-api-help {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.admin-api-help h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.8);
}

.admin-help-item {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    line-height: 1.5;
}

.admin-help-item strong {
    color: #E17055;
}

.admin-help-item code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Tools Grid */
.admin-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.admin-tool-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 20px;
}

.admin-tool-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #fff;
}

.admin-tool-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    margin-bottom: 14px;
}

.admin-tool-danger {
    border-color: rgba(214, 48, 49, 0.3);
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-rankings-grid {
        grid-template-columns: 1fr;
    }
    .admin-stats-grid {
        gap: 10px;
    }
    .admin-stat-card {
        min-width: 80px;
    }
    .admin-tools-grid {
        grid-template-columns: 1fr;
    }
    .admin-ranking-table {
        font-size: 11px;
    }
    .admin-ranking-table td,
    .admin-ranking-table th {
        padding: 6px 8px;
    }
}

/* ============================================
   Avatar with Photo
   ============================================ */
.comment-avatar-photo {
    overflow: hidden;
    padding: 0 !important;
}

.comment-avatar-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ============================================
   Post Generator Module
   ============================================ */
.modal-post-generator {
    max-width: 700px;
    max-height: 95vh;
    overflow-y: auto;
}

.modal-post-generator .modal-body h2 {
    margin-bottom: 4px;
}

.post-gen-subtitle {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.post-gen-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.post-gen-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.post-color-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.post-color-btn:hover {
    transform: scale(1.15);
}

.post-color-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.post-photo-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-gen-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
}

.post-gen-preview canvas {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.post-gen-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Slide editors (collapsible) */
.slide-editors {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.slide-editor-toggle {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
}
.slide-editor-toggle:hover,
.slide-editor-toggle.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108,92,231,0.05);
}
.slide-editor-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    transition: max-height .2s ease, padding .2s ease, opacity .2s ease;
    max-height: 200px;
    opacity: 1;
}
.slide-editor-text.collapsed {
    max-height: 0;
    padding: 0 12px;
    opacity: 0;
    overflow: hidden;
    border: none;
}
.slide-editor-text:focus {
    outline: none;
    border-color: var(--primary);
}
.post-gen-hint {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-muted);
}
/* Typography row */
.post-gen-row {
    display: flex;
    gap: 12px;
}
.post-gen-col {
    flex: 1;
}
.post-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}
.post-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Style buttons group */
.post-gen-btn-group {
    display: flex;
    gap: 4px;
}
.post-style-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.post-style-btn:hover {
    border-color: var(--primary);
}
.post-style-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.post-style-btn-white {
    background: #fff;
    border: 1px solid #ccc;
}
.post-style-btn-black {
    background: #1a1a2e;
}
.post-style-btn-yellow {
    background: #f1c40f;
}

.post-text-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color var(--transition);
}

.post-text-input:focus {
    border-color: var(--primary);
}

.post-instagram-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition);
}

.post-instagram-input:focus {
    border-color: var(--primary);
}

.post-opacity-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.post-opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.post-opacity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.post-gen-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

#post-slide-indicator {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    min-width: 100px;
    text-align: center;
}

@media (max-width: 600px) {
    .modal-post-generator {
        max-width: 100%;
        margin: 8px;
    }

    .post-gen-preview canvas {
        max-width: 100%;
    }

    .post-gen-actions {
        flex-direction: column;
    }
}

/* ============================================
   Community Articles — Editor, Cards, Notifications
   ============================================ */

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}
.notification-bell:hover { background: rgba(108, 92, 231, 0.1); }
.bell-icon { font-size: 1.3rem; }
.notif-badge {
    position: absolute;
    top: 2px; right: 4px;
    background: #d63031;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* Notification Dropdown */
.notif-dropdown {
    position: fixed;
    top: 60px; right: 20px;
    width: 360px; max-height: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 1100;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.notif-dropdown-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}
.notif-dropdown-header .btn-link {
    background: none; border: none; color: #6c5ce7;
    font-size: 0.8rem; cursor: pointer;
}
.notif-list { overflow-y: auto; flex: 1; padding: 8px 0; }
.notif-empty { padding: 24px; text-align: center; color: #999; font-size: 0.9rem; }
.notif-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover { background: #f8f7ff; }
.notif-item-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 2px; }
.notif-item-body { font-size: 0.8rem; color: #666; }
.notif-item-time { font-size: 0.7rem; color: #aaa; margin-top: 4px; }
.notif-item-actions { display: flex; gap: 8px; margin-top: 6px; }
.notif-item-actions .btn { font-size: 0.75rem; padding: 3px 10px; }

/* Feed Header */
.feed-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 20px;
}
.feed-heading { font-size: 1.4rem; font-weight: 700; color: #2d3436; margin: 0; }
.feed-subheading { font-size: 0.9rem; color: #636e72; margin: 4px 0 0; }

/* Mosaic Grid — 4 columns */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
@media (max-width: 1024px) { .mosaic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .mosaic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .mosaic-grid { grid-template-columns: 1fr; } }

/* Mosaic Card */
.mosaic-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.mosaic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(108,92,231,0.15);
}

/* Feed Tabs */
.feed-tabs {
    display: flex; gap: 4px; margin-bottom: 20px;
}
.feed-tab {
    padding: 8px 20px; border: none; background: #f0f0f0;
    border-radius: 8px; font-size: 0.9rem; font-weight: 600;
    color: #636e72; cursor: pointer; transition: all 0.2s;
}
.feed-tab:hover { background: #e9e5ff; color: #6c5ce7; }
.feed-tab.active {
    background: #6c5ce7; color: #fff;
}

/* Prompt Banner */
.prompt-banner {
    background: linear-gradient(135deg, #6c5ce7 0%, #a855f7 100%);
    border-radius: 14px; padding: 20px 24px;
    color: #fff; margin-bottom: 16px;
}
.prompt-label {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; opacity: 0.8;
}
.prompt-title {
    font-size: 1.15rem; font-weight: 700; margin: 6px 0 8px; line-height: 1.35;
}
.prompt-desc {
    font-size: 0.85rem; opacity: 0.9; margin: 0 0 10px; line-height: 1.5;
}
.prompt-meta {
    display: flex; gap: 12px; align-items: center;
    font-size: 0.78rem; opacity: 0.8; margin-bottom: 12px;
}
.prompt-ebook-tag {
    background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 4px;
    font-weight: 600;
}
.prompt-actions { display: flex; gap: 8px; }
.prompt-actions .btn-primary { background: #fff; color: #6c5ce7; }
.prompt-actions .btn-primary:hover { background: #f0ecff; }
.prompt-actions .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.prompt-actions .btn-outline:hover { background: rgba(255,255,255,0.15); }

.prompt-filter-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px; background: #f8f7ff; border-radius: 8px;
    margin-bottom: 12px; font-size: 0.85rem; color: #6c5ce7;
}

/* Feed Search */
.feed-search {
    margin-bottom: 18px;
}
.feed-search input {
    width: 100%; padding: 10px 16px;
    border: 1px solid #e0e0e0; border-radius: 10px;
    font-size: 0.9rem; background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.feed-search input:focus {
    border-color: #6c5ce7; background: #fff; outline: none;
}

/* Author Photo Cover */
.author-cover {
    height: 180px; display: flex; flex-direction: column;
    overflow: hidden;
}
.author-cover-row { display: flex; flex: 1; }
.author-cover-cell {
    flex: 1; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: #fff;
    transition: filter 0.3s;
}
.author-cover-cell:hover { filter: brightness(1.1); }
.author-cover-cell img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.author-cover-name {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 4px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    font-size: 0.68rem; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.author-cover-initial {
    font-size: 2rem; font-weight: 700; color: rgba(255,255,255,0.9);
}

/* Card Body */
.mosaic-body {
    padding: 14px 16px 16px; flex: 1;
    display: flex; flex-direction: column;
}
.mosaic-tag {
    font-size: 0.65rem; font-weight: 700; color: #6c5ce7;
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px;
}
.mosaic-title {
    font-size: 0.95rem; font-weight: 700; line-height: 1.35;
    color: #2d3436; margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mosaic-summary {
    font-size: 0.82rem; color: #636e72; line-height: 1.5;
    flex: 1; margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Mosaic Card Footer */
.mosaic-footer {
    padding-top: 10px; border-top: 1px solid #f0f0f0;
}
.mosaic-author-names {
    font-size: 0.75rem; font-weight: 600; color: #2d3436;
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mosaic-author-links {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.mosaic-profile-link {
    font-size: 0.7rem; font-weight: 600; color: #6c5ce7;
    text-decoration: none; padding: 2px 8px;
    background: #f8f7ff; border-radius: 12px;
    transition: background 0.2s;
    white-space: nowrap;
}
.mosaic-profile-link:hover {
    background: #ede9ff; text-decoration: underline;
}
.mosaic-author-date {
    font-size: 0.68rem; color: #999; display: block;
}
/* Psychologist Profile Card — horizontal layout */
.psi-profile-card {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px; background: #fff; border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none; color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}
.psi-profile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,184,148,0.12);
    border-color: #00b894;
}
.psi-profile-photo {
    width: 80px; height: 80px; min-width: 80px;
    border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.psi-profile-photo img {
    width: 100%; height: 100%; object-fit: cover;
}
.psi-card-fallback {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    font-size: 2rem; font-weight: 700; color: rgba(255,255,255,0.9);
}
.psi-profile-info { flex: 1; min-width: 0; }
.psi-profile-tag {
    font-size: 0.6rem; font-weight: 700; color: #00b894;
    text-transform: uppercase; letter-spacing: 0.8px;
}
.psi-profile-name {
    font-size: 0.9rem; font-weight: 700; color: #2d3436;
    margin: 4px 0 6px; line-height: 1.3;
}
.psi-profile-bio {
    font-size: 0.8rem; color: #636e72; line-height: 1.45;
    margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.psi-profile-meta {
    font-size: 0.7rem; color: #999; margin-bottom: 6px;
}
.psi-profile-cta {
    font-size: 0.75rem; font-weight: 600; color: #00b894;
}
.psi-profile-card:hover .psi-profile-cta { text-decoration: underline; }

/* Grid for psi profile cards — 2 columns */
.psi-profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px; width: 100%;
}
@media (max-width: 900px) { .psi-profiles-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .psi-profile-card { flex-direction: column; align-items: center; text-align: center; }
    .psi-profile-photo { width: 72px; height: 72px; min-width: 72px; }
}

/* Article Read Modal — Authors Bar */
.article-authors-bar {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 12px 0 8px;
}
.article-author-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px 4px 4px;
    background: #f8f7ff; border-radius: 24px;
    text-decoration: none; color: #2d3436;
    font-size: 0.85rem; font-weight: 500;
    transition: background 0.2s, box-shadow 0.2s;
}
.article-author-chip:hover {
    background: #ede9ff; box-shadow: 0 2px 8px rgba(108,92,231,0.15);
}
.article-author-chip img {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
}
.article-author-chip .author-initials {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}
.article-date-line {
    font-size: 0.8rem; color: #999; margin-bottom: 16px;
}

.community-empty-state {
    text-align: center; padding: 48px 20px;
}
.community-empty-state p { color: #999; margin-bottom: 16px; font-size: 1rem; }

.community-drafts-section {
    margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #f0f0f0;
}
.community-drafts-section h3 {
    font-size: 1rem; color: #6c5ce7; margin-bottom: 12px;
}
.draft-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; background: #f8f7ff; border-radius: 8px; margin-bottom: 8px;
}
.draft-card-title { font-weight: 600; font-size: 0.9rem; }
.draft-card-status { font-size: 0.75rem; color: #999; }
.draft-card-actions { display: flex; gap: 6px; }

/* Article Editor Modal */
.article-editor-modal {
    max-width: 1100px !important;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    padding: 8px 0;
}
.editor-main { min-width: 0; }
.editor-title { font-size: 1.3rem; margin: 0 0 16px; color: #2d3436; }
.editor-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.95rem; margin-bottom: 10px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.editor-input:focus { border-color: #6c5ce7; outline: none; }
.editor-input-sm { padding: 8px 12px; font-size: 0.85rem; }

/* Markdown Toolbar */
.md-toolbar {
    display: flex; gap: 4px; padding: 6px 8px;
    background: #f8f9fa; border-radius: 8px 8px 0 0;
    border: 1px solid #ddd; border-bottom: none;
    margin-top: 4px;
}
.md-toolbar button {
    padding: 4px 10px; border: none; background: none;
    border-radius: 4px; cursor: pointer; font-size: 0.85rem; color: #555;
}
.md-toolbar button:hover { background: #e9ecef; color: #2d3436; }

.editor-textarea {
    width: 100%; padding: 14px;
    border: 1px solid #ddd; border-radius: 0 0 8px 8px;
    font-family: 'Menlo', 'Consolas', monospace; font-size: 0.9rem;
    resize: vertical; min-height: 300px;
    line-height: 1.6;
    box-sizing: border-box;
}
.editor-textarea:focus { border-color: #6c5ce7; outline: none; }

.editor-preview {
    padding: 16px; border: 1px solid #ddd; border-radius: 0 0 8px 8px;
    min-height: 300px; background: #fafafa;
    line-height: 1.7; font-size: 0.95rem;
}
.editor-preview h2 { font-size: 1.3rem; margin: 16px 0 8px; }
.editor-preview h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.editor-preview blockquote {
    border-left: 3px solid #6c5ce7; padding-left: 12px;
    color: #636e72; margin: 12px 0;
}
.editor-preview ul { padding-left: 20px; }

.editor-actions {
    display: flex; gap: 10px; align-items: center; margin-top: 14px;
}
.editor-status { font-size: 0.8rem; color: #999; margin-left: auto; }

/* Editor Sidebar */
.editor-sidebar { display: flex; flex-direction: column; gap: 20px; }

.coauthor-panel {
    background: #f8f7ff; border-radius: 10px; padding: 14px;
}
.coauthor-panel h4 {
    font-size: 0.9rem; color: #6c5ce7; margin: 0 0 10px;
}

/* Editor Tabs */
.editor-tabs {
    display: flex; gap: 0; margin-bottom: 14px;
    border-bottom: 2px solid #eee;
}
.editor-tab {
    padding: 10px 16px; border: none; background: none;
    font-size: 0.85rem; font-weight: 600; color: #999;
    cursor: pointer; transition: all 0.2s; border-bottom: 2px solid transparent;
    margin-bottom: -2px; font-family: inherit;
}
.editor-tab.active {
    color: #6c5ce7; border-bottom-color: #6c5ce7;
}
.editor-tab:hover:not(.active) { color: #636e72; }

/* News Section */
.editor-news-section { margin-bottom: 12px; }
.editor-label { font-size: 0.8rem; color: #636e72; margin-bottom: 6px; display: block; }
.editor-news-preview { margin-top: 10px; }
.news-preview-card {
    background: #f8f7ff; border-radius: 10px; padding: 14px;
    border-left: 3px solid #6c5ce7;
}
.news-preview-source { font-size: 0.7rem; color: #6c5ce7; font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.news-preview-title { font-weight: 600; font-size: 0.9rem; color: #2d3436; margin-bottom: 6px; }
.news-preview-summary { font-size: 0.8rem; color: #636e72; line-height: 1.5; margin-bottom: 8px; }
.news-preview-link { font-size: 0.75rem; color: #6c5ce7; text-decoration: none; }
.news-preview-link:hover { text-decoration: underline; }

/* Topic Section */
.editor-topic-section { margin-bottom: 12px; }
.psi-modal-topics { display: flex; flex-direction: column; gap: 10px; }
.topic-item {
    border: 1px solid #eee; border-radius: 10px; padding: 12px;
    background: #fafafa;
}
.topic-item-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.topic-item-header strong { font-size: 0.85rem; color: #2d3436; }
.topic-status {
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
    border-radius: 10px;
}
.topic-status-done { color: #00b894; background: rgba(0,184,148,0.1); }
.topic-status-pending { color: #fdcb6e; background: rgba(253,203,110,0.15); }
.topic-textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.85rem; resize: vertical; min-height: 60px; box-sizing: border-box;
    font-family: inherit; line-height: 1.5;
}
.topic-textarea:focus { border-color: #6c5ce7; outline: none; }
.topic-text-readonly {
    font-size: 0.85rem; color: #636e72; line-height: 1.6; margin: 0;
}

/* Preview Topic Text */
.preview-topic-text {
    margin-top: 10px; padding: 10px; background: #f0fff4; border-radius: 8px;
    border-left: 3px solid #00b894;
}
.preview-topic-text strong { font-size: 0.8rem; color: #00b894; }
.preview-topic-text p { font-size: 0.82rem; color: #2d3436; margin: 4px 0 0; line-height: 1.5; }
.preview-topic-empty {
    margin-top: 10px; padding: 10px; background: #fff5f5; border-radius: 8px;
    border-left: 3px solid #fdcb6e; font-size: 0.8rem; color: #636e72;
}

/* Upgrade Card */
.upgrade-card {
    background: linear-gradient(135deg, #f8f7ff 0%, #fff5f5 100%);
    border: 1px solid #e0dff5; border-radius: 12px; padding: 20px;
    text-align: center; margin-bottom: 16px;
}
.upgrade-card h4 { color: #6c5ce7; margin: 0 0 8px; font-size: 1rem; }
.upgrade-card > p { color: #636e72; font-size: 0.85rem; margin: 0 0 14px; }
.upgrade-plans { display: flex; gap: 8px; margin-top: 12px; }
.upgrade-plan {
    flex: 1; padding: 12px 10px; border: 1px solid #eee; border-radius: 10px;
    background: #fff; text-align: center;
}
.upgrade-plan.highlight {
    border-color: #6c5ce7; background: #f8f7ff;
    box-shadow: 0 2px 8px rgba(108,92,231,0.15);
}
.upgrade-plan strong { display: block; font-size: 0.85rem; color: #2d3436; margin-bottom: 4px; }
.upgrade-plan p { font-size: 0.72rem; color: #636e72; margin: 0; line-height: 1.4; }

/* YouTube Embed */
.article-youtube {
    position: relative; width: 100%; padding-bottom: 56.25%;
    margin: 20px 0; border-radius: 10px; overflow: hidden;
}
.article-youtube iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* SEO Guide Panel */
.seo-guide-panel {
    background: #f0fff4; border-radius: 10px; padding: 14px;
}
.seo-guide-panel h4 {
    font-size: 0.9rem; color: #00b894; margin: 0 0 10px;
}
.seo-guide-content { display: flex; flex-direction: column; gap: 6px; }
.seo-tip {
    font-size: 0.78rem; color: #2d3436; line-height: 1.4;
    padding: 4px 0; border-bottom: 1px solid rgba(0,184,148,0.1);
}
.seo-tip:last-child { border-bottom: none; }
.seo-tip strong { color: #00b894; }

/* SEO Score */
.seo-score { margin-top: 12px; }
.seo-score-bar {
    height: 6px; background: #eee; border-radius: 3px; overflow: hidden;
}
.seo-score-fill {
    height: 100%; border-radius: 3px; transition: width 0.3s;
}
.seo-score-label {
    font-size: 0.85rem; font-weight: 700; margin-top: 6px; text-align: center;
}
.seo-score-checks {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.seo-score-checks span {
    font-size: 0.7rem; background: #f0f0f0; padding: 2px 8px;
    border-radius: 10px; color: #636e72;
}

/* Coauthor Panel */
.coauthor-counter {
    font-weight: 400; font-size: 0.75rem; color: #999;
    margin-left: 6px;
}
.coauthor-empty { font-size: 0.8rem; color: #999; margin: 4px 0; }
.coauthor-add-btn { width: 100%; margin-top: 8px; }

.coauthor-list { margin-bottom: 8px; }
.coauthor-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; font-size: 0.85rem; border-bottom: 1px solid #f0f0f0;
}
.coauthor-item:last-child { border-bottom: none; }
.coauthor-item-left {
    display: flex; align-items: center; gap: 8px; min-width: 0;
}
.coauthor-item-right {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.coauthor-list-photo {
    width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.coauthor-item .status-pending { color: #fdcb6e; font-size: 0.75rem; }
.coauthor-item .status-accepted { color: #00b894; font-size: 0.75rem; }
.coauthor-item .status-declined { color: #d63031; font-size: 0.75rem; }
.btn-icon {
    border: none; background: none; cursor: pointer; font-size: 1rem;
    color: #999; padding: 2px 4px; line-height: 1;
}
.btn-icon:hover { color: #d63031; }

/* Coauthor Selector Modal */
.coauthor-selector-content {
    max-width: 520px !important; width: 90vw;
    max-height: 80vh; overflow-y: auto;
}
.selector-title {
    font-size: 1.1rem; margin: 0 0 14px; color: #2d3436;
}
.coauthor-search-results {
    max-height: 300px; overflow-y: auto; margin-top: 10px;
}
.selector-empty {
    text-align: center; color: #999; padding: 20px; font-size: 0.9rem;
}
.selector-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; cursor: pointer;
    transition: background 0.15s;
}
.selector-item:hover { background: #f8f7ff; }
.selector-item-photo { flex-shrink: 0; width: 44px; height: 44px; }
.selector-item-photo img, .selector-photo {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
}
.selector-photo-fallback {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700;
}
.selector-item-info { min-width: 0; }
.selector-item-name {
    font-weight: 600; font-size: 0.9rem; color: #2d3436;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.selector-item-detail {
    font-size: 0.78rem; color: #636e72;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Profile Preview */
.coauthor-preview {
    margin-top: 16px; padding: 16px;
    background: #f8f7ff; border-radius: 12px;
}
.preview-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 14px;
}
.preview-photo-lg {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.preview-photo-fallback {
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700;
}
.preview-info h4 { margin: 0 0 4px; font-size: 1.05rem; color: #2d3436; }
.preview-crp {
    display: inline-block; background: #fff; color: #6c5ce7;
    padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
    margin-right: 6px;
}
.preview-loc {
    display: inline-block; background: #fff; color: #636e72;
    padding: 2px 10px; border-radius: 20px; font-size: 0.75rem;
}
.preview-section { margin-bottom: 10px; }
.preview-section strong { font-size: 0.8rem; color: #6c5ce7; }
.preview-section p { font-size: 0.85rem; color: #2d3436; margin: 4px 0 0; line-height: 1.5; }
.coauthor-preview-actions {
    display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end;
}

/* Coauthor Blocks */
.coauthor-blocks { margin-top: 16px; }
.coauthor-blocks-title {
    font-size: 1rem; color: #2d3436; margin: 0 0 12px;
    padding-bottom: 8px; border-bottom: 2px solid #6c5ce7;
}
.coauthor-block {
    border: 1px solid #e0dff5; border-radius: 10px;
    margin-bottom: 12px; overflow: hidden;
}
.coauthor-block-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; background: #f8f7ff;
}
.block-author-info {
    display: flex; align-items: center; gap: 10px;
}
.block-author-photo {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.block-author-fallback {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 700;
}
.block-author-name { font-weight: 600; font-size: 0.85rem; color: #2d3436; }
.block-author-detail { font-size: 0.75rem; color: #636e72; }
.block-actions { display: flex; align-items: center; gap: 6px; }
.block-status {
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
    border-radius: 10px;
}
.block-status-done { color: #00b894; background: rgba(0,184,148,0.1); }
.block-status-pending { color: #fdcb6e; background: rgba(253,203,110,0.15); }
.coauthor-block-textarea {
    width: 100%; padding: 12px 14px; border: none;
    font-family: 'Menlo', 'Consolas', monospace; font-size: 0.85rem;
    resize: vertical; min-height: 100px; line-height: 1.6;
    box-sizing: border-box;
}
.coauthor-block-textarea:focus { outline: none; background: #fafafa; }

/* Community Article Read Modal */
.community-article-read {
    max-width: 800px !important; width: 90vw;
    max-height: 85vh; overflow-y: auto;
}
.community-article-body {
    padding: 20px 24px; line-height: 1.8; font-size: 1rem;
}
.community-article-body h1 { font-size: 1.6rem; margin-bottom: 4px; }
.community-article-body .article-subtitle { color: #636e72; font-size: 1.1rem; margin-bottom: 16px; }
.community-article-body .article-meta {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 0; margin-bottom: 20px; border-bottom: 1px solid #eee;
    font-size: 0.85rem; color: #999;
}
.community-article-body .article-meta img {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.community-article-body .article-content { line-height: 1.8; }
.community-article-body .article-content h2 { font-size: 1.3rem; margin: 20px 0 10px; }
.community-article-body .article-content h3 { font-size: 1.1rem; margin: 16px 0 8px; }
.community-article-body .article-content blockquote {
    border-left: 3px solid #6c5ce7; padding-left: 14px; color: #636e72; margin: 14px 0;
}
.community-article-body .article-tags {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee;
}
.community-article-body .article-tags span {
    padding: 3px 10px; background: #f8f7ff; border-radius: 20px;
    font-size: 0.75rem; color: #6c5ce7; font-weight: 600;
}

/* Admin Community Status */
.admin-field-status {
    font-size: 0.75rem; font-weight: 600; padding: 2px 8px;
    border-radius: 4px; white-space: nowrap;
}
.admin-field-status-ok { color: #00b894; background: rgba(0,184,148,0.1); }
.admin-field-status-err { color: #d63031; background: rgba(214,48,49,0.1); }

/* Responsive — Editor */
@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    .article-editor-modal {
        width: 100vw; max-width: 100vw;
        border-radius: 0;
        max-height: 100vh;
    }
    .notif-dropdown {
        right: 10px; left: 10px; width: auto;
    }
}
