/* Profile.css - Mobile-optimized with sticky header */

:root {
    --primary-accent: #ffd700;
    --secondary-accent: #a78bfa;
    --tertiary-accent: #4ade80;
    --bg-primary: #0f0a06;
    --bg-secondary: #1a1410;
    --bg-tertiary: #221a12;
    --border-color: #3d2f24;
    --border-light: #52413a;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --success: #3fb950;
    --warning: #d29922;
    --error: #f85149;
    --primary-gold: #d4a574;
    --light-gold: #e8c4a0;
    --warm-cream: #d1f4e8;
    --card-dark: #161b22;
    --card-brown: #1a1f26;
    --border-brown: #30363d;
    --purple: #a78bfa;
    --light-purple: #c4b5fd;
}

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

body {
    font-family: 'Manakahthey', 'Noto Sans Hebrew';
    background: var(--bg-primary);
    color: #f0f4f8;
    min-height: 100vh;
    line-height: 1.6;
}

/* ============================================================
   STICKY PROFILE HEADER
   ============================================================ */

.sticky-profile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 20, 16, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.sticky-profile-header.visible {
    transform: translateY(0);
}

.sticky-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

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

.sticky-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sticky-stats strong {
    color: var(--primary-gold);
}

/* ============================================================
   OLD NAV BAR (removed - using community-nav.css)
   ============================================================ */

/* Styles moved to community-nav.css */

/* ============================================================
   JUDEAN QUOTE
   ============================================================ */

.judean-quote-section {
    margin-top: 0.5rem;
    text-align: center;
    position: relative;
}

.judean-quote {
    font-family: 'Manakahthey', 'Noto Sans Hebrew', serif;
    font-size: 1.1rem;
    color: var(--warm-cream);
    opacity: 0.9;
    direction: rtl;
    margin: 0;
    min-height: 1.4em;
}

.btn-edit-quote {
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 0.2rem;
}

.btn-edit-quote:hover {
    opacity: 1;
}

.quote-edit {
    margin-top: 0.5rem;
}

.quote-edit input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: var(--card-dark);
    border: 1px solid var(--border-brown);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Manakahthey', 'Noto Sans Hebrew', serif;
    font-size: 1rem;
    text-align: center;
    direction: rtl;
}

.quote-edit .edit-buttons {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.4rem;
}

.quote-edit button {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
}

/* ============================================================
   MOBILE STATS BAR (Supporters only)
   ============================================================ */

.mobile-stats {
    display: none;
    background: var(--card-brown);
    border: 1px solid var(--border-brown);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mobile-stat {
    text-align: center;
    min-width: 50px;
}

.mobile-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light-purple);
}

.mobile-stat-label {
    font-size: 0.65rem;
    color: var(--warm-cream);
    opacity: 0.7;
    text-transform: uppercase;
}

.mobile-stat.positive .mobile-stat-value {
    color: var(--success);
}

.mobile-stat.negative .mobile-stat-value {
    color: var(--error);
}

/* ============================================================
   STATE CONTAINERS (Loading, Login Required, Not Found)
   ============================================================ */

.state-container {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-primary);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.state-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.state-text {
    color: var(--warm-cream);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--purple);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ============================================================
   PROFILE HEADER
   ============================================================ */

.profile-header {
    background: linear-gradient(135deg, var(--card-brown) 0%, var(--card-dark) 100%);
    padding: 1.5rem 1rem;
    border-bottom: 2px solid var(--border-brown);
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark overlay so text stays readable over banner images */
.profile-header.has-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(15,10,6,0.72) 100%);
    pointer-events: none;
    z-index: 0;
}

.profile-header.has-banner .profile-content {
    position: relative;
    z-index: 1;
}

