:root {
    --primary-purple: #8B5CF6;
    --primary-pink: #EC4899;
    --secondary-color: #4F46E5;
    --background-color: #F3F4F6;
    --card-background: #FFFFFF;
    --text-color: #333333;
    --border-color: #ddd;
    --input-background: #FFFFFF;
    --input-text: #333333;
    --hover-bg: rgba(139, 92, 246, 0.1);
    --body-background: linear-gradient(135deg, #EDE9FE, #FCE7F3);
}

/* DARK MODE OVERRIDES - MAXIMUM PRIORITY */
html.dark-mode,
body.dark-mode,
.dark-mode body,
:root.dark-mode body {
    background: #121212 !important;
    background-color: #121212 !important;
    background-image: none !important;
    color: #E0E0E0 !important;
}

/* Dark mode specific overrides for elements with inline styles */
.dark-mode .feed-style-btn {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.dark-mode .feed-style-selector,
.dark-mode #compose-container,
.dark-mode #create-post,
.dark-mode .collapsed-post-box,
.dark-mode .collapsed-post-content,
.dark-mode .post-styling-options,
.dark-mode .rich-text-toolbar,
.dark-mode .dropdown-content {
    background-color: #1a1a1a !important;
    border-color: #444 !important;
}

.dark-mode .collapsed-prompt,
.dark-mode .collapsed-icon,
.dark-mode .cancel-button {
    color: #e0e0e0 !important;
}

.dark-mode .cancel-button {
    background: #2a2a2a !important;
}

.dark-mode .cancel-button:hover {
    background: #333333 !important;
}

/* Override rich text editor buttons in dark mode */
.dark-mode .rich-text-toolbar button {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .rich-text-toolbar button:hover {
    background: #333333 !important;
}

:root.dark-mode {
    --primary-purple: #9D6FFF;
    --primary-pink: #FF64B4;
    --secondary-color: #6C63FF;
    --background-color: #121212;
    --card-background: #1a1a1a;
    --text-color: #E0E0E0;
    --border-color: #444;
    --input-background: #2D2D2D;
    --input-text: #E0E0E0;
    --hover-bg: rgba(157, 111, 255, 0.2);
    --body-background: #121212;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, system-ui, sans-serif;
}

body {
    background: var(--body-background);
    min-height: 100vh;
    color: var(--text-color);
}

/* Additional dark mode overrides */
body.dark-mode {
    background: #121212 !important; /* Explicit color for immediate effect */
    background-image: none !important;
    color: var(--text-color);
}

html.dark-mode {
    background-color: #121212 !important;
}

/* Force dark background even in root context */
:root.dark-mode body {
    background: #121212 !important;
    background-image: none !important;
}

/* Override any lingering gradient backgrounds in dark mode */
.dark-mode .navbar,
.dark-mode .profile-header,
.dark-mode .post,
.dark-mode .create-post,
.dark-mode .content-panel,
.dark-mode .side-nav,
.dark-mode .settings-section,
.dark-mode .search-container .search-input,
.dark-mode .search-results,
.dark-mode .notification-panel,
.dark-mode .search-result-item,
.dark-mode .feed-style-btn,
.dark-mode .image-label,
.dark-mode .video-label,
.dark-mode .rich-text-toolbar,
.dark-mode .comment-input,
.dark-mode .dropdown-menu,
.dark-mode .dropdown-content,
.dark-mode .empty-state,
.dark-mode #meerplus div[style*="background"],
.dark-mode #appearance div[style*="background"],
.dark-mode .follow-card,
.dark-mode .buddy-card,
.dark-mode .drawing-content {
    background-color: var(--card-background) !important;
    background: var(--card-background) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Fix search results and dropdowns in dark mode */
.dark-mode .search-result-item:hover,
.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-content a:hover,
.dark-mode .notification-item:hover,
.dark-mode .buddy-card:hover,
.dark-mode .follow-card:hover {
    background-color: #2a2a2a !important;
}

/* Fix inputs in dark mode */
.dark-mode input[type="text"],
.dark-mode input[type="password"],
.dark-mode input[type="email"],
.dark-mode input[type="search"],
.dark-mode textarea,
.dark-mode select,
.dark-mode .post-input, 
.dark-mode .comment-input,
.dark-mode .bio-input {
    background-color: var(--input-background) !important;
    color: var(--input-text) !important;
    border-color: var(--border-color) !important;
}

.navbar {
    background: var(--card-background);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.logo {
font-size: 2rem;
font-weight: bold;
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
-webkit-background-clip: text;
color: transparent;
text-decoration: none;
display: flex; /* Add flex display */
align-items: center; /* Center vertically */
height: 100%; /* Take full height of navbar */
padding: 0.5rem 1rem; /* Add padding around logo */
}

.container {
    max-width: 600px;
    margin: 80px auto 0;
    padding: 2rem 1rem;
}

.profile-header {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-username {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-username-text {
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    color: transparent;
}

.profile-username .user-emoji {
    font-size: 2rem;
    color: initial;
    background: none;
    -webkit-background-clip: initial;
    display: inline-block;
    vertical-align: middle;
}

.profile-bio {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

.rich-text-toolbar button[data-command="createLink"] {
    font-size: 1.2em;
    line-height: 1;
}

.profile-bio a {
    color: var(--primary-purple);
    text-decoration: none;
}
.profile-bio a:hover {
    text-decoration: underline;
}
.rich-text-editor a {
    color: var(--primary-purple);
    text-decoration: none;
}
.rich-text-editor a:hover {
    text-decoration: underline;
}

.bio-input {
width: 100%;
min-height: 100px;
padding: 12px;
border: 2px solid var(--primary-purple);
border-radius: 8px;
resize: vertical;
margin-bottom: 8px;
display: block;
box-sizing: border-box;
}

.edit-bio-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Changed from 200px to 150px */
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: var(--text-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.875rem;
}

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

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

#navProfilePic {
    border: 2px solid var(--primary-purple);
    border-radius: 50%;
    padding: 2px; /* Creates space between avatar and border */
    width: 40px; /* Maintain existing size */
    height: 40px;
    object-fit: cover;
  }

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

.nav-link {
    color: var(--primary-purple);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--hover-bg);
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-color);
    text-align: right;
    margin: 0.1rem 0.2rem;  /* Increased margin */
    padding: 0.05rem 0.1rem; /* Added padding around text */
    display: block;
    width: auto;
    background: transparent;
}

.char-count.near-limit {
    color: #f59e0b;
}

.char-count.at-limit {
    color: #dc2626;
}
.edit-profile-btn {
padding: 0.5rem 1rem;
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
color: white;
border: none;
border-radius: 0.5rem;
cursor: pointer;
font-size: 1rem;
margin-top: 1rem;
transition: transform 0.2s;
}

.edit-profile-btn:hover {
transform: translateY(-2px);
}

.avatar-upload-label {
display: block;
text-align: center;
margin-top: 0.5rem;
color: var(--primary-purple);
cursor: pointer;
}

.username-input {
width: auto;
min-width: 200px;
max-width: 100%;
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: 0.5rem;
font-size: 1.5rem;
margin: 1rem 0;
text-align: center;
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
-webkit-background-clip: text;
color: transparent;
}

.bio-input {
width: 100%;
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: 0.5rem;
font-size: 1rem;
margin-bottom: 0.5rem;
min-height: 100px;
resize: vertical;
}

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

.post-time {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-color);
    margin-top: 2px;
}

.post-button {
    margin-left: auto; /* This will push the button to the right */
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.post-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
}

.save-btn, .cancel-btn {
padding: 0.5rem 1.5rem;
border-radius: 0.5rem;
cursor: pointer;
font-size: 1rem;
transition: transform 0.2s;
}

.save-btn {
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
color: white;
border: none;
}

.cancel-btn {
background: white;
color: var(--primary-purple);
border: 1px solid var(--primary-purple);
}

.save-btn:hover, .cancel-btn:hover {
transform: translateY(-2px);
}

.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Override any existing margin on profile avatar within container */
.avatar-container .profile-avatar {
    margin: 0;
}

.avatar-edit-overlay {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background: rgba(139, 92, 246, 0.9);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
cursor: pointer;
opacity: 0;
transition: opacity 0.2s;
}

.avatar-container:hover .avatar-edit-overlay {
opacity: 1;
}

.delete-account-btn {
padding: 0.5rem 1rem;
background: #ff4444;
color: white;
border: none;
border-radius: 0.5rem;
cursor: pointer;
font-size: 1rem;
margin-top: 1rem;
margin-left: 1rem;
transition: transform 0.2s;
}

.delete-account-btn:hover {
transform: translateY(-2px);
background: #ff0000;
}

.delete-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: none;
justify-content: center;
align-items: center;
z-index: 1000;
}

.delete-modal-content {
background: white;
padding: 2rem;
border-radius: 1rem;
width: 90%;
max-width: 500px;
text-align: center;
}

.delete-modal-buttons {
display: flex;
gap: 1rem;
justify-content: center;
margin-top: 1.5rem;
}

.delete-modal h2 {
margin-bottom: 1rem;
font-size: 1.5rem;
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
-webkit-background-clip: text;
color: transparent;
}

.delete-modal p {
color: var(--text-color);
line-height: 1.6;
margin-bottom: 1rem;
}

/* Feed and Posts Styles */
.user-posts-container {
margin-top: 2rem;
padding: 1rem;
}

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

.post {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
background: var(--card-background);
border-radius: 1rem;
padding: 1rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
position: relative;
margin-bottom: 1rem;
color: var(--text-color);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.post-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info {
    flex-grow: 1;
}

.post-content {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.post-image-container {
    margin-bottom: 1rem;
    position: relative;
    cursor: pointer;
    display: block;
    text-align: center;
    max-width: 100%;
}

.post-image-container:hover .image-expand-hint {
    opacity: 1;
}

.image-expand-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.post-container {
    max-width: 600px;
    margin: 80px auto 0;
    padding: 1rem;
}

.action-bar {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    /* Change these properties */
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    /* Keep these properties */
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.back-button:hover {
    /* Optional: Add a subtle transform effect on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.2);
}

.post-image {
    width: auto;
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 0.5rem;
    transition: opacity 0.2s;
}

.post-image-container:hover .post-image {
    opacity: 0.9;
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: lightbox-fade-in 0.2s ease;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes lightbox-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reactions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.reaction-button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #f0f2f5;
    cursor: pointer;
    transition: background 0.2s;
}

.reaction-button:hover {
    background: #e4e6e9;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.reaction-btn:hover {
    background: var(--hover-bg);
}

.reaction-btn.active {
background: rgba(139, 92, 246, 0.2);
}

.reaction-icon {
width: 1.5rem;
height: 1.5rem;
fill: var(--primary-purple);
}

.reaction-count {
font-size: 0.875rem;
color: var(--text-color);
}

.reaction-btn.active .reaction-count {
color: var(--primary-purple);
}

/* Delete Button Styles */
.delete-btn {
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 4px;
background-color: white;
color: var(--text-color);
font-size: 0.875rem;
cursor: pointer;
transition: all 0.2s ease;
position: absolute;
}

.delete-btn:hover {
background-color: #FEE2E2;
color: #DC2626;
border-color: #FCA5A5;
}

.post-delete-btn {
top: 8px;
right: 8px;
}

.post-metadata {
    color: var(--text-color);
    font-size: 0.9em;
    margin-top: 10px;
}

/* Post Expiry Styles */
.post-expiry {
font-size: 0.75rem;
color: var(--text-color);
margin-top: 0.5rem;
}

.post-preserved {
color: var(--primary-purple);
font-weight: 500;
}

.preserved-post {
    border: 2px solid #4CAF50;
}

/* Comments Section Styles */
.comments-section {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    overflow: hidden;
}

.comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    opacity: 1;
}

.comment.new {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.comment.new.visible {
    opacity: 1;
}

.comment.pending {
    opacity: 0.7;
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid var(--primary-purple);
    padding-left: 8px;
}

.comment-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
object-fit: cover;
}

.comment-content {
flex: 1;
}

/* Loading State */
.loading {
opacity: 0.5;
pointer-events: none;
}

/* Modal Styles */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.9);
z-index: 1000;
justify-content: center;
align-items: center;
}

.modal-content {
max-width: 90%;
max-height: 90vh;
object-fit: contain;
}

.modal-close {
position: absolute;
top: 20px;
right: 20px;
color: white;
font-size: 30px;
cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 768px) {
.user-posts-container {
padding: 0.5rem;
}

.post {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.post-image {
max-height: 250px;
}
}

.comment-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
object-fit: cover;
}

.comment-content {
flex: 1;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: stretch;
    position: relative; /* Add this for char count positioning */
}

.comment-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.comment-button {
    padding: 0 1rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
    height: auto; /* Add this to match input height */
    align-self: stretch; /* Add this to match input height */
}

.comment-toggle {
color: var(--primary-purple);
cursor: pointer;
font-size: 0.875rem;
margin: 0.5rem 0;
padding: 0.25rem;
border-radius: 0.25rem;
transition: background 0.2s;
}

.comment-toggle:hover {
background: var(--hover-bg);
}

.hidden-comments {
display: none;
}

.hidden-comments.visible {
display: block;
}

/* Meerply Actions - Pump, Bust, Reply */
.comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
    align-items: center;
}

.pump-btn,
.bust-btn {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1.5px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.pump-btn {
    color: #10B981;
    border-color: #10B981;
}

.pump-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.05);
}

.pump-btn.active {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

.bust-btn {
    color: #EF4444;
    border-color: #EF4444;
}

.bust-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.05);
}

.bust-btn.active {
    background: #EF4444;
    color: white;
    border-color: #EF4444;
}

.pump-count,
.bust-count {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.9;
}

.reply-toggle-btn {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--primary-purple);
    transition: all 0.2s ease;
    text-transform: lowercase;
}

