:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --background-color: #ffffff;
    --text-color: #000000;
    --gray-light: #FFFFFF;
    --gray-dark: #333333;
    --navbar-height: 4rem;
    --mobile-breakpoint: 768px;
}

/* Theme Variables */
:root[data-theme="light"] {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --background-color: #ffffff;
    --text-color: #000000;
    --gray-light: #f5f5f5;
    --gray-dark: #333333;
}

:root[data-theme="dark"] {
    --primary-color: #0A84FF;
    --secondary-color: #5E5CE6;
    --background-color: #000000;
    --text-color: #ffffff;
    --gray-light: #1C1C1E;
    --gray-dark: #D1D1D6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    height: var(--navbar-height);
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: none;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link.active {
    opacity: 1;
}

/* Hamburger Menu */
.hamburger-menu {
    display: block;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--text-color);
    transition: transform 0.3s ease;
}

/* Hamburger animation */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 2000;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.mobile-menu-content {
    padding: 2rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem 0;
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.primary-button:hover {
    background-color: var(--secondary-color);
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.login-btn:hover {
    background-color: var(--secondary-color);
}

/* Replace the modal styles with a sliding panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.settings-panel.active {
    right: 0;
}

.settings-panel-content {
    padding: 2rem;
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.close-settings {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
}

/* Update form styles */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Update profile image styles in settings */
.profile-image-setting {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
}

.current-profile-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.current-profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--gray-light);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 2rem;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
}

.features {
    padding: 4rem 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    padding: 2rem;
    background-color: var(--gray-light);
    border-radius: 10px;
    text-align: center;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--gray-dark);
    color: white;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