/* Banner image icon — top-right corner, owner only */
.btn-banner-icon {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(26, 20, 16, 0.55);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* Show on hover of header, or always when banner exists */
.profile-header:hover .btn-banner-icon,
.profile-header.has-banner .btn-banner-icon {
    opacity: 1;
}

.btn-banner-icon:hover {
    background: rgba(167, 139, 250, 0.4);
}

.btn-banner-icon.loading {
    opacity: 0.5 !important;
    pointer-events: none;
}

/* Banner font toggle — stacked below the image icon, top-right */
.btn-banner-font {
    position: absolute;
    top: 3.2rem;
    right: 0.75rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(26, 20, 16, 0.55);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.btn-banner-font:hover {
    background: rgba(167, 139, 250, 0.4);
}

/* Banner font mode — overrides ALL theme settings for banner text */
.profile-header.banner-font-light * {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
/* Keep buttons and badges readable */
.profile-header.banner-font-light .btn-edit-bio,
.profile-header.banner-font-light .btn-edit-quote,
.profile-header.banner-font-light .btn-edit-avatar,
.profile-header.banner-font-light .profile-badge {
    text-shadow: none;
}

.profile-header.banner-font-dark * {
    color: #1a1410 !important;
    text-shadow: 0 1px 3px rgba(255,255,255,0.4);
}
.profile-header.banner-font-dark .btn-edit-bio,
.profile-header.banner-font-dark .btn-edit-quote,
.profile-header.banner-font-dark .btn-edit-avatar,
.profile-header.banner-font-dark .profile-badge {
    text-shadow: none;
}

.profile-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    background-size: cover;
    background-position: center;
}

/* When showing an image — keep a dark base so transparent PNGs look right
   and the circle remains clickable/visible */
.profile-avatar-large.has-image {
    background: rgba(15, 10, 6, 0.4);
}

/* Avatar circle — clickable for owner */
.profile-avatar-large.avatar-owner {
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: filter 0.2s, transform 0.15s;
    position: relative;
    z-index: 2;
}

.profile-avatar-large.avatar-owner:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
}

/* No image state for owner — shows camera */
.profile-avatar-large.avatar-empty-owner {
    background: rgba(167, 139, 250, 0.15);
    border: 2px dashed var(--light-purple);
    cursor: pointer;
    position: relative;
}

.profile-avatar-large.avatar-empty-owner::after {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    line-height: 1;
}

.profile-avatar-large.avatar-empty-owner:hover {
    background: rgba(167, 139, 250, 0.25);
    border-color: #a78bfa;
}

.btn-edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-purple);
    border: 3px solid var(--card-brown);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-edit-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(167,139,250,0.6);
}

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

.name-badges-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.profile-name {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
}

/* Badges */
#badgeContainer {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-elder {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-trusted {
    background: rgba(138, 79, 255, 0.15);
    color: var(--light-purple);
    border: 1px solid rgba(138, 79, 255, 0.3);
}

.badge-new {
    background: rgba(100, 200, 100, 0.1);
    color: #7FD17F;
    border: 1px solid rgba(100, 200, 100, 0.3);
}

.badge-supporter {
    background: rgba(138, 79, 255, 0.2);
    color: #B794F6;
    border: 1px solid rgba(138, 79, 255, 0.4);
}

/* Bio */
.profile-bio {
    color: var(--warm-cream);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.5rem 0;
    opacity: 0.9;
}

.btn-edit-bio {
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border-brown);
    border-radius: 6px;
    color: var(--warm-cream);
    cursor: pointer;
    font-size: 0.75rem;
}

#bioEdit textarea {
    width: 100%;
    min-height: 70px;
    padding: 0.6rem;
    background: var(--card-dark);
    border: 1px solid var(--border-brown);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

#bioEdit .edit-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#bioEdit button {
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-save {
    background: var(--purple);
    border: none;
    color: white;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-brown);
    color: var(--warm-cream);
}

/* Reputation Row */
.reputation-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    width: fit-content;
}

.reputation-item {
    text-align: center;
}

.reputation-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-gold);
    line-height: 1;
}

.reputation-value.approval {
    color: var(--light-purple);
}

.reputation-label {
    font-size: 0.7rem;
    color: var(--warm-cream);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.reputation-flame-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 0.15rem;
}

.reputation-divider {
    width: 1px;
    height: 35px;
    background: var(--border-brown);
}

.join-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-card {
    background: var(--card-brown);
    border: 1px solid var(--border-brown);
    border-radius: 10px;
    padding: 1rem;
}

.stats-card h3 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-brown);
}

.positive-card h3 {
    color: var(--success);
}

