:root {
    /* Dark modern theme - base colors */
    --bg-primary: #0f172a;
    /* Deeper blue-black for main background */
    --bg-secondary: #1e293b;
    /* Slightly lighter blue-gray for cards */
    --bg-tertiary: #0a1120;
    /* Darker blue for tertiary backgrounds */
    --bg-hover: #2d3748;
    /* Lighter blue for hover effects */

    /* Text colors */
    --text-primary: #f1f5f9;
    /* Light gray for primary text */
    --text-secondary: #94a3b8;
    /* Muted blue-gray for secondary text */

    /* Accent colors - using a vibrant blue palette */
    --accent-primary: #3b82f6;
    /* Vibrant blue for primary accent */
    --accent-primary-rgb: 59, 130, 246;
    /* RGB version for transparency */
    --accent-secondary: #38bdf8;
    /* Lighter blue for secondary accent */

    /* Form elements */
    --input-bg: #1e293b;
    /* Matching secondary background */
    --input-border: #4b5563;
    /* Subtle border */
    --button-bg: #3b82f6;
    /* Matching primary accent */
    --button-hover: #2563eb;
    /* Darker blue for hover */

    /* Effects */
    --shadow: rgba(0, 0, 0, 0.25);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    /* Layout constants */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

.light-theme {
    /* Light modern theme */
    --bg-primary: #f8fafc;
    /* Very light blue-gray for main background */
    --bg-secondary: #ffffff;
    /* White for cards and components */
    --bg-tertiary: #f1f5f9;
    /* Light gray for tertiary backgrounds */
    --bg-hover: #e2e8f0;
    /* Subtle gray for hover effects */

    /* Text colors */
    --text-primary: #1e293b;
    /* Dark blue-gray for primary text */
    --text-secondary: #475569;
    /* Medium gray for secondary text */

    /* Keeping the same accent colors for consistency */
    --accent-primary: #3b82f6;
    --accent-primary-rgb: 59, 130, 246;
    --accent-secondary: #38bdf8;

    /* Form elements */
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --button-bg: #3b82f6;
    --button-hover: #2563eb;

    /* Effects */
    --shadow: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    padding: 0;
    margin: 0;
}

/* Add auth-wrapper for login/signup pages */
.auth-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 80px;
}

.container {
    background-color: var(--bg-secondary);
    padding: 1.8rem;
    border-radius: 1rem;
    box-shadow: 0 8px 30px var(--shadow);
    width: 100%;
    max-width: 550px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: auto;
    /* Center container when in auth-wrapper */
}

.navbar-small {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    padding: 1rem;
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
}

.nav-content {
    margin: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100% - 2rem);
}

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

.nav-logo {
    height: 32px;
    width: auto;
}

.nav-brand {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

h1 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 700;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

input:not([type="checkbox"]),
select {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
}

input:not([type="checkbox"]):focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.2);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237aa2f7' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.checkbox-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin: 0.3rem 0;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.checkbox-container label {
    margin: 0;
    cursor: pointer;
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.2);
}

.btn-primary,
.btn-secondary {
    display: block;
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 0.8rem;
}

.btn-primary {
    background-color: var(--button-bg);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--button-bg);
    border: 2px solid var(--button-bg);
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background-color: var(--button-bg);
    color: white;
    transform: translateY(-2px);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0);
}

p {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-primary);
}