.reply-toggle-btn:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Reply Thread Styles */
.comment-replies {
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(139, 92, 246, 0.2);
}

.comment-reply {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.35rem 0;
}

.reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.reply-content {
    flex: 1;
    min-width: 0;
}

.reply-content .post-username {
    font-size: 0.8rem;
}

.reply-content p {
    font-size: 0.85rem;
    margin: 0.15rem 0 0;
    line-height: 1.4;
}

/* Reply Form */
.reply-form-container {
    margin-top: 0.4rem;
}

.reply-form {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.reply-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
}

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

.reply-submit-btn {
    padding: 0 0.75rem;
    border: none;
    border-radius: 0.4rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.reply-submit-btn:hover {
    opacity: 0.9;
}

/* Dark mode overrides */
.dark-mode .pump-btn {
    color: #34D399;
    border-color: #34D399;
}

.dark-mode .pump-btn.active {
    background: #10B981;
    color: white;
}

.dark-mode .bust-btn {
    color: #F87171;
    border-color: #F87171;
}

.dark-mode .bust-btn.active {
    background: #EF4444;
    color: white;
}

.dark-mode .reply-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: inherit;
}

.dark-mode .comment-replies {
    border-left-color: rgba(139, 92, 246, 0.3);
}
.post-username {
    font-weight: 600;
    color: var(--primary-purple);
    text-decoration: none;
}