.negative-card h3 {
    color: var(--error);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.stat-row-label {
    color: var(--warm-cream);
    opacity: 0.8;
}

.stat-row-value {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-row-value.positive {
    color: var(--success);
}

.stat-row-value.negative {
    color: var(--error);
}

/* ============================================================
   FEED & TABS
   ============================================================ */

.feed {
    min-width: 0;
}

.profile-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-brown);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-tab-btn {
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--warm-cream);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    opacity: 0.7;
    transition: all 0.2s;
}

.profile-tab-btn:hover {
    opacity: 1;
}

.profile-tab-btn.active {
    color: var(--light-purple);
    border-bottom-color: var(--light-purple);
    opacity: 1;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

.tab-description {
    color: var(--warm-cream);
    opacity: 0.7;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-brown);
}

/* ============================================================
   NEW POST FORM
   ============================================================ */

.new-post-form {
    background: var(--card-brown);
    border: 1px solid var(--border-brown);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.new-post-form h3 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0 0 0.75rem 0;
}

.new-post-form textarea {
    width: 100%;
    min-height: 70px;
    padding: 0.6rem;
    background: var(--card-dark);
    border: 1px solid var(--border-brown);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.new-post-form input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    background: var(--card-dark);
    border: 1px solid var(--border-brown);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.new-post-form .form-hint {
    font-size: 0.75rem;
    color: var(--warm-cream);
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

.new-post-form button {
    padding: 0.5rem 1.25rem;
    background: var(--purple);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Image upload in post form */
.post-image-upload { margin: 0.5rem 0; }
.post-image-btn {
    background: none; border: 1px solid var(--border-brown);
    color: var(--warm-cream); padding: 0.4rem 0.9rem;
    border-radius: 8px; cursor: pointer; font-size: 0.85rem;
    font-family: inherit; transition: all 0.15s;
}
.post-image-btn:hover { border-color: var(--purple); color: var(--purple); }
.post-image-preview {
    position: relative; display: inline-block; margin-top: 0.5rem;
}
.post-image-preview img {
    max-width: 100%; max-height: 200px; border-radius: 8px;
    border: 1px solid var(--border-brown);
}
.remove-image-btn {
    position: absolute; top: 6px; right: 6px;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(0,0,0,0.7); color: #fff;
    border: none; cursor: pointer; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
}

/* Wall share checkbox */
.wall-share-check {
    display: flex; align-items: center; gap: 0.5rem;
    margin: 0.5rem 0; font-size: 0.88rem;
    color: var(--warm-cream); cursor: pointer;
}
.wall-share-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--purple); cursor: pointer;
}

/* Image in rendered posts */
.post-image {
    max-width: 100%; border-radius: 8px;
    margin-top: 0.5rem; cursor: pointer;
}

/* Light theme */
body.light-theme .post-image-btn { color: #3a2a08; border-color: #c4baa8; }
body.light-theme .post-image-btn:hover { color: #4a2080; border-color: #4a2080; }
body.light-theme .wall-share-check { color: #3a2a08; }

/* ============================================================
   POST CARD
   ============================================================ */

.post-card {
    background: var(--card-brown);
    border: 1px solid var(--border-brown);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.post-author-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.post-date {
    font-size: 0.75rem;
    color: var(--warm-cream);
    opacity: 0.5;
}

.post-delete-btn {
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.4;
    padding: 0.25rem;
}

.post-delete-btn:hover {
    opacity: 1;
}

.post-text {
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.post-link {
    color: var(--light-purple);
    word-break: break-all;
    font-size: 0.85rem;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-top: 0.75rem;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Comments */
.post-comments-section {
    border-top: 1px solid var(--border-brown);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.comment {
    padding: 0.5rem;
    background: rgba(138, 79, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.comment-author-link {
    color: var(--light-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.comment-date {
    font-size: 0.7rem;
    color: var(--warm-cream);
    opacity: 0.5;
}

.comment-text {
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.no-comments {
    color: var(--warm-cream);
    opacity: 0.5;
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}

.comment-form {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 0.5rem 0.6rem;
    background: var(--card-dark);
    border: 1px solid var(--border-brown);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.comment-submit-btn {
    padding: 0.5rem 0.8rem;
    background: var(--light-purple);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ============================================================
   TOPIC/VERSE/COMMENTARY CARDS
   ============================================================ */

.topic-card,
.verse-card,
.commentary-card {
    background: var(--card-brown);
    border: 1px solid var(--border-brown);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.topic-title,
.verse-topic-link {
    color: var(--light-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.topic-meta {
    font-size: 0.8rem;
    color: var(--warm-cream);
    opacity: 0.7;
    margin-top: 0.25rem;
}

.verse-reference {
    color: var(--primary-gold);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.verse-translation {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0.5rem 0;
    font-style: normal;
    font-size: 0.9rem;
}

.verse-rating-buttons {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.rate-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border-brown);
    background: transparent;
    color: var(--warm-cream);
}

.rate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rate-btn.active {
    background: rgba(138, 79, 255, 0.2);
    border-color: var(--purple);
    color: var(--light-purple);
}

.commentary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.commentary-topic {
    color: var(--light-purple);
    font-weight: 600;
    font-size: 0.95rem;
}

.commentary-verse {
    color: var(--warm-cream);
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.2rem;
}

.commentary-approval {
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.commentary-approval.good {
    background: rgba(100, 200, 100, 0.1);
    color: #7FD17F;
}

.commentary-approval.ok {
    background: rgba(255, 200, 100, 0.1);
    color: #FFC864;
}

.commentary-approval.low {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.commentary-text {
    color: var(--text-primary);
    line-height: 1.5;
    font-style: italic;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.commentary-reactions {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.commentary-reactions .positive { color: var(--success); }
.commentary-reactions .neutral { color: var(--warning); }
.commentary-reactions .negative { color: var(--error); }

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

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--warm-cream);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.empty-state p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--warm-cream);
    opacity: 0.6;
    border-top: 1px solid var(--border-brown);
    margin-top: 2rem;
    font-size: 0.85rem;
}

footer a {
    color: var(--light-purple);
    text-decoration: none;
}

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

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    /* Sidebar stays only for the Follows card (the other stats have mobile versions) */
    .sidebar { display: flex; }
    .sidebar > .stats-card:not(.flames-card) { display: none; }
    
    /* Show mobile stats for supporters */
    .mobile-stats {
        display: flex;
    }
}

@media (max-width: 600px) {
    /* Header stacks vertically */
    .profile-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 1.75rem;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .name-badges-row {
        justify-content: center;
    }
    
    /* Reputation centered */
    .reputation-row {
        justify-content: center;
        width: 100%;
        max-width: 240px;
        margin: 0.75rem auto 0;
        padding: 0.6rem 0.75rem;
    }
    
    .reputation-value {
        font-size: 1.4rem;
    }
    
    .reputation-label {
        font-size: 0.65rem;
    }
    
    /* Nav compact */
    .nav-logo img {
        width: 30px;
        height: 30px;
    }
    
    .nav-profile-name {
        font-size: 0.95rem;
    }
    
    /* Tabs scroll */
    .profile-tabs {
        gap: 0;
    }
    
    .profile-tab-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Posts full width */
    .post-card,
    .topic-card,
    .verse-card,
    .commentary-card {
        padding: 0.85rem;
    }
    
    /* Sticky header compact */
    .sticky-profile-header {
        padding: 0.5rem 0.75rem;
    }
    
    .sticky-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .sticky-name {
        font-size: 0.85rem;
    }
    
    .sticky-stats {
        font-size: 0.7rem;
    }
    
    /* Judean quote smaller */
    .judean-quote {
        font-size: 0.95rem;
    }
    
    /* Mobile stats compact */
    .mobile-stats {
        padding: 0.6rem;
    }
    
    .mobile-stat-value {
        font-size: 1rem;
    }
    
    /* Free user profile - clean look */
    .profile-header.free-user .reputation-row {
        display: none;
    }
}

/* ============================================================
   END OF STYLES
   ============================================================ */

/* ── Message / Block buttons on other users' profiles ── */
.profile-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}
.btn-message-user, .btn-block-user {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    border: 1px solid transparent;
}
.btn-message-user {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: #fff;
}
.btn-message-user:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(167,139,250,0.4);
}
.btn-block-user {
    background: transparent;
    border-color: #3d2f24;
    color: #9a8a76;
}
.btn-block-user:hover {
    border-color: #f85149;
    color: #f85149;
}

/* Flame count on profile name row */
.profile-flame-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffd700;
    margin-left: 8px;
    font-family: -apple-system, sans-serif;
}

/* ============================================================
   FLAMES — "Light a flame" button + Your Flames list
   ============================================================ */
.btn-flame-user {
    display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 1.1rem;
    border-radius: 999px; border: 1px solid rgba(255, 160, 40, 0.55); cursor: pointer; font-family: inherit; font-weight: 700; font-size: 0.95rem;
    background: rgba(255, 160, 40, 0.14); color: #ffb454; transition: transform .15s, background .15s, box-shadow .15s;
}
.btn-flame-user:hover { background: rgba(255, 160, 40, 0.24); transform: translateY(-1px); }
.btn-flame-user.lit { background: linear-gradient(135deg, #ffb454, #ff7a2f); border-color: transparent; color: #2a1200; box-shadow: 0 6px 18px rgba(255, 122, 47, 0.35); }
.pf-flame-img { width: 16px; height: 20px; object-fit: contain; vertical-align: middle; }
.pf-flame-img.is-dim { filter: grayscale(1); opacity: .6; }
.pf-flame-img.is-lit { filter: drop-shadow(0 0 5px rgba(255, 150, 40, .85)); }
.btn-flame-user.lit .pf-flame-img { filter: none; opacity: 1; }
.btn-flame-user.busy { opacity: .6; pointer-events: none; }
body.light-theme .btn-flame-user { color: #a8470a; }
body.light-theme .btn-flame-user.lit { color: #2a1200; }

/* Your Flames — a card in the left column; follows the light/dark theme */
.flames-card h3 { display: flex; align-items: center; gap: .5rem; }
.pf-count { margin-left: auto; font-size: .75rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: rgba(255, 160, 40, 0.18); color: #c9650c; }
body:not(.light-theme) .pf-count { color: #ffb454; }
.pf-count:empty { display: none; }
.pf-hint { margin: .8rem 0 0; font-size: .78rem; line-height: 1.45; color: var(--text-secondary, #8b949e); }
.pf-list { display: flex; flex-direction: column; gap: .15rem; max-height: 340px; overflow-y: auto; }
.pf-empty { font-size: .85rem; color: var(--text-secondary, #8b949e); padding: .25rem 0; }
.pf-person { display: flex; align-items: center; gap: .5rem; padding: .35rem .25rem; border-radius: 10px; }
.pf-person:hover { background: rgba(255, 160, 40, 0.1); }
.pf-link { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.pf-av {
    flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem;
    color: var(--text-primary); background: var(--bg-tertiary, #221a12) center / cover;
    box-shadow: 0 0 0 2px var(--card-brown, #1a1410), 0 0 0 3.5px #ffb454;
}
.pf-name { min-width: 0; font-size: .9rem; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-out {
    flex: none; border: 0; background: transparent; padding: 6px 9px; border-radius: 999px; font-family: inherit; font-size: .72rem; font-weight: 700; cursor: pointer;
    color: var(--text-secondary, #8b949e);
}
.pf-out:hover { background: rgba(248, 81, 73, 0.14); color: #d1342c; }

/* Follows card colours come straight from the theme tokens, so light and dark both work */
.flames-card { background: var(--ub-card, var(--card-brown)); border-color: var(--ub-line, var(--border-brown)); }
.flames-card h3, .flames-card .pf-name { color: var(--ub-tx, var(--text-primary)); }
.flames-card .pf-out { color: var(--ub-mut, var(--text-secondary)); }
.flames-card .pf-av { color: var(--ub-tx, var(--text-primary)); box-shadow: 0 0 0 2px var(--ub-card, var(--card-brown)), 0 0 0 3.5px #ffb454; }
.flames-card .pf-av { background-color: var(--ub-card2, #172a3c); }

/* Display name uses the site's Manakahthey font */
#profileDisplayName, .profile-name, #stickyName, .sticky-name { font-family: 'Manakahthey', serif !important; font-weight: 400 !important; letter-spacing: 0; }
#profileDisplayName, .profile-name { font-size: 1.15em; }
