/* Add box-sizing to all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #fff;
    overflow-x: hidden;
}
.container {
    display: flex;
    height: 100vh;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    transition: grid-template-columns 0.3s, width 0.3s;
    position: relative;
    overflow: hidden;
}
.sidebar {
    background: #fff;
    border-right: 1px solid #e0e0e0;
    width: 20vw;
    min-width: 180px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 0;
    transition: transform 0.3s ease;
    z-index: 100;
}

.logo-container {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.logo {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .logo {
        max-width: 20%;
        height: auto;
    }
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.nav-btn {
    width: 100%;
    padding: 16px;
    border: none;
    background: none;
    font-size: 1.1em;
    text-align: left;
    cursor: pointer;
    color: #222;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-btn {
        padding: 0 5px;
        font-size: 0.8em;
        text-align: center;
        white-space: nowrap;
        height: 48px;
    }
    
    .nav-btn i {
        margin-right: 5px;
    }
}
.nav-btn i {
    margin-right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-btn.active, .nav-btn:hover {
    background: #fff8e0;
    color: #F0B90B;
}

.main-content {
    flex: 4;
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: auto;
    transition: flex 0.3s;
}

.card-list {
    display: flex;
    flex-wrap: wrap;
    /* gap: 24px; */
    width: 100%;
    justify-content: space-between;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    width: calc((100% - 48px) / 3); /* 3 cards per row with 24px gap between them */
    /* height: 450px; */
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.2s, width 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.card:active {
    transform: scale(0.98);
}
.card img, .card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}
.card-content p {
    color: #536471;
    margin: 0;
    line-height: 1.4;
}
.card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    color: #536471;
    font-size: 14px;
}
.card-stats {
    display: flex;
    gap: 16px;
}
.stat {
    display: flex;
    align-items: center;
    gap: 4px;
}
.details-panel {
    background: #fff;
    border-left: 1px solid #e0e0e0;
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.details-panel.open {
    width: 40vw;
    min-width: 320px;
    max-width: 600px;
    overflow-y: auto;
    display: flex;
}
.details-content {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.details-content .post-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.details-content .post-title {
    flex: 1;
    font-size: 1.5em;
    margin: 0;
    display: flex;
    align-items: center;
}
.close-details-icon {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 1.5em;
    color: #888;
    transition: color 0.2s;
}
.close-details-icon:hover {
    color: #F0B90B;
}

/* Mobile-specific styles for the close-details-icon button */
@media (max-width: 768px) {
    .close-details-icon {
        width: 40px;
        height: 40px;
        margin-left: 5px;
        position: relative;
        right: -30px;
        background-color: rgba(245, 245, 245, 0.9);
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    
    /* Fix SVG display */
    .close-details-icon svg {
        width: 24px;
        height: 24px;
        display: block; /* Ensure svg is displayed as block */
        position: relative; /* Positioning context for the lines */
    }
    
    .close-details-icon svg line {
        stroke: #333;
        stroke-width: 2.5;
    }
    
    /* Alternative close icon using CSS instead of SVG */
    .close-details-icon::before,
    .close-details-icon::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2.5px;
        background-color: #333;
        border-radius: 1px;
        top: 50%;
        left: 50%;
    }
    
    .close-details-icon::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }
    
    .close-details-icon::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }
    
    /* Hide SVG when using CSS alternative */
    .close-details-icon svg {
        display: none;
    }
    
    /* Make post header position relative to ensure button is contained */
    .post-header {
        position: relative;
        padding-right: 40px;
    }
}
.details-content img, .details-content video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
}
.comments-section {
    margin-top: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.comments-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    flex: 1;
    overflow-y: auto;
}
.comments-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.comment-form {
    display: flex;
    gap: 8px;
}
.comment-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.comment-form button {
    padding: 8px 16px;
    background: #FCD535;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
/* Layout change when details panel is open */
.container.details-open .main-content {
    flex: 2;
}

.container.details-open .card-list {
    gap: 24px;
    justify-content: space-between;
}

/* Adjust card width when details panel is open */
.container.details-open .card {
    width: calc((100% - 24px) / 2); /* 2 cards per row with 24px gap between them */
}

/* Media query for smaller screens */
@media (max-width: 1200px) {
    .container.details-open .card {
        width: 100%; /* 1 card per row on smaller screens when details panel is open */
    }
    
    .details-panel.open {
        width: 60vw;
    }
}

@media (max-width: 900px) {
    .card {
        width: calc((100% - 24px) / 2); /* 2 cards per row on medium screens */
    }
    
    .main-content {
        padding: 20px;
    }
    
    .details-panel.open {
        width: 80vw;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-width: 100%;
        height: 48px;
        min-height: 48px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        overflow-x: hidden;
        display: flex;
    }
    
    .sidebar .logo-container, 
    .sidebar ul {
        display: flex;
        align-items: center;
        margin: 0 5px;
        padding: 0;
    }
    
    .sidebar .wallet-section {
        display: flex;
        align-items: center;
        margin: 0 5px;
        flex: 0 0 auto;
    }
    
    .sidebar .logo-container {
        flex: 0 0 auto;
    }
    

    
    .sidebar ul li {
        display: inline-block;
    }
    
    .sidebar.menu-open ul {
        display: flex;
    }
    
    .sidebar .wallet-section {
        flex: 0 0 auto;
        border-top: none;
        padding: 0;
        display: flex !important;
        position: absolute;
        right: 10px;
        top: 0;
        height: 48px;
        align-items: center;
    }
    
    .sidebar ul {
        display: none;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 0;
        z-index: 200;
    }
    
    .sidebar.menu-open ul {
        display: flex !important;
    }
    
    .sidebar.menu-open ul li {
        display: block;
        width: 100%;
    }
    
    .sidebar.menu-open .nav-btn {
        width: 100%;
        padding: 12px 16px;
        text-align: left;
        font-size: 1em;
        height: auto;
    }
    
    .main-content {
        margin-top: 48px;
        padding: 16px;
    }
    
    /* Simplify wallet UI in mobile view */
    .wallet-user-info {
        justify-content: center;
        display: flex;
        align-items: center;
        margin: 0 auto;
    }
    
    .wallet-connected .wallet-address {
        display: none;
    }
    
    .wallet-disconnect-btn {
        padding: 4px;
        background: transparent;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }
    
    .wallet-disconnect-btn i {
        font-size: 16px;
    }
    
    .wallet-disconnect-btn span {
        display: none;
    }
    
    .details-panel.open {
        width: 100vw;
        max-width: none;
    }
    
    .container.details-open .main-content {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        background: none;
        border: none;
        font-size: 22px;
        color: #333;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        height: 48px;
        width: 48px;
        margin-right: 5px;
        z-index: 101;
        position: relative;
    }
    
    .logo-container {
    border: none;
    padding: 10px 5px;
    flex-shrink: 0;
}
}

@media (max-width: 600px) {
    .card {
        width: 100%; /* 1 card per row on very small screens */
    }
    
    .main-content {
        padding: 12px;
    }
    
    .post-composer {
        flex-direction: column;
        padding: 12px;
    }
    
    .post-avatar {
        align-self: flex-start;
        margin-bottom: 10px;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-media-actions {
        width: 100%;
        justify-content: space-around;
    }
    
    .post-submit-btn {
        width: 100%;
    }
    
    .details-content {
        padding: 16px;
    }
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

.sidebar.menu-open + .mobile-overlay {
    display: block !important;
    top: 48px;
}

.card-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.card-header img{
    width: 40px;
    height: 40px;
}
.user-post-info {
    display: flex;
    flex-direction: column;
    margin-left: 8px;
}

.username {
    font-weight: 600;
    color: #0f1419;
    line-height: 1.2;
}

.post-time {
    font-size: 12px;
    color: #536471;
    margin-top: 2px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #FCD535;
}

.post-header {
    display: flex;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.post-header .avatar {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-info .post-time {
    font-size: 12px;
    color: #536471;
    margin-top: 2px;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin: 16px 0;
}

.post-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #536471;
}

.post-stats .stat i {
    font-size: 18px;
}

/* Like button styles */
.like-button, .like-button-detail {
    cursor: pointer;
    transition: transform 0.2s;
}

.like-button:hover, .like-button-detail:hover {
    transform: scale(1.1);
}

.fa-heart.liked {
    color: #ff3b30;
}

/* Comment styles */
.comment-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.comment-header img , .reply-header img{
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 20px;
}
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #FCD535;
}

.comment-user-info {
    display: flex;
    flex-direction: column;
}

.comment-username {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.comment-time {
    font-size: 12px;
    color: #536471;
}

.comment-content {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    word-break: break-word;
    margin-bottom: 4px;
}

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

.reply-button {
    background: none;
    border: none;
    color: #536471;
    font-size: 12px;
    padding: 2px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 4px;
}

.reply-button:hover {
    background-color: rgba(29, 161, 242, 0.1);
    color: #F0B90B;
}

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

.reply-form input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
}

.reply-form button {
    padding: 6px 12px;
    background: #FCD535;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.comment-replies {
    margin-left: 30px;
    border-left: 2px solid #eee;
    padding-left: 8px;
}

.reply-item {
    margin-top: 8px;
    padding-top: 8px;
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #FCD535;
}

.no-comments, .loading-comments, .error-message {
    color: #536471;
    font-style: italic;
    text-align: center;
    padding: 16px 0;
}

/* Post composer styles */
.post-composer {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    padding: 16px;
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    gap: 12px;
    box-sizing: border-box;
}

.post-avatar {
    flex-shrink: 0;
}

.post-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-input {
    min-height: 60px;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    outline: none;
}

.post-input:empty:before {
    content: attr(placeholder);
    color: #888;
    pointer-events: none;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
}

.post-media-actions {
    display: flex;
    gap: 16px;
}

.media-btn {
    background: none;
    border: none;
    color: #000000;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.media-btn:hover {
    background-color: rgba(29, 161, 242, 0.1);
}

.post-submit-btn {
    background: #FCD535;
    color: #333;
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-submit-btn:hover {
    background: #F0B90B;
}

.post-submit-btn:disabled {
    background: #f8d980;
    cursor: wait;
    position: relative;
}

.post-submit-btn:disabled::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top: 2px solid #fff;
    border-radius: 50%;
    right: 8px;
    top: 50%;
    margin-top: -6px;
    animation: spin 1s linear infinite;
}

/* Media preview styles */
.media-preview {
    position: relative;
    margin: 8px 0;
    max-width: 300px;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.remove-media-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

/* Cards container styles */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

/* Wallet section styles */
.wallet-section {
    margin-top: auto;
    padding: 16px;
    /* border-top: 1px solid #e0e0e0; */
}

@media (max-width: 768px) {
    .wallet-section {
        margin-top: 0;
        padding: 0;
        border-top: none;
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 10px;
        top: 0;
        height: 48px;
        z-index: 101;
        width: auto;
    }
    
    .wallet-connect-btn {
        padding: 4px 8px;
        font-size: 0.8em;
        white-space: nowrap;
        height: 35px;
    }
    
    .wallet-connect-btn {
        padding: 5px 8px;
        font-size: 0.85em;
    }
}

.wallet-connect-btn {
    width: 100%;
    padding: 10px;
    background: #FCD535;
    border: none;
    border-radius: 4px;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.wallet-connect-btn:hover {
    background: #F0B90B;
}

.wallet-connected {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.wallet-user-info {
    display: flex;
    align-items: center;
    /* gap: 8px; */
}

.wallet-avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-avatar .avatar {
    width: 28px;
    height: 28px;
    border: 1px solid #FCD535;
    margin: 0;
}

.wallet-address {
    font-size: 0.9em;
    color: #333;
    font-weight: bold;
}

.wallet-disconnect-btn {
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    margin-left: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.wallet-disconnect-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Loading spinner styles */
.media-preview.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    padding: 16px;
    min-height: 120px;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FCD535;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

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

/* Compression progress styles */
.compression-progress {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
}

.compression-progress-bar {
    height: 8px;
    background-color: #FCD535;
    width: 0%;
    transition: width 0.3s ease;
}

.compression-info {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 4px;
}

/* Status messages */
.status-message {
    padding: 8px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.status-success {
    background-color: #e6f7e6;
    color: #2e7d32;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-error {
    background-color: #ffebee;
    color: #c62828;
}

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

/* Add styles for new chat features */

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 10px;
    color: #888;
    font-style: italic;
    font-size: 14px;
}

/* No more messages indicator */
.no-more-messages {
    text-align: center;
    padding: 8px;
    color: #888;
    font-style: italic;
    font-size: 13px;
    background-color: #f5f5f5;
    border-radius: 12px;
    margin: 5px auto;
    width: fit-content;
}

/* New message notification */
.new-message-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FCD535;
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    font-weight: 500;
    z-index: 100;
    animation: bounce 1s infinite alternate;
    transition: all 0.3s ease;
}

.new-message-notification:hover {
    background-color: #f8c000;
    transform: translateX(-50%) scale(1.05);
}

@keyframes bounce {
    from {
        transform: translateX(-50%) translateY(0);
    }
    to {
        transform: translateX(-50%) translateY(-5px);
    }
} 

/* Message sending and error states */
.message-sending {
    opacity: 0.8;
}

.message-sending .message-content {
    position: relative;
}

.message-status {
    font-size: 11px;
    color: #888;
    margin-left: 8px;
    font-style: italic;
}

.message-error {
    opacity: 0.7;
}

.message-error .message-content {
    border: 1px solid #ffcdd2 !important;
    background-color: #ffebee !important;
}

.message-error .message-status {
    color: #e53935;
} 

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    margin-right: 5px;
    z-index: 101;
    position: relative;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Make sure mobile overlay is visible when menu is open */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 90;
    }
    
    .sidebar.menu-open + .mobile-overlay {
        display: block !important;
        top: 48px;
    }
    
    /* Make sure the sidebar menu is visible when open */
    .sidebar ul {
        display: none;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 0;
        z-index: 200;
    }
    
    .sidebar.menu-open ul {
        display: flex !important;
    }
}

/* Modal overlay for mobile */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: block;
}

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

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #FCD535;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .sidebar,
body.dark-mode .main-content,
body.dark-mode .card,
body.dark-mode .post-composer,
body.dark-mode .details-panel {
    background-color: #1e1e1e;
    border-color: #333;
}

body.dark-mode .card-content h3,
body.dark-mode .username {
    color: #e0e0e0;
}

body.dark-mode .card-content p,
body.dark-mode .post-time,
body.dark-mode .stat {
    color: #aaa;
}

body.dark-mode .card-footer,
body.dark-mode .post-header,
body.dark-mode .post-stats {
    border-color: #333;
}

body.dark-mode .post-input {
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .post-input:empty:before {
    color: #777;
}

body.dark-mode .media-btn {
    color: #e0e0e0;
}

body.dark-mode .post-submit-btn {
    background-color: #F0B90B;
    color: #000;
}

body.dark-mode .mobile-overlay {
    background-color: rgba(0,0,0,0.7);
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
} 

/* Post Type Filter Styles */
.post-type-filter {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    margin-right: 16px;
    color: #333;
}

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

.filter-chip {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.filter-chip:hover {
    background: #e8e8e8;
}

.filter-chip.active {
    background: #F0B90B;
    color: #fff;
    border-color: #F0B90B;
}

/* Create Post Button (Collapsed State) */
.create-post-button {
    background: #F0B90B;
    color: white;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.create-post-button i {
    margin-right: 8px;
}

.create-post-button:hover {
    background: #e0aa0a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Post Composer Header */
.post-composer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.post-composer-header h3 {
    margin: 0;
    color: #333;
}

.close-composer-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #777;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-composer-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Post Type Selector */
.post-type-selector {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    gap: 8px;
}

.post-type-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.post-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.post-type-button {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.post-type-button:hover {
    background: #e8e8e8;
}

.post-type-button.active {
    background: #F0B90B;
    color: #fff;
    border-color: #F0B90B;
}

.post-type-add-btn {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-type-add-btn:hover {
    background: #e8e8e8;
}

.post-type-add-btn i {
    font-size: 12px;
}

/* Responsive Adjustments for Post Type Buttons */
@media (max-width: 768px) {
    .post-type-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .post-type-button,
    .post-type-add-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #777;
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cancel-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.save-btn {
    background: #F0B90B;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #e0aa0a;
}

/* Card Type Badge */
.card-type-badge {
    display: inline-block;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .post-type-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-label {
        margin-bottom: 8px;
    }
    
    .filter-chips {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }
    
    .post-type-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-new-type-btn {
        align-self: flex-end;
    }
} 

/* WalletConnect Related Styles */
.walletconnect-wrapper {
    z-index: 1100 !important; /* Ensure modal appears above other elements */
}

.walletconnect-modal__base {
    max-width: 400px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
}

.walletconnect-modal__header {
    padding: 20px !important;
}

.walletconnect-modal__header p {
    color: #333 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

.walletconnect-modal__close__wrapper {
    top: 18px !important;
    right: 18px !important;
}

.walletconnect-modal__mobile__toggle {
    cursor: pointer !important;
}

.walletconnect-modal__mobile__toggle a {
    color: #F0B90B !important;
}

.walletconnect-modal__mobile__toggle a.walletconnect-modal__mobile__toggle_selector {
    color: #333 !important;
    background: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
}

.walletconnect-connect__buttons__wrapper {
    max-height: 50vh !important;
}

/* Make wallet icons look better */
.walletconnect-connect__button__icon_container {
    background: white !important;
    border-radius: 8px !important;
    padding: 8px !important;
    border: 1px solid #eee !important;
}

/* Fix for mobile wallet list */
.walletconnect-connect__buttons__wrapper__android, 
.walletconnect-connect__buttons__wrapper__ios {
    margin: 0 -15px !important;
    padding: 10px 15px !important;
}

.walletconnect-connect__buttons__wrapper__android {
    background: #f9f9f9 !important;
}

/* Button hover state */
.walletconnect-connect__button:hover {
    background: #f5f5f5 !important;
}

/* Custom styles for our wallet connect button */
.wallet-connect-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wallet-connect-btn:active {
    transform: scale(0.97);
}

/* Ripple effect for better mobile feedback */
.wallet-connect-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    opacity: 0;
}

.wallet-connect-btn:active::after {
    animation: ripple 0.6s;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
} 

/* Mobile responsive styling for wallet section */
@media screen and (max-width: 768px) {
  .promo-text, .wallet-btn-text {
    display: none;
  }
  
  /* Adjust padding and alignment for icon-only display */
  .promo-module {
    padding: 5px !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    display: inline-block !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
  }
  
  .promo-module img {
    margin-right: 0 !important;
  }
  
  .wallet-connect-btn {
    padding: 8px 12px !important;
    text-align: center !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }
  
  .wallet-not-connected {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }
} 

/* Mobile fixed elements */
@media screen and (max-width: 768px) {
  /* Fixed container for the three elements */
  .main-content {
    padding-top: 135px; /* Increased space for fixed elements */
  }
  
  /* Fixed create post button */
  .create-post-button {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    width: 94%;
    margin: 0 auto;
    z-index: 90;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  
  /* Card container needs margin to create space */
  .cards-container, 
  #card-container {
    margin-top: 20px; /* Add more space for better visual separation */
  }
  
  /* Rest of the CSS remains the same */
  .post-composer {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    width: 94%;
    margin: 0 auto;
    z-index: 91; 
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
  }
  
  /* Fixed post type filter */
  .post-type-filter {
    position: fixed;
    top: 110px;
    left: 0;
    right: 0;
    width: 94%;
    margin: 0 auto 16px auto;
    z-index: 89;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  
  /* Adjust filter chips to scroll horizontally */
  .filter-chips {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    margin-bottom: -5px; /* Compensate for the padding */
    max-width: 100%;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
  }
  
  .filter-chips::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
  }
  
  /* Ensure dark mode compatibility */
  body.dark-mode .post-type-filter {
    background: #1e1e1e;
  }
  
  /* Add a subtle indicator for horizontal scrolling */
  .filter-chips::after {
    content: '';
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.7));
    pointer-events: none;
  }
  
  body.dark-mode .filter-chips::after {
    background: linear-gradient(to right, transparent, rgba(30,30,30,0.7));
  }
} 

/* Mobile wallet display enhancements */
@media screen and (max-width: 768px) {
  /* Ensure proper display when wallet is connected */
  .wallet-not-connected {
    display: none !important;
  }
  
  .wallet-connected {
    display: block !important;
  }
  
  /* Override display based on wallet connection status */
  .has-wallet .wallet-not-connected {
    display: none !important;
  }
  
  .has-wallet .wallet-connected {
    display: flex !important;
  }
  
  .no-wallet .wallet-not-connected {
    display: flex !important;
  }
  
  .no-wallet .wallet-connected {
    display: none !important;
  }
  
  /* Additional wallet state classes */
  .wallet-connected-state .wallet-not-connected {
    display: none !important;
  }
  
  .wallet-connected-state .wallet-connected {
    display: flex !important;
  }
  
  .wallet-disconnected-state .wallet-not-connected {
    display: flex !important;
  }
  
  .wallet-disconnected-state .wallet-connected {
    display: none !important;
  }
} /*
 Tip functionality styles */
.tip-button-detail, .tip-button {
  cursor: pointer;
  transition: color 0.2s;
}

.tip-button-detail:hover, .tip-button:hover {
  color: #F0B90B;
}

.tip-button i, .tip-button-detail i {
  color: #F0B90B;
}

.tip-dropdown {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 150px;
}

.tip-options {
  display: flex;
  flex-direction: column;
}

.tip-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tip-option:hover {
  background-color: #f5f5f5;
}

.tip-option.custom-tip {
  padding: 8px 16px;
  border-top: 1px solid #e0e0e0;
}

.custom-amount-input {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  width: 80px;
  font-size: 14px;
  margin-right: 8px;
}

.custom-amount-input:focus {
  outline: none;
  border-color: #F0B90B;
}

/* Show tip button always in details view */
.tip-button-detail {
  display: flex !important;
}

/* Show tip button always in card view */
.card .tip-button {
  display: flex;
}

/* Tip notification styles */
.tip-notification {
  font-family: Arial, sans-serif;
}

.tip-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-notification i {
  font-size: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tip-dropdown {
    position: fixed !important;
    bottom: 20px;
    left: 20px;
    right: 20px;
    top: auto !important;
    min-width: auto;
  }
  
  .tip-option {
    padding: 16px;
    font-size: 16px;
  }
  
  .custom-amount-input {
    width: 100px;
    padding: 8px;
    font-size: 16px;
  }
}

.tip-dropdown {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 150px;
}

.tip-options {
  display: flex;
  flex-direction: column;
}

.tip-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tip-option:hover {
  background-color: #f5f5f5;
}

.tip-option.custom-tip {
  padding: 8px 16px;
  border-top: 1px solid #e0e0e0;
}

.custom-amount-input {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  width: 80px;
  font-size: 14px;
  margin-right: 8px;
}

.custom-amount-input:focus {
  outline: none;
  border-color: #F0B90B;
}

/* Tip notification styles */
.tip-notification {
  font-family: Arial, sans-serif;
}

.tip-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-notification i {
  font-size: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tip-dropdown {
    position: fixed !important;
    bottom: 20px;
    left: 20px;
    right: 20px;
    top: auto !important;
    min-width: auto;
  }
  
  .tip-option {
    padding: 16px;
    font-size: 16px;
  }
  
  .custom-amount-input {
    width: 100px;
    padding: 8px;
    font-size: 16px;
  }
}