.comment-username {
font-weight: bold;
color: var(--primary-purple);
}

/* Make sure links retain the styling */
a.post-username {
font-weight: bold;
color: var(--primary-purple);
text-decoration: none;
}

a.post-username:hover {
text-decoration: none;
}

.comment-content a.post-username {
font-weight: bold;
color: var(--primary-purple);
text-decoration: none;
}

.comment-content a.post-username:hover {
text-decoration: underline;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 8px;
    color: var(--primary-purple);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .notification-icon svg {
    width: 28px;      /* Control SVG size */
    height: 28px;     /* Control SVG size */
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-pink);
    color: white;
    border-radius: 50%;
    padding: 1px 4px;
    font-size: 10px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%); /* Move slightly up and right */
    z-index: 2;
}

  .notification-badge.hidden {
    display: none;
  }

  .notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.notification-panel:not(.hidden) {
    opacity: 1;
    visibility: visible; 
    transform: translateY(0);
}

.notification-panel.hidden {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
}

.notification-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border-bottom: 1px solid #eee;
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
color: white;
border-radius: 12px 12px 0 0;
}
.notification-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border-bottom: 1px solid #eee;
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
color: white;
border-radius: 12px 12px 0 0;
}

.notification-list {
padding: 8px;
}

.unread {
background: #f0f0ff;
}

.hidden {
display: none;
}

.nav-profile-pic {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
cursor: pointer;
transition: transform 0.2s;
}

.nav-profile-pic:hover {
transform: scale(1.1);
}

.logout-btn {
padding: 0.5rem 1rem;
border: 2px solid var(--primary-purple);
border-radius: 50px;
background: transparent;
color: var(--primary-purple);
cursor: pointer;
transition: all 0.3s;
}

.logout-btn:hover {
background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
color: white;
border-color: transparent;
}

.section-title {
font-size: 1.5rem;
margin: 2rem 0 1rem;
color: var(--text-color);
text-align: center;
}

.notification-item {
padding: 10px 16px;
border-bottom: 1px solid #eee;
transition: all 0.2s;
font-size: 0.85rem;
cursor: pointer;
animation: slideIn 0.3s ease-out;
}

.notification-item:hover {
background: #f8f8ff;
transform: translateX(4px);
}

.notification-item.unread {
background: #f0f0ff;
border-left: 3px solid var(--primary-purple);
}

.notification-item.unread:hover {
background-color: #e8e8ff;
}

.notification-content {
line-height: 1.4;
}

.notification-time {
font-size: 0.7rem;
color: var(--text-color);
margin-top: 4px;
}

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

.edit-bio-container {
width: 100%;
margin-bottom: 1.5rem;
position: relative;
padding-bottom: 5px;
}

.edit-bio-textarea {
width: 100%;
padding: 8px;
border: 2px solid var(--primary-purple);
border-radius: 8px;
resize: vertical;
min-height: 100px;
margin-bottom: 4px;
}

.create-post {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.post-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    resize: none;
    font-size: 1rem;
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    justify-content: space-between; /* Keep this to maintain space between elements */
    align-items: center;
}