#theme-toggle {
    position: static;
    margin-left: auto;
    background: var(--accent-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px var(--shadow);
    padding: 0;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

.theme-icon {
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.light-icon {
    display: none;
}

.light-theme .dark-icon {
    display: none;
}

.light-theme .light-icon {
    display: block;
}

.link {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    input:not([type="checkbox"]),
    select {
        padding: 0.7rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.7rem;
    }
}

@supports (backdrop-filter: blur(10px)) {
    .container {
        background-color: rgba(36, 40, 59, 0.8);
        backdrop-filter: blur(10px);
    }

    .light-theme .container {
        background-color: rgba(255, 255, 255, 0.8);
    }
}

.terms-content {
    line-height: 1.6;
}

.terms-heading {
    color: var(--text-secondary);
    margin: 1rem 0;
}

.terms-button-container {
    margin-top: 2rem;
}

.error-message {
    color: #e74c3c;
    background-color: #fadbd8;
    border: 1px solid #e74c3c;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.validation-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.input-error {
    border-color: #e74c3c !important;
    background-color: #fff8f8;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.success-message {
    color: #2ecc71;
    background-color: #d4efdf;
    border: 1px solid #2ecc71;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 15px var(--shadow);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme .sidebar-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    height: 32px;
    width: 32px;
}

.sidebar-title {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

/* Adding sidebar spacer to push bottom menu to the bottom */
.sidebar-spacer {
    flex-grow: 1;
}

.sidebar-menu-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-bottom: 20px;
}

.light-theme .sidebar-menu-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-item {
    margin: 5px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}

.sidebar-link:hover,
#search-btn:hover {
    background-color: rgba(122, 162, 247, 0.1);
    color: var(--accent-primary);
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
    /* Makes icon white */
}

/* Exclude profile pictures from the icon filter */
.sidebar-profile-pic {
    filter: none !important;
}

.light-theme .sidebar-icon:not(.sidebar-profile-pic) {
    filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%);
    /* Makes icon black */
}

.sidebar .light-icon {
    display: none;
}

.light-theme .sidebar .dark-icon {
    display: none;
}

.light-theme .sidebar .light-icon {
    display: block;
}

/* Sidebar profile picture styling */
.sidebar-profile-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.feed {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar-title,
    .sidebar-link span {
        display: none;
    }

    .sidebar-link {
        justify-content: center;
        padding: 15px;
    }

    .feed {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
}

/* Welcome Page Styles */
.welcome-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 80px;
}

.welcome-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.welcome-wrapper p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: center;
    color: var(--text-primary);
}

.welcome-wrapper h1 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.welcome-wrapper .container {
    max-width: 600px;
    text-align: center;
    padding: 2.5rem;
}

/* Account Page Styles */
.account-container {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 30px;
    max-width: 100%;
}

.account-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px var(--shadow);
    width: 100%;
}

.account-card h2 {
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(169, 177, 214, 0.2);
    padding-bottom: 10px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.account-info-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(169, 177, 214, 0.1);
}

.account-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.account-value {
    font-weight: 400;
    color: var(--text-primary);
}

.account-form {
    max-width: 500px;
}

@media (max-width: 768px) {
    .account-container {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
        padding: 20px;
    }

    .account-info-item {
        flex-direction: column;
        gap: 5px;
    }

    .account-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .account-container {
        padding: 15px;
    }

    .account-card h2 {
        font-size: 1.2rem;
    }
}

/* Enhanced Account Info Styles */
.account-info-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.account-info-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background-color: rgba(122, 162, 247, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    position: relative;
}

.account-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.account-value {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

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

    .account-info-item {
        padding: 12px 15px;
        grid-template-columns: 100px minmax(0, 1fr) auto;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .account-info-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        align-items: flex-start;
        gap: 8px;
    }

    .edit-btn {
        justify-self: flex-end;
        margin-top: 5px;
    }

    .account-value {
        font-size: 0.95rem;
    }
}

/* 404 Error Page Styles */
.error-content {
    text-align: center;
    padding: 20px 0;
}

.error-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 15px 0;
}

.edit-btn {
    cursor: pointer;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.edit-btn:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

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

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 998;
    backdrop-filter: blur(3px);
}

.overlay.active {
    display: block;
}

/* Popup Forms */
.popup-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 500px;
    z-index: 999;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.popup-form.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.popup-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    background: transparent;
    border: none;
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--accent-primary);
    background-color: rgba(122, 162, 247, 0.1);
}