/* Add these styles for the login form */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-content input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-content button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.modal-content button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-message {
    color: #ff3b30;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.modal-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.modal-footer button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Add these new styles */
.profile-container {
    max-width: 1030px;  /* 935px + 10% */
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    background-color: var(--background-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.profile-info h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--text-color);
}

.bio {
    color: var(--text-secondary);
    margin-top: 1rem;
}

.posts-section {
    background-color: var(--background-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.post-item {
    background: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.post-image-container {
    aspect-ratio: 1;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    border-radius: 25%;
    object-fit: cover;
}

.post-content {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.post-interactions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.like-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.like-btn.liked .heart-icon {
    color: #ff3b30;
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.heart-icon, .comment-icon {
    font-size: 1.25rem;
}

.likes-count, .comments-count {
    font-size: 0.9rem;
    color: var(--text-color);
}

.post-caption {
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

/* For the feed's overlay text (which should always be white) */
.post-overlay .likes-count,
.post-overlay .comments-count,
.post-overlay .post-caption {
    color: white;
}

/* Dark theme support */
[data-theme="dark"] .post-item {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
}

[data-theme="dark"] .post-content {
    border-color: #3a3a3c;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.settings-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.hamburger-icon {
    display: block;
    font-size: 1.5rem;
    line-height: 1;
}

.save-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}

.save-btn:hover {
    background-color: var(--secondary-color);
}

/* Add these styles for the profile image */
.profile-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 25%;
    object-fit: cover;
}

.image-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    border-radius: 25%;
    justify-content: center;
    align-items: center;
}

.profile-image-container:hover .image-overlay {
    display: flex;
}

.change-image-btn {
    color: white;
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.profile-text {
    flex: 1;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Add these styles for post interactions */
.post-interactions {
    display: flex;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.interaction-icon {
    font-size: 1.1rem;
}

.interaction-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Update lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    width: 90%;
    max-width: 400px;
}

.close-lightbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Dark theme support for lightbox */
[data-theme="dark"] .lightbox-content {
    background-color: #2c2c2e;
}

[data-theme="dark"] .close-lightbox {
    color: var(--text-color);
}

/* Add these styles */
.no-likes, .error-message {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.error-message {
    color: #ff3b30;
}

.likes-button {
    cursor: pointer;
}

.likes-button:hover {
    color: var(--primary-color);
}

/* Update lightbox post styles */
.lightbox-post {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    max-width: 750px;
    margin: 0 auto;
    padding: 1rem;
}

.image-lightbox-content {
    background-color: transparent;
    width: auto;
    max-height: 95vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.full-size-image {
    max-width: 750px;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: black;
    border-radius: 4px;
}

.lightbox-post-content {
    padding: 1rem;
    padding-bottom: 0.5rem;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

/* Wall styles */
.wall-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.feed-post {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

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

.post-username {
    font-weight: 500;
    color: var(--text-color);
}

.feed-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
}

.spinner-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #eee;
}

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

.comment-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
}

.comments-list {
    padding: 0 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-username {
    font-weight: 500;
}

.comment-text {
    color: var(--text-color);
}

/* About page styles */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.about-section {
    background-color: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.about-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 3rem;
    max-width: 800px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-card {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.2s;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.values-list li:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .about-section {
        padding: 2rem;
    }

    .about-section h1 {
        font-size: 2rem;
    }

    .about-intro {
        font-size: 1.1rem;
    }
}

.hamburger-menu {
    display: none;
}

.mobile-nav {
    display: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-right {
        display: none;
    }

    .mobile-nav {
        display: none;
        position: fixed;
        top: 4rem;
        left: 0;
        width: 100%;
        background: var(--background-color);
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .mobile-nav.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-nav .nav-link {
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: left;
        border: none;
        background: none;
        font-size: 1rem;
        cursor: pointer;
    }

    .mobile-nav .nav-link:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

/* Update navbar styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

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

.desktop-only {
    display: block;
}

.nav-right .desktop-only {
    display: block;
}

.nav-right .mobile-only {
    display: none;
}

.settings-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.logout-btn {
    background-color: #ff3b30;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #dc352b;
}

.error-message {
    color: #ff3b30;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

/* Settings panel navigation */
.settings-view {
    display: none;
    height: 100%;
}

.settings-view.active {
    display: block;
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.back-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
}

/* Settings menu styles */
.settings-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    transition: background-color 0.2s;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background-color: var(--gray-light);
}

.menu-item .arrow {
    color: #999;
}

.logout-item {
    color: #ff3b30;
}

.logout-item:hover {
    background-color: #fff1f0;
}

/* Appearance settings styles */
.appearance-options {
    padding: 1rem 0;
}

.theme-selector {
    display: flex;
    gap: 1rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    color: var(--text-color);
}

.theme-option.active {
    border-color: var(--primary-color);
}

.theme-preview {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

.theme-preview.light {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.theme-preview.dark {
    background-color: #000000;
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
}

/* Make sure text is visible in both themes */
:root[data-theme="dark"] .theme-option {
    color: var(--text-color);
}

:root[data-theme="light"] .theme-option {
    color: var(--text-color);
}

/* Add these new CSS variables for dark theme */
[data-theme="dark"] {
    --background-color: #1c1c1e;
    --text-color: #ffffff;
    --gray-light: #2c2c2e;
    --gray-dark: #3a3a3c;
}

/* Add these dark theme overrides */
[data-theme="dark"] body,
[data-theme="dark"] .wall-container,
[data-theme="dark"] .feed {
    background-color: var(--background-color);
}

[data-theme="dark"] .post {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
}

[data-theme="dark"] .posts-feed {
    background-color: var(--background-color);
    gap: 1rem;
}

[data-theme="dark"] .navbar,
[data-theme="dark"] .settings-panel,
[data-theme="dark"] .settings-panel-header,
[data-theme="dark"] .profile-header {
    background-color: #2c2c2e;
}

[data-theme="dark"] .close-settings,
[data-theme="dark"] .back-button {
    color: var(--text-color);
}

[data-theme="dark"] .menu-item {
    color: var(--text-color);
}

[data-theme="dark"] .menu-item:hover {
    background-color: #3a3a3c;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    color: var(--text-color);
}

[data-theme="dark"] .nav-link {
    color: var(--text-color);
}

[data-theme="dark"] .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-link.active {
    color: var(--primary-color);
}

[data-theme="dark"] .logout-item:hover {
    background-color: rgba(255, 59, 48, 0.1);
}

[data-theme="dark"] .post-caption,
[data-theme="dark"] .interaction-count,
[data-theme="dark"] .no-posts,
[data-theme="dark"] .post-content,
[data-theme="dark"] .lightbox-post-content {
    color: var(--text-color);
}

[data-theme="dark"] .post-card {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
}

[data-theme="dark"] .lightbox-content {
    background-color: #2c2c2e;
    color: var(--text-color);
}

[data-theme="dark"] .close-lightbox {
    color: var(--text-color);
}

/* Dark theme overrides for feed posts */
[data-theme="dark"] .posts-feed .post {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
}

[data-theme="dark"] .post-user-image {
    border: 2px solid #3a3a3c;
}

[data-theme="dark"] .post-header {
    background-color: #2c2c2e;
    border-bottom: 1px solid #3a3a3c;
    padding: 0.5rem 1rem;
    margin: 0;
}

[data-theme="dark"] .post-username,
[data-theme="dark"] .post-time,
[data-theme="dark"] .post-caption,
[data-theme="dark"] .comment-text,
[data-theme="dark"] .comment-username {
    color: var(--text-color);
}

[data-theme="dark"] .comment-form input {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
    color: var(--text-color);
}

[data-theme="dark"] .comment-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .likes-list {
    background-color: #2c2c2e;
    color: var(--text-color);
}

[data-theme="dark"] .like-item {
    border-bottom: 1px solid #3a3a3c;
}

[data-theme="dark"] .like-username {
    color: var(--text-color);
}

/* Dark theme overrides for posts */
[data-theme="dark"] .post {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
}

[data-theme="dark"] .post-image-container {
    background-color: #2c2c2e;
    margin: 0;
    padding: 0;
    line-height: 0;
}

[data-theme="dark"] .post-image-container img {
    width: 100%;
    display: block;
}

[data-theme="dark"] .post-interactions {
    background-color: #2c2c2e;
    border-top: 1px solid #eee;
    margin: 0;
    padding: 0.5rem 1rem;
}

[data-theme="dark"] .post-footer {
    background-color: #2c2c2e;
    padding: 0.5rem 1rem;
    margin: 0;
}

[data-theme="dark"] .interaction-item {
    background-color: #2c2c2e;
}

[data-theme="dark"] .post-content {
    background-color: #2c2c2e;
}

[data-theme="dark"] .post-header {
    background-color: #2c2c2e;
}

[data-theme="dark"] .post-footer {
    background-color: #2c2c2e;
}

[data-theme="dark"] .interaction-count {
    color: var(--text-color);
}

/* Discover page styles */
.discover-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.discover-content {
    margin-top: 1rem;
}

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

.post-card {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

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

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-info {
    color: white;
    display: flex;
    gap: 1rem;
    font-size: 1.1rem;
}

.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.signup-link {
    text-align: center;
    margin-top: 1rem;
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

.signup-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.error-message {
    color: #ff3b30;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.login-link {
    text-align: center;
    margin-top: 1rem;
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Dark theme support */
[data-theme="dark"] .signup-container {
    color: var(--text-color);
}

[data-theme="dark"] .signup-form input {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    color: var(--text-color);
}

/* User discovery styles */
.users-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 25%;
    object-fit: cover;
}

[data-theme="dark"] .user-avatar {
    background-color: #2c2c2e; /* Darker background for dark theme */
}

.user-details h3 {
    margin: 0;
    font-size: 1rem;
}

.user-details p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #666;
}

.follow-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    background: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.follow-btn:hover {
    background-color: rgba(0, 122, 255, 0.1);
}

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

/* Dark theme support */
[data-theme="dark"] .user-card {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
}

[data-theme="dark"] .user-details p {
    color: #999;
}

/* Search styles */
.discover-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-bar {
    margin: 1rem 0;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--gray-light);
    border-radius: 10px;
    padding: 0.5rem 1rem;
}

.search-icon {
    margin-right: 0.5rem;
    color: #666;
}

#searchInput {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-color);
}

.clear-search {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
}

.search-tabs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    border-bottom: 2px solid transparent;
}

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

.tab-content {
    display: none;
}

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

.hashtags-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hashtag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.hashtag-name {
    color: var(--primary-color);
    font-weight: 500;
}

.hashtag-count {
    color: #666;
    font-size: 0.9rem;
}

/* Dark theme support */
[data-theme="dark"] .search-input-container {
    background-color: #2c2c2e;
}

[data-theme="dark"] #searchInput {
    color: var(--text-color);
}

[data-theme="dark"] .hashtag-item {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
}

.default-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

[data-theme="dark"] .default-avatar {
    background-color: #2c2c2e;
}

.post-actions {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
}

.like-btn, .comment-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    transition: transform 0.2s;
}

.like-btn:hover, .comment-btn:hover {
    transform: scale(1.1);
}

.like-btn.liked .heart-icon {
    color: #ff3b30;
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.heart-icon, .comment-icon {
    font-size: 1.25rem;
}

.likes-count, .comments-count {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Dark theme support */
[data-theme="dark"] .post-actions {
    border-color: #3a3a3c;
}

.post-item {
    position: relative;
    overflow: hidden;
}

.post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-item:hover .post-overlay {
    opacity: 1;
}

.post-interactions {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.like-btn, .comment-icon {
    color: white;
    font-size: 1.2rem;
}

.likes-count, .comments-count {
    color: white;
    font-size: 0.9rem;
}

.post-caption {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark theme support */
[data-theme="dark"] .post-overlay {
    background: rgba(0, 0, 0, 0.8);
}

/* Base styles for likes and comments */
.likes-count, .comments-count {
    font-size: 0.9rem;
    color: var(--text-color); /* Default to theme text color */
}

.post-caption {
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color); /* Default to theme text color */
}

/* Feed overlay styles (white text) */
.feed-post .post-overlay .likes-count,
.feed-post .post-overlay .comments-count,
.feed-post .post-overlay .post-caption {
    color: white;
}

/* Profile grid styles (theme-based text) */
.post-item .post-content .likes-count,
.post-item .post-content .comments-count,
.post-item .post-content .post-caption {
    color: var(--text-color);
}

/* Dark theme support */
[data-theme="dark"] .post-item {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
}

[data-theme="dark"] .post-content {
    border-color: #3a3a3c;
}

.verify-container {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    background-color: var(--background-color);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message:not(:empty) {
    opacity: 1;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.secondary-button {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.secondary-button:hover {
    background-color: rgba(0, 122, 255, 0.1);
}

.landing-page {
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    padding: 72px 0;
    width: 100%;
}

.landing-left {
    max-width: 500px;
    padding-right: 32px;
}

.landing-left h1 {
    color: var(--primary-color);
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.5rem;
    line-height: 1.4;
    color: #1c1e21;
}

.landing-right {
    flex: 0 0 396px;
}

.login-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
    padding: 1rem;
}

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

.login-form input {
    padding: 14px 16px;
    font-size: 17px;
    border-radius: 6px;
    border: 1px solid #dddfe2;
    width: 100%;
}

.login-button {
    background: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: bold;
    width: 100%;
}

.forgot-password {
    text-align: center;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
}

.divider {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid #dadde1;
}

.create-account-button {
    background: #42b72a;
    color: white;
    text-decoration: none;
    text-align: center;
    font-size: 1.125rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    width: 100%;
}

.create-page-text {
    color: #1c1e21;
    font-size: 14px;
    text-align: center;
    margin-top: 1rem;
}

.create-page-text a {
    color: inherit;
    font-weight: bold;
    text-decoration: none;
}

.landing-footer {
    background: white;
    padding: 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    color: #737373;
    font-size: 12px;
}

@media (max-width: 900px) {
    .landing-container {
        flex-direction: column;
        padding: 0 1rem;
    }

    .landing-left {
        text-align: center;
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .landing-right {
        width: 100%;
        flex: none;
    }
}

.hamburger-menu {
    display: none;
}

.mobile-nav {
    display: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-right {
        display: none;
    }

    .mobile-nav {
        display: none;
        position: fixed;
        top: 4rem;
        left: 0;
        width: 100%;
        background: var(--background-color);
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .mobile-nav.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-nav .nav-link {
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: left;
        border: none;
        background: none;
        font-size: 1rem;
        cursor: pointer;
    }

    .mobile-nav .nav-link:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

#content {
    margin-top: 4rem; /* Height of navbar */
    height: calc(100vh - 4rem);
    width: 100%;
}

#pageFrame {
    width: 100%;
    height: 100%;
    border: none;
    overflow: auto;
}

/* Add this to handle iframe content */
body.in-iframe {
    padding-top: 0 !important; /* Remove top padding when in iframe */
}

/* Make sure these styles are present */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.hamburger-icon {
    display: block;
    font-size: 1.5rem;
    line-height: 1;
}

/* Mobile-first responsive design */
.navbar {
    height: var(--navbar-height);
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav .nav-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.mobile-nav .nav-link:last-child {
    border-bottom: none;
}

/* Responsive layout */
@media (min-width: 768px) {
    .hamburger-menu {
        display: none;
    }

    .mobile-nav {
        display: none !important;
    }

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

    .nav-link {
        text-decoration: none;
        color: var(--text-color);
        padding: 0.5rem 1rem;
        border-radius: 4px;
    }

    .nav-link:hover {
        background-color: rgba(0,0,0,0.05);
    }

    .nav-link.active {
        color: var(--primary-color);
        font-weight: 500;
    }
}

/* Content area */
.content {
    padding: calc(var(--navbar-height) + 1rem) 1rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Profile page specific mobile styles */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image-container {
        margin-bottom: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Footer styles */
.site-footer {
    background-color: var(--background-color);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem 1rem;
    margin-top: auto; /* Push footer to bottom */
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-link:hover {
    opacity: 1;
}

.footer-copyright {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.9rem;
    text-align: center;
}

/* Mobile footer styles */
@media (max-width: 768px) {
    .footer-nav {
        gap: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .footer-link {
        padding: 0.5rem;
    }
}

/* Profile Container and Header */
.profile-container {
    max-width: 1030px;  /* 935px + 10% */
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-header-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 25%;
    object-fit: cover;
}

.image-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    border-radius: 25%;
    justify-content: center;
    align-items: center;
}

.profile-image-container:hover .image-overlay {
    display: flex;
}

.change-image-btn {
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    text-align: center;
}

/* Split View Layout */
.settings-split-view {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background-color: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 600px;
}

/* Left Navigation */
.settings-nav {
    padding: 1rem;
    border-right: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-nav-btn {
    padding: 1rem;
    text-align: left;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.settings-nav-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

.settings-nav-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.settings-nav-btn.logout {
    margin-top: auto;
    color: #ff3b30;
}

/* Right Content Area */
.settings-content {
    padding: 2rem;
    position: relative;
}

.settings-view {
    display: none;
}

.settings-view.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 1rem;
}

.save-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

/* Notification Toggle Styles */
.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.notification-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

/* Modern Toggle Switch */
.toggle-label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    background-color: rgba(120, 120, 128, 0.16);
    border-radius: 31px;
    transition: background-color 0.2s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Toggle active state */
.toggle-input:checked + .toggle-slider {
    background-color: #007AFF;
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Dark theme adjustments */
:root[data-theme="dark"] .toggle-slider {
    background-color: rgba(120, 120, 128, 0.32);
}

:root[data-theme="dark"] .toggle-slider:before {
    background-color: #FFFFFF;
}

:root[data-theme="dark"] .toggle-input:checked + .toggle-slider {
    background-color: #0A84FF;
}

/* Text styles */
.notification-option span {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Users List Styles */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 25%;
    object-fit: cover;
}

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

.user-name {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

.unfollow-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.unfollow-btn:hover {
    background-color: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
    border-color: rgba(255, 59, 48, 0.2);
}

/* Dark theme adjustments */
:root[data-theme="dark"] .unfollow-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .unfollow-btn:hover {
    background-color: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.2);
}

/* Profile Posts Grid */
.profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 1rem;
    width: 100%;
}

.profile-post-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

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

/* Hover effect */
.profile-post-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-post-item:hover::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1030px) {
    .profile-container {
        padding: 1rem;
    }
    
    .settings-view {
        padding: 1rem;
    }
}

/* Post loading and error states */
.post-loading-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--gray-light) 0%, 
        var(--background-color) 50%, 
        var(--gray-light) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.post-error-fallback {
    width: 100%;
    height: 100%;
    background-color: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.7;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Ensure images fill their container properly */
.profile-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Removes any bottom spacing */
}