.image-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: none;
}

#imageInput {
    display: none;
}

.image-label {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

.feed-style-btn {
    position: relative;
    overflow: hidden;
}

.feed-style-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s;
}
/* Loading States & Animations */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

.content-container {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.content-container.loaded {
    opacity: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional loading text style */
.loading-text {
    color: var(--text-color);
    margin-top: 1rem;
    font-size: 0.9rem;
}
/* Update loading styles */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.content-container {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}
  
  .search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 0.875rem;
}

.search-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}
  
  
    .search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-top: 4px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
  
  .search-results.hidden {
    display: none;
  }
  
  .search-result-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }
  
  .search-result-item:hover {
    background: #f5f5f5;
  }
  
  .result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
  }

  .profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--primary-purple);
}

.dropdown-item:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: 1px solid #eee;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

.nav-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}


.dropdown-menu a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    background-color: var(--hover-bg);
    color: var(--primary-purple);
}

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

/* Add smooth animations for comments */
.comment.new.visible {
    opacity: 1;
    transform: translateY(0);
}

.comment.pending {
    opacity: 0.7;
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid var(--primary-purple);
    padding-left: 8px;
}

.comment.visible {
    opacity: 1;
}

/* Style for the submit button loading state */
.comment-button {
    position: relative;
    transition: all 0.2s ease;
}

.comment-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.settings-section {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h2 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.settings-section p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

retry-button:hover {
    background: #b91c1c;
}
/* Add to existing shared-styles.css */

.account-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 800px;
    margin: 80px auto 0;
}

.side-nav {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    max-height: 60px; /* Added max-height */
    align-items: center; /* Center buttons vertically */
}

.nav-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    color: var(--text-color);
    transition: all 0.3s;
    white-space: nowrap;
    background: transparent;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
}

.content-panel {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px; /* Added max-width */
    margin: 0 auto; /* Center the panel */
    width: 100%;
}

/* Desktop styles */
@media (min-width: 768px) {
    .account-container {
        flex-direction: row;
        padding: 2rem;
        align-items: flex-start; /* Align items to top */

    }

    .side-nav {
        flex: 0 0 150px;
        flex-direction: column;
        height: fit-content;
        max-height: none; /* Reset max-height for desktop */
        position: sticky;
        top: 100px;
        overflow-x: visible;
    }

    .content-panel {
        flex: 1;
        min-height: 400px;
    }
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.submit-button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.submit-button:hover {
    transform: translateY(-2px);
}

/* Add these styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.dropdown-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
    transition: color 0.2s;
}

.dropdown-icon:hover {
    color: var(--primary-purple);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
}

.nav-dropdown-content.show {
    display: block;
}

.nav-dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background 0.2s, color 0.2s;
}

.nav-dropdown-content a:hover {
    background: var(--hover-bg);
    color: var(--primary-purple);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
}

.user-name a {
    color: inherit;
    text-decoration: none;
}

.user-name a:hover {
    text-decoration: underline;
}

.user-emoji {
    margin-left: 0.5rem;
}

.user-premium {
    color: gold;
    margin-left: 0.5rem;
}

.xp-score {
    font-weight: 500;
    color: var(--primary-purple);
}

.leaderboard {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.leaderboard-entry:hover {
    background-color: #f8f8f8;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.rank {
    font-size: 1.25rem;
    font-weight: bold;
    min-width: 3rem;
    color: var(--text-color);
}

.user-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin: 0 1rem;
}

.rich-text-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.video-label {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.video-label:hover {
    background: #e5e7eb;
}

#videoUrl {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    flex: 1;
}

.tox-tinymce {
    border-radius: 0.5rem !important;
    border-color: #ddd !important;
}

/* Ad-specific styles */
.post[onclick] {
    cursor: pointer;
    position: relative;
    border-left: 4px solid var(--primary-pink);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post[onclick]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Sponsored label styles */
.sponsored-label {
    color: var(--primary-purple);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Ad content specific styles */
.ad-content {
    pointer-events: none; /* Ensures entire post is clickable */
}

.ad-image-container {
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.ad-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.post[onclick]:hover .ad-image {
    transform: scale(1.02);
}

.rich-text-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.rich-text-toolbar button {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.rich-text-toolbar button:hover {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.rich-text-toolbar .separator {
    color: #ddd;
}

/* ...existing code... */

.drawing-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.drawing-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: calc(100% - 40px);
    max-width: 600px;
    margin: 20px;
    touch-action: none;
}

#drawingCanvas {
    border: 2px solid #EDE9FE;
    margin-bottom: 10px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.drawing-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .drawing-controls button {
        padding: 12px;
        font-size: 14px;
    }
    
    #colorPicker {
        width: 100%;
        height: 40px;
    }
    
    #brushSize {
        width: 100%;
    }
}

/* ...existing code... */

/* Add achievement styles */
.achievements-container {
    margin: 2rem 0;
    background-color: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.achievement-card {
    background: linear-gradient(to bottom right, #f5f5f5, #ffffff);
    border-radius: 1rem;
    padding: 1rem;
    width: calc(33.333% - 1rem);
    min-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.achievement-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.achievement-description {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.achievement-date {
    font-size: 0.75rem;
    color: var(--text-color);
}

.no-achievements {
    width: 100%;
    padding: 2rem;
    text-align: center;
    color: var(--text-color);
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 0.5rem;
    border: 1px dashed #ddd;
}

/* Reaction animation styles */
@keyframes reaction-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

@keyframes reaction-glow {
    0% { box-shadow: 0 0 0 rgba(139, 92, 246, 0); }
    50% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.7); }
    100% { box-shadow: 0 0 0 rgba(139, 92, 246, 0); }
}

.reaction-animate {
    animation: reaction-pop 0.5s ease, reaction-glow 0.8s ease;
}

/* Theme customization styles */
.theme-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.theme-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--primary-purple);
}

/* Theme color variables */
:root {
    --primary-purple: #8B5CF6;
    --primary-pink: #EC4899;
    --secondary-color: #4F46E5;
    --background-color: #F3F4F6;
    --card-background: #FFFFFF;
    --text-color: #333333;
}

.theme-purple-pink {
    --primary-purple: #8B5CF6;
    --primary-pink: #EC4899;
    --background-color: #F3F4F6;
}

.theme-blue-green {
    --primary-purple: #3B82F6;
    --primary-pink: #10B981;
    --background-color: #F0FDF4;
}

.theme-orange-red {
    --primary-purple: #F59E0B;
    --primary-pink: #EF4444;
    --background-color: #FEF3C7;
}

.theme-dark {
    --primary-purple: #8B5CF6;
    --primary-pink: #EC4899;
    --background-color: #1F2937;
    --card-background: #374151;
    --text-color: #F9FAFB;
}

.theme-dark .navbar,
.theme-dark .profile-header,
.theme-dark .stats-container .stat-card,
.theme-dark .post,
.theme-dark .create-post,
.theme-dark .achievements-container {
    background-color: var(--card-background);
}

.theme-dark .post-input,
.theme-dark .search-input {
    background-color: #4B5563;
    color: var(--text-color);
}

.theme-dark body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Add buddy system styles */

/* Profile tab system */
.profile-tabs {
    display: flex;
    margin: 2rem 0 1rem;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.tab-btn.active {
    color: var(--primary-purple);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 3px 3px 0 0;
}

.tab-pane {
    display: none;
    padding: 1rem 0;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Buddy button styles */
.buddy-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    width: 100%;
}

.buddy-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.buddy-btn.add-buddy {
    background: var(--primary-purple);
    color: white;
}

.buddy-btn.add-buddy:hover {
    background: #7c3aed;
}

.buddy-btn.pending {
    background: #eee;
    color: #666;
    cursor: default;
}

.buddy-btn.accept {
    background: #10b981;
    color: white;
}

.buddy-btn.accept:hover {
    background: #059669;
}

.buddy-btn.decline {
    background: #f3f4f6;
    color: #666;
}

.buddy-btn.decline:hover {
    background: #e5e7eb;
}

.buddy-btn.remove {
    background: #f3f4f6;
    color: #666;
}

.buddy-btn.remove:hover {
    background: #fee2e2;
    color: #ef4444;
}

.buddy-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Buddy cards */
.buddy-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #f9fafb;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.buddy-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.buddy-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.buddy-info {
    flex: 1;
}

.buddy-username {
    font-weight: 500;
    font-size: 1.1rem;
}

/* Empty state for no buddies */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--text-color);
}