.popup-form h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Search Popup Styles */
#search-btn {
    cursor: pointer;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
}

#search-popup {
    z-index: 1001;
}

#search-popup .popup-content {
    max-width: 600px;
}

#search-query {
    font-size: 1.1rem;
    padding: 12px 15px;
}

@media (max-width: 768px) {
    #search-btn {
        justify-content: center;
        text-align: center;
        padding: 15px;
    }

    #search-btn span {
        display: none;
    }
}

/* New Profile Page Styles */
.profile-container {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 0;
    max-width: 100%;
}

.profile-header {
    position: relative;
    width: 100%;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 10px var(--shadow);
    margin-bottom: 20px;
}

.profile-cover {
    height: 180px;
    width: 100%;
    background-color: var(--accent-primary);
    background-image: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.profile-header-content {
    position: relative;
    padding: 0 40px 25px;
    display: flex;
    align-items: flex-end;
}

.profile-picture-container {
    position: absolute;
    top: -60px;
    left: 40px;
    width: 120px;
    height: 120px;
    border: 5px solid var(--bg-secondary);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow);
}

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

.profile-info {
    margin-left: 150px;
    padding-top: 20px;
    flex: 1;
}

.profile-name {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
}

.profile-username {
    margin: 5px 0;
    font-size: 16px;
    color: var(--text-secondary);
    text-align: left;
}

.profile-since {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
    text-align: left;
}

#edit-profile-btn {
    width: auto;
    padding: 8px 20px;
    margin: 20px 0 0;
    align-self: flex-start;
}

.profile-content {
    padding: 0 40px;
}

/* Profile Edit Styles */
.wide-popup {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.profile-pic-edit {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.pfp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-btn {
    display: inline-block;
    text-align: center;
    margin: 0;
    width: auto;
    padding: 8px 16px;
}

#selected-file-name {
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.save-pfp-btn {
    margin-top: 10px;
    width: auto;
}

.account-edit-section {
    margin-top: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .profile-container {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }

    .profile-header-content {
        flex-direction: column;
        align-items: center;
        padding: 0 20px 20px;
    }

    .profile-picture-container {
        position: relative;
        top: -50px;
        left: 0;
        margin: 0 auto;
    }

    .profile-info {
        margin-left: 0;
        text-align: center;
        padding-top: 0;
    }

    .profile-name {
        text-align: center;
    }

    .profile-username,
    .profile-since {
        text-align: center;
    }

    #edit-profile-btn {
        margin: 15px auto 0;
    }

    .profile-content {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .profile-cover {
        height: 120px;
    }

    .profile-picture-container {
        width: 90px;
        height: 90px;
        top: -45px;
    }

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

/* New Post Page Styles */
.content-container {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 30px;
    display: flex;
    justify-content: center;
}

.post-creation-container {
    width: 100%;
    max-width: 800px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow);
}

.post-form {
    margin-top: 20px;
}

textarea {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    width: 100%;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.2);
}

.image-upload-container {
    margin: 20px 0;
    border: 2px dashed var(--input-border);
    border-radius: 8px;
    padding: 20px;
    background-color: rgba(122, 162, 247, 0.05);
}

.image-upload-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

#selected-image-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.upload-image-btn {
    width: auto;
    margin: 0;
    padding: 8px 16px;
    display: inline-block;
}

#image-preview-container {
    margin-top: 20px;
    text-align: center;
    position: relative;
}

