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

.hidden {
    display: none !important;
}

/* Login Screen */
#loginScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 1000;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #2196F3;
    outline: none;
    background-color: #f8fdff;
}

.input-error {
    border-color: #ff3860 !important;
    background-color: #fff5f5 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary {
    background: #2196F3;
    color: white;
}

/* Google Login Button Styles */
.btn-google {
    background: #ffffff;
    color: #757575;
    border: 1px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-google:active {
    background: #f1f3f4;
    transform: scale(0.98);
}

.btn-google::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2LjUxIDkuMjA0NTVWOS4wOTU0NUg5LjE4VjEwLjc4SDExLjg4QzExLjU0IDEyLjI3IDEwLjIyMTggMTMuMzE1NSA4LjYzIDEzLjMxNTVDNi41MjU5MSAxMy4zMTU1IDQuODA0NTUgMTEuNTk0MSA0LjgwNDU1IDkuNDlDNC44MDQ1NSA3LjM4NTkxIDYuNTI1OTEgNS42NjQ1NSA4LjYzIDUuNjY0NTVDOS42NzQ1NSA1LjY2NDU1IDEwLjYwOSA2LjA1MTgyIDExLjMxMzYgNi43MjU0NUwxMy4yMTM2IDQuODI1NDVDMTEuOTk3MyAzLjczNjM2IDEwLjQwNjQgMy4wOTU0NSA4LjYzIDMuMDk1NDVDNC44MjE4MiAzLjA5NTQ1IDEuNzE0NTUgNi4yMDI3MyAxLjcxNDU1IDkuNDlDMS43MTQ1NSAxMi43NzczIDQuODIxODIgMTUuODg0NSA4LjYzIDE1Ljg4NDVDMTIuNDM4MiAxNS44ODQ1IDE1LjU0NTUgMTIuNzc3MyAxNS41NDU1IDkuNDlDMTUuNTQ1NSA4Ljg4MTgyIDE1LjQ3NzMgOC4yOTU0NSAxNS4zNTA5IDcuNzM2MzZMMTYuNTEgOS4yMDQ1NVoiIGZpbGw9IiM0Mjg1RjQiLz4KPC9zdmc+');
    background-size: contain;
    background-repeat: no-repeat;
}

.btn-demo {
    background: #FF9800;
    color: white;
}

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

.signup-link a {
    color: #2196F3;
    text-decoration: none;
}

.demo-account-info {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    border-left: 4px solid #2196F3;
}

.debug-info {
    margin-top: 1rem;
    padding: 0.5rem;
    background: #f5f5f5;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #666;
}

/* Main App Styles */
#mainApp {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.statusbar {
    height: 20px;
    background: white;
}

/* Elegant Navbar Styles */
.elegant-navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    height: 60px;
}