.empty-state svg {
    margin-bottom: 1rem;
}

/* Follow Button Styles */
.follow-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border: none;
    margin-top: 8px;
    display: inline-block;
}

.follow-btn.follow {
    background-color: var(--primary-purple);
    color: white;
}

.follow-btn.follow:hover {
    background-color: #7c3aed; /* Darker purple on hover */
}

.follow-btn.following {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.follow-btn.following:hover {
    background-color: #ffebee;
    color: #e53935;
    border-color: #e53935;
}

.follow-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

/* Following list styles */
.follow-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-bottom: 8px;
    background-color: #f9fafb;
}

.follow-card:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.follow-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #eee;
}

.follow-info {
    display: flex;
    flex-direction: column;
}

.follow-username {
    font-weight: 500;
    margin-bottom: 4px;
}

/* Stats card for followers count */
.profile-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.stat-card {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
    max-width: 120px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.875rem;
}

/* Tab styles */
.profile-tabs {
    display: flex;
    margin: 2rem 0 1rem;
    border-bottom: 1px solid #eee;
    justify-content: center;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: var(--primary-purple);
}

.tab-btn.active {
    color: var(--primary-purple);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 3px 3px 0 0;
}

.tab-pane {
    display: none;
    padding: 1rem 0;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Empty state for no following */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--text-color);
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #eee;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.7;
}

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

/* Profile info styling */
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Spacing between Meers in profile view */
#userPosts .post {
    margin-bottom: 1.5rem;
}

/* Ensure posts don't touch each other */
.post {
    margin-bottom: 1rem;
}

/* Profile picture styling */
#profileAvatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Ensure consistent circular avatars throughout the site */
.profile-avatar, 
#profileAvatar, 
.avatar-container img,
#editAvatarPreview {
    width: 150px;
    height: 150px;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Leaderboard rank badge styles */
.rank-badge {
    position: relative;
    display: inline-flex;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: 8px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    animation: glow-pulse 2s infinite alternate;
    vertical-align: middle;
}

.rank-badge.top-10 {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, #10B981, #3B82F6);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
}

.rank-badge.top-1 {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.7);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
        transform: scale(1);
    }
}

@keyframes glow-pulse-top-10 {
    0% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.8);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
        transform: scale(1);
    }
}

@keyframes glow-pulse-top-3 {
    0% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.9);
        transform: scale(1.15);
    }
    100% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
        transform: scale(1);
    }
}

@keyframes glow-pulse-top-1 {
    0% {
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(245, 158, 11, 1);
        transform: scale(1.2);
    }
    100% {
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
        transform: scale(1);
    }
}

.rank-badge.top-10 {
    animation: glow-pulse-top-10 2s infinite alternate;
}

.rank-badge.top-3 {
    animation: glow-pulse-top-3 1.8s infinite alternate;
}

.rank-badge.top-1 {
    animation: glow-pulse-top-1 1.5s infinite alternate;
}

/* Modified post header to accommodate the rank badge */
.post-header {
    position: relative;
}

/* Post styles to support the new badge position */
.post-username-container {
    display: flex;
    align-items: center;
}

.dark-mode .no-achievements {
    background-color: #1a1a1a !important;
    border-color: #444 !important;
    color: var(--text-color) !important;
}

.dark-mode [data-theme-section="true"] div[style*="background"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-color: #444 !important;
}

.dark-mode .settings-nav {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-color: #444 !important;
}