#image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow);
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.remove-image-btn:hover {
    background-color: rgba(231, 76, 60, 1);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-visibility {
    margin-bottom: 15px;
}

.post-visibility label:first-child {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    margin-top: 0;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    width: auto;
    padding: 10px 25px;
}

/* Responsive adjustments for new post page */
@media (max-width: 768px) {
    .content-container {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
        padding: 20px;
    }

    .post-creation-container {
        padding: 20px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 15px;
    }

    .post-creation-container {
        padding: 15px;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* Search Page Styles */
.search-page-container {
    padding: 20px;
}

.search-content {
    width: 100%;
    max-width: 900px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow);
    margin: 0 auto;
}

.search-header {
    margin-bottom: 25px;
}

.search-header h1 {
    margin-bottom: 20px;
}

.search-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    width: 100%;
    position: relative;
}

.search-input-group input {
    padding-right: 50px;
    font-size: 1.1rem;
    border-radius: 8px;
    height: 50px;
    background-color: var(--input-bg);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: rgba(122, 162, 247, 0.1);
}

.search-icon {
    width: 24px;
    height: 24px;
    filter: invert(65%) sepia(31%) saturate(5498%) hue-rotate(205deg) brightness(101%) contrast(101%);
}

.search-tabs {
    display: flex;
    border-bottom: 2px solid rgba(122, 162, 247, 0.2);
    margin-bottom: 25px;
}

.search-tab {
    padding: 10px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-right: 10px;
    transition: all 0.2s;
}

.search-tab:hover {
    color: var(--accent-primary);
}

.search-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.search-results {
    margin-top: 20px;
}

.search-results h2 {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    text-align: center;
}

.search-empty-icon {
    width: 60px;
    height: 60px;
    filter: invert(65%) sepia(31%) saturate(5498%) hue-rotate(205deg) brightness(101%) contrast(101%);
    margin-bottom: 20px;
    opacity: 0.7;
}

.search-empty-state h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.search-empty-state p {
    color: var(--text-primary);
    max-width: 400px;
}

/* User result card */
.user-result-card {
    display: flex;
    align-items: center;
    background-color: rgba(122, 162, 247, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.user-result-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Add styles for the image inside the avatar container */
.user-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Prevents image warping */
}

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

.user-result-name-link {
    text-decoration: none;
}

/* Make the whole card clickable */
.user-result-card-link {
    display: flex;
    /* Use flex to maintain layout */
    align-items: center;
    text-decoration: none;
    /* Remove underline from link */
    color: inherit;
    /* Inherit text color */
    width: 100%;
    /* Ensure link takes full width of the card content area */
}

.user-result-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 3px;
    transition: color 0.2s ease;
}

.user-result-card:hover .user-result-name {
    color: var(--accent-primary);
}

.user-result-username {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.user-result-card .btn-secondary {
    margin: 0;
    padding: 8px 15px;
    height: fit-content;
}

/* Post result card */
.post-result-card {
    background-color: rgba(122, 162, 247, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.post-result-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

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

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

.post-result-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.post-result-username {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.post-result-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.post-result-content {
    margin-bottom: 15px;
}

.post-result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.post-result-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

.post-result-footer {
    display: flex;
    justify-content: flex-end;
}

.post-result-footer .btn-secondary {
    margin: 0;
    padding: 6px 12px;
}

.search-placeholder {
    background-color: rgba(122, 162, 247, 0.05);
    border: 1px dashed var(--accent-primary);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.search-placeholder p {
    margin: 5px 0;
    text-align: center;
}

/* Responsive adjustments for search page */
@media (max-width: 768px) {
    .search-page-container {
        padding: 15px;
    }

    .search-content {
        padding: 20px;
    }

    .post-result-header {
        flex-wrap: wrap;
    }

    .post-result-date {
        width: 100%;
        margin-left: 50px;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .search-content {
        padding: 15px;
    }

    .user-result-card {
        flex-direction: column;
        text-align: center;
    }

    .user-result-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .user-result-card .btn-secondary {
        margin-top: 10px;
        width: 100%;
    }

    .post-result-footer {
        justify-content: center;
    }

    .post-result-footer .btn-secondary {
        width: 100%;
    }
}

/* Messages Page Styles */
.messages-container {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Conversations List Styles */
.conversations-list {
    width: 350px;
    height: 100%;
    border-right: 1px solid rgba(122, 162, 247, 0.2);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
}

.conversations-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(122, 162, 247, 0.2);
}

.conversations-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(122, 162, 247, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: var(--accent-primary);
}

.icon-new-message,
.icon-info,
.send-icon {
    width: 20px;
    height: 20px;
    filter: invert(70%) sepia(50%) saturate(5000%) hue-rotate(200deg) brightness(100%) contrast(100%);
}

.btn-icon:hover .icon-new-message,
.btn-icon:hover .icon-info {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.search-messages {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(122, 162, 247, 0.1);
}

.search-messages-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.conversation-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.conversation-item:hover {
    background-color: rgba(122, 162, 247, 0.05);
}

.conversation-item.active {
    background-color: rgba(122, 162, 247, 0.1);
    border-left: 3px solid var(--accent-primary);
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.conversation-last-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 10px;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.conversation-unread {
    background-color: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-conversations {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    width: 50px;
    height: 50px;
    opacity: 0.5;
    margin-bottom: 15px;
    filter: invert(70%) sepia(50%) saturate(5000%) hue-rotate(200deg) brightness(100%) contrast(100%);
}

/* Message Content Styles */
.message-content {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
}

.message-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(122, 162, 247, 0.1);
    background-color: var(--bg-secondary);
}

.message-user-info {
    display: flex;
    align-items: center;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.messages-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.message-date-divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
    text-align: center;
    position: relative;
}

.message-date-divider::before,
.message-date-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(122, 162, 247, 0.1);
}

.message-date-divider span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0 10px;
}

.message {
    display: flex;
    margin-bottom: 15px;
    max-width: 70%;
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

.message-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
}

.message.sent .message-bubble {
    background-color: var(--accent-primary);
    border-bottom-right-radius: 4px;
    color: white;
}

.message.received .message-bubble {
    background-color: var(--bg-secondary);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.message-bubble p {
    margin: 0;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 5px;
    display: block;
    text-align: right;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.9);
}

.message.received .message-time {
    color: var(--text-secondary);
}

.message-input-container {
    padding: 15px;
    background-color: var(--bg-secondary);
    border-top: 1px solid rgba(122, 162, 247, 0.1);
}

.message-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-input {
    flex: 1;
    resize: none;
    max-height: 120px;
    padding: 12px 15px;
    border-radius: 20px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    overflow-y: auto;
    line-height: 1.4;
}

.send-message-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background-color: var(--accent-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-message-btn:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.send-icon {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.no-conversation-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
}

.no-conversation-selected h3 {
    color: var(--accent-primary);
    margin: 15px 0 10px;
    font-size: 1.3rem;
}

.no-conversation-selected p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 300px;
}

/* New Message Popup Styles */
.recipient-suggestions {
    background-color: var(--bg-primary);
    border: 1px solid var(--input-border);
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    display: none;
}

.recipient-suggestions.active {
    display: block;
}

.recipient-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recipient-item:hover {
    background-color: rgba(122, 162, 247, 0.1);
}

.recipient-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.recipient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipient-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Media queries for mobile responsiveness */
@media (max-width: 768px) {
    .messages-container {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }

    .conversations-list {
        width: 280px;
    }

    .message {
        max-width: 85%;
    }
}

@media (max-width: 640px) {
    .messages-container {
        flex-direction: column;
    }

    .conversations-list {
        width: 100%;
        height: auto;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid rgba(122, 162, 247, 0.2);
    }

    .conversation-item {
        padding: 10px;
    }

    .conversation-avatar {
        width: 40px;
        height: 40px;
    }

    .message-content {
        height: 60vh;
    }
}

@media (max-width: 480px) {
    .conversations-header {
        padding: 15px;
    }

    .conversations-header h2 {
        font-size: 1.1rem;
    }

    .message {
        max-width: 90%;
    }

    .message-bubble {
        padding: 10px;
    }

    .message-input-container {
        padding: 10px;
    }

    .message-input {
        padding: 10px;
    }

    .send-message-btn {
        width: 40px;
        height: 40px;
    }
}

/* Post Card Styles - Common to both home feed and profile */
.post-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

.post-card .interaction-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.post-card .interaction-btn:hover {
    background-color: rgba(122, 162, 247, 0.1);
    color: var(--accent-primary);
}

.post-card .interaction-icon {
    width: 16px;
    height: 16px;
    filter: invert(70%) sepia(31%) saturate(5498%) hue-rotate(205deg) brightness(101%) contrast(101%);
}

/* Post image styling for consistency between home and profile */
.post-card .post-image img,
.post-card img.post-image {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

/* Home feed specific styles - update avatar size */
.home-feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* Image Lightbox Modal */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: zoom-out;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
    transform-origin: center center;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 2001;
}

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

/* Make post images clickable */
.post-image img,
.post-card .post-image img {
    cursor: pointer;
    transition: filter 0.3s ease;
}

.post-image img:hover,
.post-card .post-image img:hover {
    filter: brightness(1.05);
}

/* Single Post Page Styles */
.single-post-container {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.4s ease;
}

.single-post-container .error-container {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow);
}

.single-post-container .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.single-post-container .error-title {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.single-post-container .error-message {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.single-post-container .error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Full Post Styling */
.full-post {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.full-post .post-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(122, 162, 247, 0.1);
    padding-bottom: 1rem;
}

.full-post .post-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.full-post .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.full-post .post-author {
    display: flex;
    align-items: center;
}

.full-post .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid var(--accent-primary);
}

.full-post .author-name {
    color: var(--accent-primary);
    font-weight: 500;
}

.full-post .post-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.full-post .post-content {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.full-post .post-image-container {
    margin: 1.5rem 0;
    text-align: center;
}

.full-post .post-image {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: 8px;
    object-fit: contain;
    cursor: pointer;
    box-shadow: 0 3px 10px var(--shadow);
    transition: transform 0.3s ease;
}

.full-post .post-image:hover {
    transform: scale(1.01);
}

.full-post .post-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(122, 162, 247, 0.1);
}

.full-post .post-footer {
    border-top: 1px solid rgba(122, 162, 247, 0.1);
    padding-top: 1rem;
}

.full-post .post-interactions {
    display: flex;
    justify-content: space-around;
}

/* Responsive adjustments for individual post */
@media (max-width: 768px) {
    .single-post-container {
        padding: 1rem;
    }

    .full-post {
        padding: 1rem;
    }

    .full-post .post-title {
        font-size: 1.5rem;
    }

    .full-post .post-content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .full-post .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

    .full-post .post-interactions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .full-post .interaction-btn {
        flex: 1;
    }
}

/* Post Like System Styles */
.like-btn.liked {
    color: #f87171;
}

.like-btn.liked img {
    filter: none;
}

.like-btn.liked .interaction-icon {
    filter: invert(59%) sepia(91%) saturate(2221%) hue-rotate(323deg) brightness(100%) contrast(97%);
}

.like-count-wrapper {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.like-count-wrapper img {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    filter: invert(59%) sepia(91%) saturate(2221%) hue-rotate(323deg) brightness(100%) contrast(97%);
}

.like-btn:focus {
    outline: none;
}

.like-animation {
    animation: likeAnimation 0.5s ease;
}

@keyframes likeAnimation {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Comment System Styles */
.comments-container {
    margin-top: 2rem;
    border-top: 1px solid rgba(var(--accent-primary-rgb), 0.3);
    padding-top: 1rem;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-title img {
    width: 20px;
    height: 20px;
}

.comments-toggle {
    font-size: 0.9rem;
    color: var(--accent-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.comments-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.no-comments {
    color: var(--text-secondary);
    font-style: italic;
    margin: 1rem 0;
}

.comment {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

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

.comment-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.comment-username {
    color: var(--accent-primary);
    font-weight: 500;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-form-wrapper {
    margin-top: 1rem;
}

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

.comment-form .input-group {
    width: 100%;
    margin-bottom: 0;
}

.comment-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
}

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

.comment-submit {
    align-self: flex-end;
    padding: 0.5rem 1rem;
}

.comment-count-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    color: var(--text-secondary);
}

.comment-count-wrapper img {
    width: 18px;
    height: 18px;
}

.comments-loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
}

.comments-error {
    color: #e06c75;
    padding: 1rem;
    text-align: center;
    background-color: rgba(224, 108, 117, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Password Strength Indicator */
.password-strength-meter {
    height: 5px;
    width: 100%;
    background-color: #e0e0e0;
    margin-top: 5px;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.password-strength-meter .strength-meter {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.password-strength-text {
    font-size: 0.8rem;
    margin-top: 5px;
    font-weight: 500;
}

/* Strength levels */
.strength-weak .strength-meter {
    width: 33.3%;
    background-color: #e74c3c;
}

.strength-medium .strength-meter {
    width: 66.6%;
    background-color: #f39c12;
}

.strength-strong .strength-meter {
    width: 100%;
    background-color: #2ecc71;
}

.strength-weak .password-strength-text {
    color: #e74c3c;
}

.strength-medium .password-strength-text {
    color: #f39c12;
}

.strength-strong .password-strength-text {
    color: #2ecc71;
}

/* Location Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

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

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--accent-primary);
}

.location-search-form {
    margin-bottom: 15px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input-group input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
}

.location-map {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--input-border);
}

/* Post Location Display */
.post-location {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
    padding: 10px 15px;
    background-color: var(--bg-hover);
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
}

.post-location .location-icon {
    width: 18px;
    height: 18px;
    opacity: 0.9;
    filter: invert(59%) sepia(91%) saturate(2221%) hue-rotate(323deg) brightness(100%) contrast(97%);
}

.post-location .location-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.post-location .location-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.post-location .location-name {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.2;
}

.post-location .view-map-btn {
    color: var(--accent-primary);
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.post-location .view-map-btn:hover {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }

    .location-map {
        height: 300px;
    }

    .post-location {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .post-location .view-map-btn {
        width: 100%;
        text-align: center;
        background-color: rgba(var(--accent-primary-rgb), 0.1);
        padding: 8px;
    }
}





/* Admin Panel CSS Styles */

.admin-content-container {
    max-width: 1200px;
}

.admin-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(var(--accent-primary-rgb), 0.2);
    padding-bottom: 1rem;
}

.admin-header h1 {
    text-align: left;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Admin tabs navigation */
.admin-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.2);
    overflow-x: auto;
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--accent-primary);
    background-color: rgba(var(--accent-primary-rgb), 0.05);
}

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

/* Admin section styling */
.admin-section {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.admin-section h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.2);
    padding-bottom: 0.75rem;
}

/* Admin table styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    overflow: hidden;
}

.admin-table thead {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(var(--accent-primary-rgb), 0.2);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.1);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: rgba(var(--accent-primary-rgb), 0.05);
}

/* Admin buttons styling */
.admin-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin-right: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.view-btn {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--accent-primary);
}

.view-btn:hover {
    background-color: var(--accent-primary);
    color: white;
}

.delete-btn {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.delete-btn:hover {
    background-color: #e74c3c;
    color: white;
}

/* Profile picture thumbnail */
.admin-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

/* Forms inside table cells */
.inline-form {
    display: inline-block;
}

/* Responsive styles */
@media (max-width: 768px) {
    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .admin-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .admin-tab {
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 1.5rem;
    }

    .admin-section {
        padding: 1rem;
    }

    .admin-table td,
    .admin-table th {
        padding: 0.5rem;
    }

    .admin-btn {
        margin-bottom: 0.3rem;
        font-size: 0.8rem;
    }
}