.elegant-navbar .navbar-inner {
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.logo-icon .f7-icons {
    font-size: 20px;
    color: #667eea;
    font-weight: bold;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Elegant Title */
.elegant-title {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Elegant Menu Button */
.elegant-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.elegant-menu-btn .f7-icons {
    color: white !important;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.elegant-menu-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

/* Hover effects for desktop */
@media (min-width: 768px) {
    .logo-container:hover .logo-icon {
        transform: scale(1.05) rotate(-5deg);
        background: white;
    }
    
    .elegant-menu-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 60px;
}

.toolbar.tabbar {
    background: white;
    border-top: 1px solid #e0e0e0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.tab-link {
    color: #666;
    transition: color 0.3s ease;
}

.tab-link-active {
    color: #2196F3 !important;
}

.tabbar-label {
    font-size: 0.7rem;
    margin-top: 4px;
}

/* Card Styles */
.card {
    margin: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.welcome-card {
    text-align: center;
    padding: 20px;
}

.user-info {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 10px;
}

.create-post-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post-input-container {
    margin-bottom: 15px;
}

.post-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 12px 15px;
    font-size: 0.9rem;
    resize: none;
    height: 60px;
}

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

.post-meta {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.profile-header {
    text-align: center;
    padding: 20px 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2196F3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 2rem;
}

/* Button Styles */
.button {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.button:active {
    transform: scale(0.98);
}

.button-small {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.button-outline {
    background: transparent;
    border: 2px solid;
}

.color-blue {
    color: #2196F3;
    border-color: #2196F3;
}

.color-red {
    background: #f44336;
    color: white;
    border: none;
}

.button-fill.color-blue {
    background: #2196F3;
    color: white;
    border: none;
}

/* List Styles */
.list {
    margin: 10px 0;
}

.list ul {
    background: none;
}

.item-content {
    padding: 15px;
}

.item-title {
    font-weight: bold;
}

.item-after {
    color: #666;
    font-size: 0.8rem;
}

/* Safe area for modern phones */
@supports (padding: max(0px)) {
    .toolbar.tabbar {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
    
    .page-content {
        padding-bottom: max(75px, calc(60px + env(safe-area-inset-bottom)));
    }
    
    .elegant-navbar {
        padding-top: env(safe-area-inset-top);
        height: calc(60px + env(safe-area-inset-top));
    }
    
    .elegant-navbar .navbar-inner {
        padding-top: env(safe-area-inset-top);
    }
}

/* Loading animations */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { color: rgba(0,0,0,0); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    40% { color: white; text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    60% { text-shadow: .25em 0 0 white, .5em 0 0 rgba(0,0,0,0); }
    80%, 100% { text-shadow: .25em 0 0 white, .5em 0 0 white; }
}

/* Network status indicator */
.network-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 10000;
    background: #ff4444;
    color: white;
}

.network-status.connected {
    background: #00C851;
}

/* Enhanced error states */
.input-error {
    border-color: #ff4444 !important;
    background-color: #fff5f5 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Retry button styles */
.retry-btn {
    background: #ff4444 !important;
    margin-top: 10px;
}

.retry-btn:hover {
    background: #cc0000 !important;
}

/* Ensure everything is visible */
.hidden {
    display: none !important;
}

#loadingScreen {
    font-family: Arial, sans-serif;
    text-align: center;
}

#loadingScreen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

/* Make sure main app takes full height */
#mainApp {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    overflow-y: auto;
}

/* Profile Page Styles */
.profile-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 3rem;
}

.user-display-name {
    margin: 10px 0 5px 0;
    font-size: 1.5rem;
}

.user-email {
    opacity: 0.8;
    margin-bottom: 10px;
}

.user-bio {
    opacity: 0.9;
    font-style: italic;
}

.stats-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2196F3;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Feed Page Styles */
.create-post-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2196F3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
}

.post-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.post-author {
    font-weight: bold;
}

.post-time {
    font-size: 0.8rem;
    color: #666;
}

.post-content {
    margin: 10px 0;
}

.post-image {
    width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

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

/* Room/Messages Page Styles */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.demo-message {
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Enhanced Bottom Navigation */
.toolbar.tabbar {
    background: white;
    border-top: 1px solid #e0e0e0;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 80px; /* Increased height */
    padding: 8px 0;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
}

.toolbar-inner {
    display: flex;
    justify-content: space-around; /* Center items with equal space */
    align-items: center;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    flex: 1;
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 0 5px;
    padding: 8px 5px;
}

.tab-link-active {
    color: #2196F3 !important;
    background: rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.tab-icon-wrapper {
    position: relative;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tab-link .f7-icons {
    font-size: 24px; /* Bigger icons */
    transition: all 0.3s ease;
}

.tab-link-active .tab-icon-wrapper {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.tab-link-active .f7-icons {
    color: white !important;
    transform: scale(1.1);
}

.tabbar-label {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.tab-link-active .tabbar-label {
    color: #2196F3;
    font-weight: 700;
}

/* Enhanced hover effects */
.tab-link:active {
    transform: scale(0.95);
}

.tab-link-active:active {
    transform: translateY(-2px) scale(0.98);
}

/* Safe area for modern phones */
@supports (padding: max(0px)) {
    .toolbar.tabbar {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
        height: calc(80px + env(safe-area-inset-bottom));
    }
    
    .page-content {
        padding-bottom: max(95px, calc(80px + env(safe-area-inset-bottom)));
    }
}

/* Animation for tab switching */
@keyframes tabBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.tab-link-active .tab-icon-wrapper {
    animation: tabBounce 0.3s ease;
}

/* Update page content padding for taller tabbar */
.page-content {
    padding-bottom: 80px;
}

/* Enhanced active state with glow effect */
.tab-link-active .tab-icon-wrapper {
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Responsive adjustments */
@media (max-width: 360px) {
    .tab-icon-wrapper {
        width: 42px;
        height: 42px;
    }
    
    .tab-link .f7-icons {
        font-size: 22px;
    }
    
    .tabbar-label {
        font-size: 11px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-icon .f7-icons {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .toolbar-inner {
        max-width: 600px;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.btn:disabled .loading-spinner {
    border: 2px solid #cccccc;
    border-top-color: transparent;
}

/* Google button specific styles */
.btn-google:disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

.btn-google:disabled::before {
    opacity: 0.5;
}

/* Right Side Menu Styles */
.side-menu {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.right-side-menu {
    right: 0;
}

.side-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-menu-content {
    position: absolute;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-menu.show .side-menu-backdrop {
    opacity: 1;
}

.side-menu.show .side-menu-content {
    right: 0;
}

.side-menu-header {
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.side-menu-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-menu-btn {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

.side-menu-body {
    flex: 1;
    overflow-y: auto;
}

.user-info-sidebar {
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    background: #f8f9fa;
}

.user-avatar-sidebar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 12px;
}

.user-details-sidebar {
    flex: 1;
}

.user-name-sidebar {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.user-email-sidebar {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.side-menu-list {
    padding: 10px 0;
}

.side-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.side-menu-item:hover {
    background: #f5f5f5;
}

.side-menu-item .f7-icons {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.side-menu-item.logout-btn {
    color: #f44336;
    border-left-color: #f44336;
}

.side-menu-item.logout-btn .f7-icons {
    color: #f44336;
}

.side-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 0;
}

/* Animation for menu items */
.side-menu-item {
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
    transform: translateX(20px);
}

.side-menu-item:nth-child(1) { animation-delay: 0.1s; }
.side-menu-item:nth-child(2) { animation-delay: 0.15s; }
.side-menu-item:nth-child(3) { animation-delay: 0.2s; }
.side-menu-item:nth-child(4) { animation-delay: 0.25s; }
.side-menu-item:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .side-menu-content {
        width: 85%;
        max-width: 300px;
    }
}

/* Safe area support for modern phones */
@supports (padding: max(0px)) {
    .side-menu-content {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .side-menu-header {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}
/* Add these styles to your existing style.css file */

/* Signup Screen - Match Login Screen Centering */
#signupScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 1000;
}

.signup-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.signup-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.signup-header h2 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Ensure the form takes full width */
.signup-container form {
    width: 100%;
}

/* Make sure buttons and inputs match login page exactly */
.signup-container .btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.signup-container .form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.signup-container .form-input:focus {
    border-color: #2196F3;
    outline: none;
    background-color: #f8fdff;
}

/* Divider styling to match login page */
.signup-container .divider {
    text-align: center;
    margin: 20px 0;
    color: #666;
    position: relative;
}

.signup-container .divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.signup-container .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: 0;
}

/* Link styling */
.signup-container .login-link {
    text-align: center;
    margin: 1rem 0;
}

.signup-container .login-link a {
    color: #2196F3;
    text-decoration: none;
}

/* Info box styling */
.signup-container .password-info {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    border-left: 4px solid #2196F3;
}

/* Debug info styling */
.signup-container .debug-info {
    margin-top: 1rem;
    padding: 0.5rem;
    background: #f5f5f5;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #666;
}

/* Alert message styling */
.signup-container .alert {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    display: none;
}

/* Responsive adjustments */
@media (max-height: 600px) {
    #signupScreen {
        align-items: flex-start;
        padding-top: 40px;
        overflow-y: auto;
    }
    
    .signup-container {
        margin: 20px 0;
    }
}

/* Safe area support */
@supports (padding: max(0px)) {
    #signupScreen {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
/* Add this to your style.css */
.post-like-btn.liked {
    color: #ff3b30 !important;
}

.post-like-btn.liked .f7-icons {
    color: #ff3b30 !important;
}

/* Ensure the default link color for non-liked posts */
.post-like-btn {
    color: var(--f7-link-color) !important;
}

.post-like-btn .f7-icons {
    color: var(--f7-link-color) !important;
}

/* Optional: Add animation for like */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.post-like-btn.liked .f7-icons {
    animation: heartBeat 0.3s ease-in-out;
}
/* Post Menu Styles - Fixed Icon Issues */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

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

.post-menu {
    position: relative;
}

.post-menu-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    transition: background-color 0.2s;
    width: 32px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 150px; /* Increased width */
    z-index: 1000;
    overflow: visible; /* Changed from hidden */
    display: none;
    border: 1px solid #e0e0e0;
}

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

.post-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
    text-decoration: none;
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: nowrap; /* Prevent text wrapping */
}

.post-menu-item:hover {
    background-color: #f5f5f5;
}

.post-menu-item .icon {
    margin-right: 12px; /* Increased spacing */
    width: 18px; /* Fixed width for icons */
    text-align: center;
    font-size: 16px; /* Ensure icon size */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Delete option with clear red styling */
.post-menu-item.menu-delete {
    color: #ff3b30;
    border-top: 1px solid #f0f0f0;
}

.post-menu-item.menu-delete:hover {
    background-color: #ffe5e5;
    color: #d70015;
}

.post-menu-item.menu-delete .icon {
    color: #ff3b30;
}

.post-menu-item.menu-edit {
    color: #333;
}

.post-menu-item.menu-edit:hover {
    background-color: #f0f7ff;
    color: #007aff;
}

.post-menu-item.menu-edit .icon {
    color: #666;
}

/* Ensure Framework7 icons are properly sized */
.f7-icons {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

/* Backdrop for menu */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999;
    display: none;
}

.menu-backdrop.show {
    display: block;
}
/* Comments Section Styles */
.comments-section {
    margin-top: 15px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

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

.comments-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.comments-toggle {
    background: none;
    border: none;
    color: #007aff;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.comments-toggle:hover {
    background-color: #f0f7ff;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007aff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.comment-time {
    font-size: 11px;
    color: #888;
    margin: 0;
}

.comment-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin: 0 0 6px 0;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.comment-action-btn:hover {
    background-color: #f5f5f5;
}

.comment-action-btn.liked {
    color: #ff3b30;
}

.comment-action-btn.liked .f7-icons {
    color: #ff3b30;
}

.comment-menu {
    position: relative;
    margin-left: 8px;
}

.comment-menu-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 120px;
    z-index: 1001;
    overflow: visible;
    display: none;
    border: 1px solid #e0e0e0;
}

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

.comment-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background-color 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.comment-menu-item:hover {
    background-color: #f5f5f5;
}

.comment-menu-item .f7-icons {
    margin-right: 8px;
    width: 14px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-menu-item.menu-delete {
    color: #ff3b30;
    border-top: 1px solid #f0f0f0;
}

.comment-menu-item.menu-delete:hover {
    background-color: #ffe5e5;
}

.comment-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.comment-input-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007aff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: #007aff;
}

.comment-submit-btn {
    align-self: flex-end;
    padding: 6px 16px;
    font-size: 13px;
}

.no-comments {
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 20px;
    font-style: italic;
}

/* Scrollbar styling for comments */
.comments-list::-webkit-scrollbar {
    width: 4px;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* Room Badges */
.room-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.room-social {
    background: #e3f2fd;
    color: #1976d2;
}

.room-financial {
    background: #e8f5e8;
    color: #2e7d32;
}

.room-economical {
    background: #fff3e0;
    color: #f57c00;
}

/* Room List Items */
.room-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.room-item:hover {
    background-color: #f5f5f5;
}

.room-item .item-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Room Selection Buttons */
.room-select-btn {
    transition: all 0.2s;
}

.room-select-btn.button-fill {
    transform: scale(1.05);
}

/* Follow Room Button */
.follow-room-btn {
    min-width: 80px;
}
/* Room Notice Styles */
.room-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin: 15px 0;
    padding: 20px;
    text-align: center;
}

.room-notice h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
}

.room-notice p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.room-notice .button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.room-notice .button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Post Badge Styles */
.room-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.room-social {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.room-financial {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.room-economical {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #8e8e93;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #555;
}

.empty-state p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
/* Rank Badge Styles */
.rank-badge {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    min-width: 40px;
    text-align: center;
}

.rank-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.rank-silver {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.rank-bronze {
    background: linear-gradient(135deg, #CD7F32, #A56C27);
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.rank-top10 {
    background: linear-gradient(135deg, #FF6B6B, #EE5A24);
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.rank-top50 {
    background: linear-gradient(135deg, #4ECDC4, #00A8FF);
    box-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

.rank-top100 {
    background: linear-gradient(135deg, #9C88FF, #8C7AE6);
    box-shadow: 0 2px 4px rgba(156, 136, 255, 0.3);
}

.trending-rank-info {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.trending-post .post-header {
    flex-direction: column;
    align-items: flex-start;
}

.trending-post .post-user-info {
    width: 100%;
    margin-top: 8px;
}

/* Add to your style.css or in app-trending.js */
.post-share-btn {
    transition: all 0.3s ease;
}

.post-share-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.menu-share {
    color: #007aff;
}

.menu-share:hover {
    background-color: #e3f2fd;
}

.share-dialog {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.share-option {
    padding: 15px;
    margin: 5px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.share-option:hover {
    background-color: #f8f9fa;
}
.tab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.tab-icon-wrapper {
    position: relative;
    display: inline-block;
}
/* Messaging Page Styles */
.messages-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.messages-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.messages-header .back-button {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    margin-right: 15px;
}

.messages-header h3 {
    margin: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.new-conversation-header-btn {
    color: #2196F3;
    text-decoration: none;
    font-size: 20px;
}

/* Conversations List Styles */
.conversations-view {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.conversation-list {
    margin: 0;
}

.conversation-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    background: white;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-item.unread {
    background-color: #f0f7ff;
    border-left: 3px solid #2196F3;
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

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

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

.conversation-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.conversation-time {
    font-size: 12px;
    color: #666;
}

.conversation-preview {
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-badge {
    background: #ff3b30;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    margin-left: 10px;
}

/* Chat View Styles */
.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 70px;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 15px;
}

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.received .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    border: 1px solid #e0e0e0;
}

.message-content {
    margin-bottom: 5px;
    word-wrap: break-word;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

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

.message.received .message-time {
    color: #666;
}

.chat-input-container {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 10px 15px;
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    background: #f8f9fa;
}

.chat-input:focus {
    border-color: #2196F3;
    background: white;
}

.send-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-button:active {
    transform: scale(0.95);
}

/* New Conversation Button */
.new-conversation-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s;
}

.new-conversation-btn:active {
    transform: scale(0.95);
}

.new-conversation-btn .f7-icons {
    font-size: 24px;
}

/* No Conversations State */
.no-conversations {
    text-align: center;
    padding: 3rem 1rem;
    color: #8e8e93;
}

.no-conversations .f7-icons {
    font-size: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-conversations h3 {
    margin-bottom: 0.5rem;
    color: #555;
}

.no-conversations p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* User Search Results */
.user-search-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-search-item:hover {
    background-color: #f5f5f5;
}

/* Safe area adjustments for chat input */
@supports (padding: max(0px)) {
    .chat-input-container {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        bottom: max(60px, calc(60px + env(safe-area-inset-bottom)));
    }
    
    .new-conversation-btn {
        bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
    }
}

/* Message badge in side menu */
.side-menu-item .tab-badge {
    position: static;
    margin-left: 8px;
    display: none;
}

.side-menu-item .tab-badge[style*="display: inline-block"] {
    display: inline-block !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .conversation-avatar {
        width: 45px;
        height: 45px;
        font-size: 16px;
        margin-right: 12px;
    }
    
    .conversation-name {
        font-size: 15px;
    }
    
    .conversation-preview {
        font-size: 13px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .new-conversation-btn {
        width: 56px;
        height: 56px;
        bottom: 70px;
        right: 15px;
    }
}

/* Animation for new messages */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: messageSlideIn 0.3s ease;
}
/* Settings Page Styles */
.settings-content .block-header {
    padding: 15px;
    background: #2c2d3a;
    margin: 0;
    border-bottom: 1px solid #3a3b4a;
}

.settings-content .block-header h3,
.settings-content .block-header h4 {
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-content .block-header h4 {
    font-size: 16px;
}

.settings-content .block-header .small-text {
    color: #8e8e93;
    font-size: 12px;
    margin-top: 5px;
}

.settings-content .block-strong {
    background: #2c2d3a;
    border-radius: 8px;
    margin: 10px 0;
}

.settings-content .current-setting-display {
    background: #3a3b4a !important;
    border: 1px solid #484a66;
}

.settings-content .logo-icon-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
}

/* Toggle switches for future settings */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

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

/* Settings list items */
.settings-content .list ul {
    background: #2c2d3a;
    border-radius: 8px;
}

.settings-content .item-link {
    color: #fff;
    text-decoration: none;
}

.settings-content .item-link .item-inner {
    border-bottom: 1px solid #3a3b4a;
}

.settings-content .item-link .item-inner:after {
    display: none;
}

.settings-content .item-title {
    font-size: 14px;
}

.settings-content .item-after {
    color: #8e8e93;
}

/* Button styles for settings */
.settings-content .button {
    margin-top: 5px;
}
/* Add these styles to your existing style.css */

/* Fix page layering */
.page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

.page.hidden {
    display: none !important;
}

/* Ensure tab bar stays on top of conversation page */
.toolbar.tabbar {
    z-index: 1001;
    position: fixed;
}

/* Conversation page should leave space for tab bar */
#conversationPage {
    bottom: 60px; /* Leave space for tab bar */
}

/* Message input area position */
.message-input-area {
    position: fixed;
    bottom: 60px; /* Above tab bar */
    left: 0;
    right: 0;
    z-index: 1002;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 10px 15px;
}
/* Add to style.css to override any conflicts */

.page.hidden {
    display: none !important;
}

/* Ensure tab bar stays on bottom */
.toolbar.tabbar {
    z-index: 1002;
    position: fixed !important;
}
/* Add this to the BOTTOM of style.css */

/* Fix for messaging pages positioning */
#messagesPage, #conversationPage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: white;
}

/* Ensure proper stacking */
#mainApp {
    position: relative;
    z-index: 1;
}

/* Adjust conversation page to respect navbar */
#conversationPage {
    padding-top: 60px; /* Height of navbar */
    padding-bottom: 60px; /* Height of tabbar */
}

#messagesPage {
    padding-top: 60px;
    padding-bottom: 60px;
}
/* Fix for fixed navbar - Add padding to main content */
.elegant-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

/* Adjust main page content to account for fixed navbar */
#mainApp > .page-content {
    padding-top: 60px; /* Height of navbar */
    padding-bottom: 60px; /* Height of tabbar */
}

/* Fix messages and conversation pages positioning */
#messagesPage, #conversationPage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: white;
}

/* Adjust messages page content area */
#messagesPage .page-content {
    position: absolute;
    top: 60px; /* Below navbar */
    left: 0;
    right: 0;
    bottom: 60px; /* Above tabbar */
    overflow-y: auto;
    padding: 0;
}

/* Adjust conversation page content area */
#conversationPage .page-content {
    position: absolute;
    top: 60px; /* Below navbar */
    left: 0;
    right: 0;
    bottom: 60px; /* Above tabbar */
    overflow-y: hidden; /* Important for keyboard handling */
    padding: 0;
}

/* Messages container in conversation page */
.messages-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 70px; /* Space for input area */
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
}

/* Message input area fixed positioning */
.message-input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 10px 15px;
    z-index: 1200;
}

/* Tabbar fixed positioning */
.toolbar.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: white;
}

/* Statusbar height compensation */
.statusbar {
    height: 20px;
    background: white;
}

/* Safe area adjustments for modern phones */
@supports (padding: max(0px)) {
    .elegant-navbar {
        padding-top: env(safe-area-inset-top);
        height: calc(60px + env(safe-area-inset-top));
    }
    
    .elegant-navbar .navbar-inner {
        padding-top: env(safe-area-inset-top);
    }
    
    .toolbar.tabbar {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(60px + env(safe-area-inset-bottom));
    }
    
    #mainApp > .page-content {
        padding-top: calc(60px + env(safe-area-inset-top));
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
}
/* Keyboard handling */
@media (max-height: 600px) {
    .messages-container {
        bottom: 60px; /* Less space on smaller screens */
    }
    
    .message-input-area {
        padding: 8px 10px;
    }
}

/* Keyboard-open state */
.keyboard-open .message-input-area {
    position: fixed !important;
    bottom: var(--keyboard-height, 300px) !important;
    transition: bottom 0.3s ease;
}

.keyboard-open .messages-container {
    padding-bottom: calc(var(--keyboard-height, 300px) + 70px) !important;
}

/* Conversation page back button fix */
#conversationPage .navbar .left {
    z-index: 1300;
    position: relative;
}

#conversationPage .navbar .left .link.back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

#conversationPage .navbar .left .link.back .f7-icons {
    color: #333 !important;
    font-size: 20px;
}
/* Add to style.css */
.upload-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 99999;
    max-width: 300px;
}

.upload-toast.show {
    transform: translateX(0);
}

.upload-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-toast i {
    font-size: 18px;
}

.upload-toast-error {
    background: rgba(255, 59, 48, 0.9);
}

.upload-toast-success {
    background: rgba(76, 217, 100, 0.9);
}

.upload-toast-info {
    background: rgba(0, 122, 255, 0.9);
}

.drag-over {
    border-color: #4cd964 !important;
    background: rgba(76, 217, 100, 0.1) !important;
}
/* Add to your existing CSS */
.media-preview-container {
    margin: 15px 0;
    padding: 15px;
    background: #f5f5f7;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.media-preview {
    position: relative;
}

.media-preview-actions {
    margin-top: 10px;
    text-align: center;
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.upload-progress {
    margin-top: 15px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: #007aff;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* App Toast Styles */
.app-toast {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.app-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.app-toast-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.app-toast-content i {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.app-toast-success .app-toast-content i {
    color: #4CAF50;
}

.app-toast-error .app-toast-content i {
    color: #F44336;
}

.app-toast-warning .app-toast-content i {
    color: #FF9800;
}

.app-toast-info .app-toast-content i {
    color: #2196F3;
}

.app-toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 0 0 0 10px;
    transition: color 0.2s;
}

.app-toast-close:hover {
    color: white;
}

/* Permission Status Styles */
.permission-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.permission-status.granted {
    background: #e8f5e8;
    color: #2e7d32;
}

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

.permission-status.not_determined {
    background: #fff3e0;
    color: #ef6c00;
}

.permission-status.unavailable {
    background: #f5f5f5;
    color: #757575;
}

.permission-status.error {
    background: #fce4ec;
    color: #ad1457;
}

/* Settings Page Styling */
.permission-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.permission-item:last-child {
    border-bottom: none;
}

.permission-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.permission-icon i {
    font-size: 20px;
    color: white;
}

.permission-details {
    flex: 1;
}

.permission-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.permission-description {
    font-size: 13px;
    color: #666;
}

.permissions-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.permissions-actions .button {
    flex: 1;
    min-width: 120px;
}
/* Add to your style.css */
.photo-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.photo-options-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.photo-options-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-options-body {
    padding: 20px;
}

.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 10px;
    background: #f8f9fa;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.option-btn i {
    margin-right: 12px;
    font-size: 20px;
}

.option-btn.camera-btn {
    background: #007aff;
    color: white;
}

.option-btn.gallery-btn {
    background: #34c759;
    color: white;
}

.option-btn.cancel-btn {
    background: #ff3b30;
    color: white;
}
/* Add to your style.css */
.permission-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin: 4px 0;
}

.permission-status.granted {
    background: #d4edda;
    color: #155724;
}

.permission-status.denied {
    background: #f8d7da;
    color: #721c24;
}

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

.simple-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 300px;
    text-align: center;
}

.simple-toast.show {
    opacity: 1;
}

.simple-toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.simple-toast-success { background: rgba(40, 167, 69, 0.9); }
.simple-toast-error { background: rgba(220, 53, 69, 0.9); }
.simple-toast-info { background: rgba(23, 162, 184, 0.9); }

/* Add to the BOTTOM of your existing style.css file */

/* Messages Page Structure Fixes */
#messagesPage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    overflow: hidden;
}

#messagesPage .page-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Messages Header */
.messages-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.messages-header h3 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.back-button {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.new-conversation-header-btn {
    color: #007aff;
    text-decoration: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

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

/* Conversations View */
.conversations-view {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-bottom: 80px; /* Space for FAB */
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

/* Safe area adjustments */
@supports (padding: max(0px)) {
    .fab {
        bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
        right: max(20px, calc(20px + env(safe-area-inset-right)));
    }
    
    .messages-header {
        padding-top: max(15px, env(safe-area-inset-top));
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .conversations-view {
        padding-bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
    }
}

/* Ensure conversation items are properly styled */
.conversation-list {
    margin: 0;
    background: white;
}

.conversation-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    background: white;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin-right: 15px;
    flex-shrink: 0;
}

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

.conversation-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.conversation-preview {
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-time {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Empty state for conversations */
.no-conversations {
    text-align: center;
    padding: 60px 20px;
    color: #8e8e93;
}

.no-conversations .f7-icons {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-conversations h3 {
    margin-bottom: 10px;
    color: #555;
    font-size: 18px;
}

.no-conversations p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Loading state */
.conversations-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.conversations-loading .f7-icons {
    font-size: 32px;
    color: #007aff;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
    .messages-header {
        padding: 12px 10px;
    }
    
    .messages-header h3 {
        font-size: 16px;
    }
    
    .back-button,
    .new-conversation-header-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .fab {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 70px;
        right: 15px;
    }
    
    .conversation-item {
        padding: 12px 10px;
    }
    
    .conversation-avatar {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-right: 12px;
    }
    
    .conversation-name {
        font-size: 15px;
    }
    
    .conversation-preview {
        font-size: 13px;
    }
}

/* Ensure proper layering with tab bar */
.toolbar.tabbar {
    z-index: 1001;
    position: fixed !important;
}

/* Fix for page content when messages is active */
.page-content:has(+ #messagesPage:not(.hidden)) {
    display: none !important;
}

/* Ensure messages page takes full viewport */
#messagesPage:not(.hidden) {
    display: flex !important;
    flex-direction: column;
}
.post-time {
    font-size: 12px;
    color: #8e8e93;
    margin-left: 8px;
}
/* Comment avatars */
.comment-item {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-content-wrapper {
    flex: 1;
}

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

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 0.8rem;
    color: #999;
}

.comment-content {
    color: #555;
    line-height: 1.4;
}
/* In-app notifications */
.in-app-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 13000;
    transition: transform 0.3s ease;
    cursor: pointer;
    border-left: 4px solid #007aff;
}

.in-app-notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    position: relative;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    margin-bottom: 2px;
    color: #333;
}

.notification-text p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    margin-left: 8px;
}

.notification-close:hover {
    color: #333;
}

/* App toast styles */
.app-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    min-width: 250px;
    max-width: 90%;
    background: rgba(0,0,0,0.85);
    color: white;
    border-radius: 30px;
    padding: 12px 20px;
    z-index: 14000;
    transition: transform 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.app-toast.show {
    transform: translateX(-50%) translateY(0);
}

.app-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-toast-content i {
    font-size: 20px;
    color: #007aff;
}

.app-toast-success i { color: #4cd964; }
.app-toast-error i { color: #ff3b30; }
.app-toast-warning i { color: #ff9500; }
.app-toast-info i { color: #007aff; }

.app-toast-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #555;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    padding: 0;
    border: 2px solid white;
}

.app-toast-close:hover {
    background: #777;
}