/* Override all div elements with inline background styles in dark mode */
.dark-mode div[style*="background: #f"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background:#f"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background: rgb"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background:#e"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background: #e"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background: white"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background:white"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background-color: #f"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background-color:#f"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.dark-mode div[style*="background-color: white"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

/* Override hover states for items in dark mode */
.dark-mode .feed-style-btn:hover,
.dark-mode .search-result-item:hover,
.dark-mode .dropdown-item:hover,
.dark-mode .nav-link:hover,
.dark-mode .dropdown-content a:hover,
.dark-mode .notification-item:hover,
.dark-mode .achievement-card:hover {
    background-color: #2a2a2a !important;
}

/* MeerPlus+ Premium Post Animations */
@keyframes meer-wiggle {
    0% { translate: 0 0; }
    10% { translate: -7px -4px; }
    20% { translate: 10px 0px; }
    30% { translate: -10px 5px; }
    40% { translate: 7px -3px; }
    50% { translate: -5px 3px; }
    60% { translate: 6px 0px; }
    70% { translate: -7px -2px; }
    80% { translate: 4px 2px; }
    90% { translate: -3px 0px; }
    100% { translate: 0 0; }
}

@keyframes meer-pulsate {
    0% { scale: 1; }
    50% { scale: 1.08; }
    100% { scale: 1; }
}

@keyframes meer-glow {
    0% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.7); }
    50% { box-shadow: 0 0 25px rgba(139, 92, 246, 1); }
    100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.7); }
}

/* CSS animations for premium posts - using more modern properties */
.post.animate-meer {
    animation: meer-wiggle 2s ease-in-out infinite !important;
    position: relative !important;
    z-index: 5 !important;
    translate: 0 0 !important; /* Force initial translate property */
}

.post.pulsate-meer {
    animation: meer-pulsate 2s ease-in-out infinite !important;
    scale: 1 !important; /* Force initial scale property */
}

.post.glow-meer {
    animation: meer-glow 2s ease-in-out infinite !important;
}

.premium-post-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
}

/* Target the premium CSS on specific post elements to avoid conflicts */
#feed .post.animate-meer {
    animation: meer-wiggle 2s ease-in-out infinite !important;
}

#feed .post.pulsate-meer {
    animation: meer-pulsate 2s ease-in-out infinite !important;
}

#feed .post.glow-meer {
    animation: meer-glow 2s ease-in-out infinite !important;
}

/* Support dark mode for animations */
.dark-mode .glow-meer {
    animation-name: meer-glow-dark;
}

@keyframes meer-glow-dark {
    0% { box-shadow: 0 0 10px rgba(157, 111, 255, 0.7); }
    50% { box-shadow: 0 0 25px rgba(157, 111, 255, 1); }
    100% { box-shadow: 0 0 10px rgba(157, 111, 255, 0.7); }
}

/* Ensure these have top CSS priority */
.animate-meer {
    animation: meer-wiggle 2s ease-in-out infinite !important;
}

.glow-meer {
    animation: meer-glow 2s ease-in-out infinite !important;
}

.dark-mode .glow-meer {
    animation: meer-glow-dark 2s ease-in-out infinite !important;
}

/* End MeerPlus+ Premium Post Animations */

/* ============================================= */
/* Reaction Milestone - Post Visual Effects       */
/* ============================================= */

/* Growth Stage Badge — only shown for 10+ reactions */
.growth-badge {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Show badge only for tiers that matter */
.growth-badge.meer-badge-visible {
    display: inline-flex;
}

/* HOT MEER — 10+ reactions */
.meer-badge-hot {
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    color: #ea580c;
    border: 1px solid #fb923c;
    box-shadow: 0 1px 4px rgba(234, 88, 12, 0.15);
}

/* PUMPED MEER — 50+ reactions */
.meer-badge-pumped {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    border: 1px solid #34d399;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.15);
}

/* ELITE MEER — 100+ reactions */
.meer-badge-elite {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    color: #7c3aed;
    border: 1px solid #a78bfa;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2);
}

/* LEGENDARY MEER — 1000+ reactions */
.meer-badge-legendary {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
    border: 1px solid #fbbf24;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    animation: legendary-badge-shimmer 3s ease-in-out infinite;
}

/* Dark mode badge overrides */
.dark-mode .meer-badge-hot {
    background: linear-gradient(135deg, #431407, #7c2d12);
    color: #fb923c;
    border-color: #ea580c;
}
.dark-mode .meer-badge-pumped {
    background: linear-gradient(135deg, #022c22, #064e3b);
    color: #6ee7b7;
    border-color: #059669;
}
.dark-mode .meer-badge-elite {
    background: linear-gradient(135deg, #2e1065, #4c1d95);
    color: #c4b5fd;
    border-color: #7c3aed;
}
.dark-mode .meer-badge-legendary {
    background: linear-gradient(135deg, #451a03, #78350f);
    color: #fbbf24;
    border-color: #f59e0b;
}

/* Growth Stage Post Effects */

/* 🌱 Seed — Default, no effects */
.growth-seed {
    /* Default post styling */
}

/* 🌿 Sprout — Soft green left border glow */
.growth-sprout {
    border-left: 3px solid #34d399 !important;
    transition: border-color 0.5s ease;
}

.growth-sprout:hover {
    border-left-color: #10b981 !important;
}

/* 🌻 Bloom — Gentle wiggle + warm glow */
.growth-bloom {
    border-left: 3px solid #f59e0b !important;
    animation: garden-wiggle 4s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.growth-bloom:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

/* 🌳 Tree — Shimmer + slightly larger */
.growth-tree {
    border-left: 4px solid #3b82f6 !important;
    transform: scale(1.01);
    animation: garden-shimmer 5s ease-in-out infinite;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.15);
}

.growth-tree:hover {
    transform: scale(1.015);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

/* ⭐ Star — Pulsing purple glow + prominent border + scale */
.growth-star {
    border: 2px solid #8b5cf6 !important;
    border-left: 5px solid #8b5cf6 !important;
    transform: scale(1.02);
    animation: garden-pulse-glow 3s ease-in-out infinite, garden-wiggle 6s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.growth-star:hover {
    transform: scale(1.025);
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.3);
}

/* 👑 Legend — Full golden glow + rainbow shimmer + wiggle + pulse */
.growth-legend {
    border: 2px solid #fbbf24 !important;
    border-left: 6px solid #fbbf24 !important;
    transform: scale(1.03);
    animation: garden-wiggle 3s ease-in-out infinite, garden-pulse-gold 2.5s ease-in-out infinite, garden-rainbow-border 8s linear infinite;
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.25), 0 0 40px rgba(251, 191, 36, 0.1);
    position: relative;
}

.growth-legend::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #ec4899, #8b5cf6, #3b82f6, #10b981, #fbbf24);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: garden-rainbow-shift 6s linear infinite;
    opacity: 0.3;
}

.growth-legend:hover {
    transform: scale(1.035);
    box-shadow: 0 10px 36px rgba(251, 191, 36, 0.35), 0 0 60px rgba(251, 191, 36, 0.15);
}

/* Growth Stage Keyframe Animations */

@keyframes garden-wiggle {
    0%, 100% { transform: rotate(0deg) scale(var(--growth-scale, 1)); }
    25% { transform: rotate(0.3deg) scale(var(--growth-scale, 1)); }
    75% { transform: rotate(-0.3deg) scale(var(--growth-scale, 1)); }
}

@keyframes garden-shimmer {
    0%, 100% { 
        box-shadow: 0 3px 12px rgba(59, 130, 246, 0.15);
    }
    50% { 
        box-shadow: 0 3px 20px rgba(59, 130, 246, 0.25), inset 0 0 20px rgba(59, 130, 246, 0.03);
    }
}

@keyframes garden-pulse-glow {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
    }
    50% { 
        box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35), 0 0 40px rgba(139, 92, 246, 0.08);
    }
}

@keyframes garden-pulse-gold {
    0%, 100% { 
        box-shadow: 0 6px 24px rgba(251, 191, 36, 0.25), 0 0 40px rgba(251, 191, 36, 0.1);
    }
    50% { 
        box-shadow: 0 8px 32px rgba(251, 191, 36, 0.4), 0 0 60px rgba(251, 191, 36, 0.2);
    }
}

@keyframes garden-rainbow-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes garden-rainbow-border {
    0% { border-color: #fbbf24; }
    16% { border-color: #f59e0b; }
    33% { border-color: #ec4899; }
    50% { border-color: #8b5cf6; }
    66% { border-color: #3b82f6; }
    83% { border-color: #10b981; }
    100% { border-color: #fbbf24; }
}

@keyframes legend-badge-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* Dark mode adjustments for growth stages */
.dark-mode .growth-sprout {
    border-left-color: #10b981 !important;
}

.dark-mode .growth-bloom {
    border-left-color: #f59e0b !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.dark-mode .growth-tree {
    border-left-color: #60a5fa !important;
    box-shadow: 0 3px 12px rgba(96, 165, 250, 0.2);
}

.dark-mode .growth-star {
    border-color: #a78bfa !important;
    border-left-color: #a78bfa !important;
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.3);
}

.dark-mode .growth-legend {
    border-color: #fbbf24 !important;
    border-left-color: #fbbf24 !important;
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.3), 0 0 40px rgba(251, 191, 36, 0.15);
}

.dark-mode .growth-badge-seed,
.dark-mode .growth-badge-sprout,
.dark-mode .growth-badge-bloom,
.dark-mode .growth-badge-tree,
.dark-mode .growth-badge-star,
.dark-mode .growth-badge-legend {
    display: none;
}

/* Growth stage reaction count display */
.growth-reaction-count {
    font-weight: 700;
    margin-left: 0.25rem;
}

/* End Reaction Milestone Visual Effects */

/* ==============================================
   MYSPACE VIBES: Profile Personalization Styles
   ============================================== */

/* Profile Custom Background - frosted glass for readability over custom bg */

/* Profile header: transparent so avatar/name float over bg */
.has-custom-profile-bg .profile-header {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Stat cards */
.has-custom-profile-bg .stat-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Content sections: frosted glass */
.has-custom-profile-bg .meerbuddies-section,
.has-custom-profile-bg .about-me-section,
.has-custom-profile-bg .profile-song-section {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Tabs bar */
.has-custom-profile-bg .profile-tabs {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Posts and guestbook entries */
.has-custom-profile-bg .post,
.has-custom-profile-bg .guestbook-entry {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
}

.has-custom-profile-bg .guestbook-form {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark mode variants */
.dark-mode.has-custom-profile-bg .profile-header {
    background: rgba(30, 30, 30, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode.has-custom-profile-bg .stat-card {
    background: rgba(30, 30, 30, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode.has-custom-profile-bg .meerbuddies-section,
.dark-mode.has-custom-profile-bg .about-me-section,
.dark-mode.has-custom-profile-bg .profile-song-section {
    background: rgba(30, 30, 30, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode.has-custom-profile-bg .profile-tabs {
    background: rgba(30, 30, 30, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode.has-custom-profile-bg .post,
.dark-mode.has-custom-profile-bg .guestbook-entry {
    background: rgba(30, 30, 30, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode.has-custom-profile-bg .guestbook-form {
    background: rgba(30, 30, 30, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* MeerBuddies (Top 8) Section */
.meerbuddies-section {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.meerbuddies-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
    letter-spacing: 0.5px;
}

.meerbuddies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.meerbuddy-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s;
    cursor: pointer;
}

.meerbuddy-slot:hover {
    transform: translateY(-3px);
}

.meerbuddy-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-purple);
    margin-bottom: 0.35rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.meerbuddy-slot:hover .meerbuddy-avatar {
    border-color: var(--primary-pink);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.meerbuddy-name {
    font-size: 0.7rem;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
}

.meerbuddy-empty {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
    color: var(--border-color);
    font-size: 1.2rem;
}

/* About Me Card */
.about-me-section {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.about-me-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
}

.about-me-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.about-me-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.about-me-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-purple);
    font-weight: 600;
}

.about-me-value {
    font-size: 0.9rem;
    color: var(--text-color);
}

.about-me-item.full-width {
    grid-column: 1 / -1;
}

.mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    font-size: 0.85rem;
    font-weight: 500;
}

/* Profile Song Player */
.profile-song-section {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.song-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    animation: song-pulse 2s ease-in-out infinite;
}

@keyframes song-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

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

.song-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.75rem;
    color: var(--primary-purple);
}

.song-mute-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
}

.song-mute-btn:hover {
    background: var(--hover-bg);
}

.song-player-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Badge Flair Row */
.badge-flair-row {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.badge-flair-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    font-size: 0.75rem;
    color: var(--text-color);
    cursor: default;
    transition: transform 0.2s;
}

.badge-flair-item:hover {
    transform: scale(1.08);
}

.badge-flair-icon {
    font-size: 0.85rem;
}

/* Pinned Meer */
.pinned-post-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    color: var(--primary-purple);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Guestbook */
.guestbook-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guestbook-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.guestbook-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guestbook-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guestbook-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    resize: none;
    min-height: 60px;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--input-background);
    color: var(--input-text);
}

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

.guestbook-submit-btn {
    align-self: flex-end;
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.guestbook-submit-btn:hover {
    transform: translateY(-1px);
}

.guestbook-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.guestbook-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    animation: guestbook-fade-in 0.3s ease;
}

@keyframes guestbook-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.guestbook-entry-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guestbook-entry-body {
    flex: 1;
    min-width: 0;
}

.guestbook-entry-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.guestbook-entry-username {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-purple);
    text-decoration: none;
}

.guestbook-entry-username:hover {
    text-decoration: underline;
}

.guestbook-entry-time {
    font-size: 0.7rem;
    color: #999;
}

.guestbook-entry-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    word-break: break-word;
}

.guestbook-entry-delete {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    transition: color 0.2s, background 0.2s;
    margin-left: auto;
}

.guestbook-entry-delete:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.guestbook-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
    font-size: 0.9rem;
}

.guestbook-load-more {
    display: block;
    margin: 1rem auto 0;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--primary-purple);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--primary-purple);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.guestbook-load-more:hover {
    background: var(--hover-bg);
}

/* Guestbook Reactions (Pump / Bust / Meerply) */
.guestbook-reactions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.guestbook-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.guestbook-react-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--primary-purple);
}

.guestbook-react-btn.pump.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10B981;
    color: #059669;
}

.guestbook-react-btn.bust.active {
    background: rgba(239, 68, 68, 0.12);
    border-color: #EF4444;
    color: #dc2626;
}

.guestbook-react-btn.meerply.active {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.react-count {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Guestbook Replies (Meerplies) */
.guestbook-replies {
    margin-top: 0.75rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(139, 92, 246, 0.2);
}

.guestbook-reply {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.guestbook-reply:last-of-type {
    border-bottom: none;
}

.guestbook-reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guestbook-reply-body {
    flex: 1;
    min-width: 0;
}

.guestbook-reply-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

.guestbook-reply-header .guestbook-entry-username {
    font-size: 0.8rem;
}

.guestbook-reply-header .guestbook-entry-time {
    font-size: 0.7rem;
}

.guestbook-reply-content {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.4;
    word-break: break-word;
}

/* Reply input form */
.guestbook-reply-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: flex-end;
}

.guestbook-reply-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--card-background);
    color: var(--text-color);
    transition: border-color 0.2s;
}

.guestbook-reply-input textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.guestbook-reply-submit {
    padding: 0.4rem 0.8rem;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.guestbook-reply-submit:hover {
    opacity: 0.9;
}

.guestbook-reply-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dark mode guestbook reactions */
.dark-mode .guestbook-react-btn {
    border-color: #374151;
}

.dark-mode .guestbook-react-btn:hover {
    background: rgba(139, 92, 246, 0.15);
}

.dark-mode .guestbook-reply {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .guestbook-replies {
    border-left-color: rgba(139, 92, 246, 0.3);
}

.dark-mode .guestbook-reply-input textarea {
    border-color: #374151;
}

/* Profile Edit Modal for Myspace features */
.profile-features-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.profile-features-modal-content {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.profile-features-modal-content h3 {
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
}

.modal-form-group {
    margin-bottom: 1rem;
}

.modal-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--input-background);
    color: var(--input-text);
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.modal-btn-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.modal-btn-save {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--primary-purple), var(--primary-pink));
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.modal-btn-save:hover {
    transform: translateY(-1px);
}

.modal-btn-cancel {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.modal-btn-cancel:hover {
    background: var(--hover-bg);
}

/* MeerBuddies picker inside modal */
.buddy-picker-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.buddy-picker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: background 0.2s;
}

.buddy-picker-item:hover {
    background: var(--hover-bg);
}

.buddy-picker-item.selected {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
}

.buddy-picker-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.buddy-picker-item span {
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Color picker row */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker-row input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
}

.color-picker-row input[type="text"] {
    flex: 1;
}

/* Customize Profile Button */
.customize-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--primary-purple);
    border-radius: 2rem;
    background: transparent;
    color: var(--primary-purple);
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.customize-profile-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
}

/* Dark mode overrides for Myspace Vibes components */
.dark-mode .meerbuddies-section,
.dark-mode .about-me-section,
.dark-mode .profile-song-section,
.dark-mode .guestbook-entry,
.dark-mode .profile-features-modal-content {
    background-color: var(--card-background) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .guestbook-input {
    background-color: var(--input-background) !important;
    color: var(--input-text) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .meerbuddy-empty {
    border-color: var(--border-color);
    color: var(--border-color);
}

.dark-mode .badge-flair-item {
    background: linear-gradient(135deg, rgba(157, 111, 255, 0.2), rgba(255, 100, 180, 0.2));
}

.dark-mode .mood-badge {
    background: linear-gradient(135deg, rgba(157, 111, 255, 0.25), rgba(255, 100, 180, 0.25));
}

.dark-mode .pinned-post-badge {
    background: linear-gradient(135deg, rgba(157, 111, 255, 0.2), rgba(255, 100, 180, 0.2));
}

/* Responsive */
@media (max-width: 480px) {
    .meerbuddies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .meerbuddy-avatar {
        width: 44px;
        height: 44px;
    }
    
    .meerbuddy-name {
        font-size: 0.6rem;
        max-width: 55px;
    }
    
    .about-me-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-features-modal-content {
        width: 95%;
        padding: 1rem;
    }
}

/* End Myspace Vibes Styles */