* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html, body {
    overflow-x: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

html {
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

input, textarea, button, select, a {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

:root {
    --primary: #1a1a1a;
    --primary-dark: #000000;
    --primary-light: #333333;
    --bg-main: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-elevated: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --overlay: rgba(0, 0, 0, 0.75);
    --accent: #3b82f6;
    --metamask-orange: #f6851b;
    --metamask-hover: #e2761b;
}

body.dark {
    --bg-main: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-elevated: #2a2a2a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --overlay: rgba(0, 0, 0, 0.85);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 3px solid var(--bg-main);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

body.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid var(--bg-main);
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

body.dark * {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

body.modal-open,
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #1d9bf0 0%, #0c7abf 100%);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.4);
    transform-origin: center;
}

@keyframes badgePop {
    0% { 
        transform: scale(0); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.metamask-status {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    background: linear-gradient(135deg, var(--metamask-orange) 0%, var(--metamask-hover) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(246, 133, 27, 0.4);
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 90%;
}

.metamask-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
}

.metamask-status-icon {
    font-size: 20px;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    backdrop-filter: blur(0px);
    will-change: opacity, backdrop-filter;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(4px);
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #0a0a0a 100%);
    color: white;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    will-change: transform;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -ms-overflow-style: none;
}

.sidebar.open {
    transform: translateX(0);
}

body.dark .sidebar {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #0a0a0a 100%);
}

.sidebar-header {
    padding: 32px 28px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.sidebar-header h1 {
    font-size: 24px;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-header p {
    opacity: 0.9;
    font-size: 13px;
    font-weight: 500;
}

.sidebar-profile {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.08);
    margin: 20px 20px 0;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.sidebar-profile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-profile:hover::before {
    transform: translateX(100%);
}

.sidebar-profile.tap-feedback {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.98);
}

.sidebar-profile:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-4px);
}

.sidebar-profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-profile:hover .sidebar-profile-avatar {
    transform: scale(1.05);
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.sidebar-profile-email {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-menu {
    padding: 20px 20px 32px;
}

.nav-item {
    padding: 16px 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.nav-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover::after {
    transform: translateX(100%);
}

.nav-item.tap-feedback {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.98);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item:active {
    transform: translateX(-4px) scale(0.98);
}

.nav-item-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    opacity: 0.85;
    filter: grayscale(100%) brightness(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item-icon svg {
    opacity: 0.85;
    filter: none;
}

.app-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-screen {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #0a0a0a 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
    pointer-events: none;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.auth-screen.active {
    display: flex;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 56px 48px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .auth-container {
    background: rgba(42, 42, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo-text {
    font-size: 38px;
    font-weight: 900;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tagline {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
    font-weight: 500;
    line-height: 1.5;
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-footer a:hover {
    opacity: 0.7;
}

.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    min-height: 54px;
}

.auth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.auth-btn.google {
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    font-family: 'Roboto', 'Arial', sans-serif;
    font-weight: 500;
}

body.dark .auth-btn.google {
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
}

.auth-btn.google:hover:not(:disabled) {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
}

.google-icon {
    width: 18px;
    height: 18px;
}

.auth-btn.facebook {
    background: #1877f2;
    color: white;
    font-weight: 600;
    border: none;
}

.auth-btn.facebook:hover:not(:disabled) {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.facebook-icon {
    width: 20px;
    height: 20px;
}

.auth-btn.metamask {
    background: linear-gradient(135deg, var(--metamask-orange) 0%, var(--metamask-hover) 100%);
    color: white;
    font-weight: 600;
    border: none;
}

.auth-btn.metamask:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--metamask-hover) 0%, #cd6116 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(246, 133, 27, 0.4);
}

.metamask-icon {
    width: 20px;
    height: 20px;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.app-container {
    display: none;
    max-width: 680px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 80px;
}

.app-container.active {
    display: block;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px var(--shadow);
    will-change: transform;
    gap: 12px;
}

.app-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    flex-shrink: 0;
}

/* Search Bar Styles */
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
    background: var(--bg-elevated);
}

body.dark .search-input:focus {
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.3);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.search-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-results-header {
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--border);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-results-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-results-icon {
    font-size: 24px;
}

.search-results-text {
    font-weight: 700;
    font-size: 16px;
}

.search-results-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.clear-search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.clear-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
    flex-shrink: 0;
}

.menu-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.menu-btn.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.menu-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.menu-btn span {
    width: 20px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-btn:hover span {
    background: white;
}

.feed-container {
    padding: 20px 16px;
}

.loading-indicator {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.post {
    background: var(--bg-elevated);
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px var(--shadow);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    scroll-margin-top: 80px;
    will-change: transform, box-shadow;
}

.post:hover {
    box-shadow: 0 8px 24px var(--shadow-hover);
    transform: translateY(-2px);
}

.post.highlight {
    animation: highlightPulse 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3);
    }
}

.post-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark .post-avatar {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.post-avatar:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}



.post-user-info {
    flex: 1;
    min-width: 0;
}

.post-username {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.post-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.post-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
}

.post-delete-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.post-delete-btn.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.post-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.post-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-trash-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.post-menu-container {
    position: relative;
    display: flex;
    align-items: center;
}

.post-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
    min-height: 40px;
    color: var(--text-secondary);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
}

.post-menu-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.post-menu-btn.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.post-menu-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.post-menu-btn:active {
    transform: scale(0.95);
}

.post-menu-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-menu-btn:hover svg {
    transform: rotate(90deg);
}

.post-options-menu {
    position: fixed;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-hover);
    padding: 8px;
    min-width: 180px;
    z-index: 10000;
    animation: menuSlideIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.post-option-btn {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.post-option-btn:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.post-option-btn.delete-post {
    color: var(--error);
}

.post-option-btn.delete-post:hover {
    background: rgba(239, 68, 68, 0.1);
}

.post-option-btn svg {
    flex-shrink: 0;
}

.post-image-container {
    position: relative;
    width: 100%;
    background: var(--bg-secondary);
    overflow: hidden;
}

.post-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    opacity: 0;
}

.post-image[style*="opacity: 1"] {
    opacity: 1;
}

.image-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.post-actions {
    padding: 14px 18px;
    display: flex;
    gap: 16px;
    border-top: 1px solid var(--border);
}

.action-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
}

.action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.action-btn.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tapFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.action-btn:hover:not(:disabled) {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.action-btn.liked {
    color: #ef4444;
}

.action-btn.liked:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
}

.action-btn.saved {
    color: #374151;
}

body.dark .action-btn.saved {
    color: #9ca3af;
}

.action-btn.saved:hover:not(:disabled) {
    background: rgba(55, 65, 81, 0.1);
}

body.dark .action-btn.saved:hover:not(:disabled) {
    background: rgba(156, 163, 175, 0.1);
}

.heart-icon {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: var(--text-secondary);
}

.heart-icon.liked {
    color: #ef4444;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.bookmark-icon {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: var(--text-secondary);
}

.bookmark-icon.saved {
    color: #374151;
}

body.dark .bookmark-icon.saved {
    color: #9ca3af;
}

.action-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.reaction-picker {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.4));
    will-change: transform, opacity;
}

.reaction-picker.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Fix reaction picker appearing behind modals */
.comment-modal .reaction-picker {
    z-index: 10004 !important;
}

.comment-modal-content .reaction-picker {
    z-index: 10004 !important;
}

.reaction-picker-content {
    background: var(--bg-elevated);
    border-radius: 50px;
    padding: 8px 10px;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.reaction-picker-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 50px;
}

.reaction-option {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 42px;
    min-height: 42px;
    flex-shrink: 0;
}

.reaction-option:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.reaction-option:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    transform: scale(1.3) translateY(-8px);
    z-index: 10;
}

.reaction-option:active {
    transform: scale(1.2) translateY(-4px);
}

.reaction-emoji {
    font-size: 28px;
    display: block;
    filter: grayscale(0.2) brightness(0.95);
    transition: filter 0.2s, transform 0.2s;
    line-height: 1;
}

.reaction-option:hover .reaction-emoji {
    filter: grayscale(0) brightness(1.1);
    transform: scale(1.1);
}

.reaction-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 12px;
    min-width: 16px;
    text-align: center;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1.5px solid var(--bg-elevated);
}

.reaction-count:not(:empty) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-badge {
    display: flex;
    gap: 2px;
    margin-right: 6px;
    position: relative;
    z-index: 1;
}

.reaction-badge span {
    font-size: 15px;
    line-height: 1;
    background: var(--bg-elevated);
    border-radius: 50%;
    padding: 3px;
    border: 2px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.dark .reaction-picker-content {
    background: rgba(42, 42, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .reaction-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.post-caption {
    padding: 0 18px 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.post-caption .username {
    font-weight: 700;
    margin-right: 6px;
}

.see-more-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.see-more-btn:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.post-comments {
    padding: 0 18px 14px;
    max-height: 400px;
    overflow-y: auto;
    min-height: 0;
    transition: min-height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-comments::-webkit-scrollbar {
    width: 8px;
}

.post-comments::-webkit-scrollbar-track {
    background: transparent;
}

.post-comments::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.post-comments::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

body.dark .post-comments::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

body.dark .post-comments::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

.comment {
    margin-bottom: 10px;
    font-size: 14px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    gap: 10px;
    animation: fadeSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.dark .comment-avatar {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comment-text-content {
    display: inline;
}

.edited-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
    margin-left: 4px;
}

.more-comments-indicator {
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-author {
    font-weight: 700;
    margin-right: 6px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    align-items: center;
}

.comment-reply-btn,
.comment-edit-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-reply-btn:hover,
.comment-edit-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.dark .comment-reply-btn:hover,
body.dark .comment-edit-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comment-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
}

.comment-delete::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.1);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.comment-delete.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.comment-delete:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.comment-delete:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.comment-trash-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.reply-indicator {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.reply-to-username {
    color: var(--primary);
    font-weight: 600;
}

.comment-replies {
    margin-left: 32px;
    margin-top: 8px;
    border-left: 2px solid var(--border);
    padding-left: 12px;
}

.comment-input {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.comment-input input {
    flex: 1;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
}

.comment-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
    background: var(--bg-elevated);
}

body.dark .comment-input input:focus {
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.3);
}

.comment-input button {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
}

.comment-input button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.comment-input button.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.comment-input button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.comment-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.create-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 3px solid white;
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 98;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.create-fab::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.create-fab.tap-feedback::after {
    opacity: 1;
    animation: tapFade 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.create-fab:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

body.dark .create-fab {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: 24px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 96px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    border: 2px solid var(--bg-elevated);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

body.dark .modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid var(--bg-elevated);
}

body.dark .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    z-index: 1;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
}

.modal-close {
    background: var(--bg-secondary);
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    min-height: 44px;
}

.modal-close:hover {
    background: var(--error);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.filter-section {
    margin-bottom: 20px;
    display: none;
}

.filter-section.active {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.filter-option {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.filter-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.filter-option.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 16px;
    background: var(--bg-secondary);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(26, 26, 26, 0.05);
}

body.dark .upload-area:hover {
    background: rgba(255, 255, 255, 0.05);
}

.upload-preview-container {
    position: relative;
    margin-bottom: 16px;
    display: none;
}

.upload-preview-container.active {
    display: block;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-preview {
    width: 100%;
    max-height: 500px;
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow);
    display: block;
    object-fit: contain;
}

.upload-preview-img {
    width: 100%;
    max-height: 500px;
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow);
    display: none;
    object-fit: contain;
}

.upload-preview-img.active {
    display: block;
}

.preview-image-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
}

.preview-image-area::-webkit-scrollbar {
    width: 8px;
}

.preview-image-area::-webkit-scrollbar-track {
    background: transparent;
}

.preview-image-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

body.dark .preview-image-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.multi-photo-preview-item {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.multi-photo-preview-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
}

.multi-photo-preview-item canvas,
.multi-photo-preview-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.multi-photo-preview-item > div:last-child {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.preview-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    color: var(--text-primary);
}

.preview-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.preview-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(0);
}

.caption-input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.caption-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
    background: var(--bg-elevated);
}

body.dark .caption-input:focus {
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.3);
}

.post-edit-modal textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-edit-modal textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
    background: var(--bg-elevated);
}

body.dark .post-edit-modal textarea:focus {
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.3);
}

.caption-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.post-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    min-height: 50px;
}

.post-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.post-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(0);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    opacity: 0.7;
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: float 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.profile-modal .modal-body {
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 3px solid white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.dark .profile-avatar {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.saved-post-item {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

.saved-post-item:hover {
    background: var(--bg-elevated);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
    border-color: var(--accent);
}

.saved-post-item:active {
    transform: translateY(0) scale(0.98);
}

.saved-post-thumbnail {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.saved-post-info {
    flex: 1;
    min-width: 0;
}

.saved-post-author {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 15px;
}

.saved-post-caption {
    font-size: 14px;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.saved-post-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.saved-post-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.offline-banner.show {
    transform: translateY(0);
}

.confirm-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(8px);
    z-index: 10004;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.confirm-modal.active {
    display: flex;
}

.confirm-content {
    background: var(--bg-elevated);
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 96px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.confirm-body {
    padding: 32px 24px 24px;
    text-align: center;
}

.confirm-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.confirm-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--error);
    stroke-width: 2;
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.confirm-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 24px 24px;
}

.confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
}

.confirm-btn.cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.confirm-btn.cancel:hover {
    background: var(--border);
}

.confirm-btn.confirm {
    background: var(--error);
    color: white;
}

.confirm-btn.confirm:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.settings-section {
    margin-bottom: 24px;
}

.settings-btn {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

.settings-btn:hover {
    border-color: var(--primary);
    background: var(--bg-elevated);
    transform: translateY(-2px);
}

.settings-btn.danger {
    border-color: var(--error);
    color: var(--error);
}

.settings-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
}

.crop-modal {
    z-index: 10002;
}

.crop-modal-content {
    max-width: 90vw;
    max-height: 90vh;
}

.crop-modal-body {
    padding: 0;
    overflow: hidden;
}

.crop-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-canvas {
    max-width: 100%;
    max-height: 60vh;
    display: block;
}

.crop-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.crop-box {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
    pointer-events: auto;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
}

.crop-handle.nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle.ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle.sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle.se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.crop-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.crop-modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.crop-modal-btn.cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.crop-modal-btn.cancel:hover {
    background: var(--border);
}

.crop-modal-btn.confirm {
    background: var(--primary);
    color: white;
}

.crop-modal-btn.confirm:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.comment-modal {
    z-index: 10003;
}

.comment-modal-content {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.comment-modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
    max-height: 60vh;
}

.comment-modal-post-preview {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.comment-modal-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-modal-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-modal-username {
    font-weight: 700;
    font-size: 15px;
}

.comment-modal-caption {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.comment-modal-list {
    padding: 16px;
}

.comment-modal-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-modal-item:hover {
    background: var(--bg-secondary);
}

.comment-modal-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-modal-item-content {
    flex: 1;
    min-width: 0;
}

.comment-modal-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-modal-item-author {
    font-weight: 700;
    font-size: 14px;
}

.comment-modal-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-modal-item-text {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.comment-modal-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    align-items: center;
}

.comment-modal-reply-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modal-open .reaction-picker {
    z-index: 10004 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 380px !important;
}

.reaction-picker-content {
    padding: 6px 8px !important;
    gap: 2px !important;
}

.reaction-option {
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 5px 6px !important;
}

.reaction-emoji {
    font-size: 24px !important;
}
.comment-modal-reply-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.dark .comment-modal-reply-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comment-modal-item-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 4px;
}

.comment-modal-item-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.comment-modal-input-container {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: var(--bg-elevated);
}

.comment-modal-input {
    flex: 1;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-modal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
}

.comment-modal-submit {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-modal-submit:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.comment-modal-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 32px var(--shadow-hover);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    border: 1px solid var(--border);
    min-width: 250px;
    animation: toastSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.toast.error {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.toast.warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.post-avatar,
.comment-avatar,
.comment-modal-item-avatar,
.post-username,
.comment-modal-item-author {
    cursor: pointer !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.post-avatar:hover,
.comment-avatar:hover,
.comment-modal-item-avatar:hover {
    transform: scale(1.1);
    opacity: 0.8;
}


@media (max-width: 640px) {
    .auth-container {
        padding: 40px 32px;
        border-radius: 20px;
    }

    .auth-logo-text {
        font-size: 32px;
    }

    .auth-tagline {
        font-size: 14px;
    }

    .app-header {
        padding: 12px 16px;
    }

    .app-title {
        font-size: 16px;
    }

    .search-container {
        max-width: none;
        margin: 0 8px;
    }
    
    .search-input {
        font-size: 13px;
        padding: 8px 36px 8px 12px;
    }

    .feed-container {
        padding: 16px 12px;
    }

    .post {
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .create-fab {
        width: 54px;
        height: 54px;
        font-size: 26px;
        bottom: 20px;
        right: 20px;
    }

    .modal-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
    }

    .action-btn {
        font-size: 22px;
        padding: 6px 10px;
    }

    .sidebar {
        width: 280px;
    }

    .saved-post-thumbnail {
        width: 70px;
        height: 70px;
    }

    .saved-post-item {
        padding: 12px;
    }

    .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    button, .nav-item, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    .reaction-picker-content {
        padding: 6px 8px;
        gap: 2px;
        border-radius: 40px;
        max-width: calc(100vw - 20px);
    }
    
    .reaction-option {
        padding: 5px 6px;
        min-width: 38px;
        min-height: 38px;
    }
    
    .reaction-emoji {
        font-size: 24px;
    }
    
    .reaction-option:hover {
        transform: scale(1.25) translateY(-6px);
    }

    .reaction-count {
        font-size: 8px;
        padding: 1px 4px;
        min-width: 14px;
    }

    .reaction-badge span {
        width: 20px;
        height: 20px;
        font-size: 14px;
        padding: 2px;
    }
    
    .multi-photo-preview-item {
        padding: 8px;
    }
}

@media (max-width: 375px) {
    .reaction-picker-content {
        padding: 5px 6px;
        gap: 1px;
    }
    
    .reaction-option {
        padding: 4px 5px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .reaction-emoji {
        font-size: 22px;
    }
}

@media (min-width: 768px) {
    .reaction-picker-content {
        padding: 10px 14px;
        gap: 6px;
    }

    .reaction-option {
        padding: 8px 10px;
        min-width: 48px;
        min-height: 48px;
    }

    .reaction-emoji {
        font-size: 32px;
    }

    .reaction-option:hover {
        transform: scale(1.35) translateY(-10px);
    }

    .reaction-count {
        font-size: 10px;
        padding: 2px 6px;
    }
}

@media (hover: none) {
    .action-btn:active:not(:disabled) {
        transform: scale(0.95);
    }

    .menu-btn:active {
        transform: scale(0.95);
    }

    .auth-btn:active:not(:disabled) {
        transform: scale(0.98);
    }

    .nav-item:active {
        transform: translateX(-4px) scale(0.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reaction-picker,
    .reaction-option,
    .reaction-emoji {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .post, .modal-content, .sidebar {
        border: 2px solid currentColor;
    }

    .reaction-picker-content {
        border-width: 3px;
    }
    
    .reaction-option:focus {
        outline-width: 3px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .reaction-picker-content {
        padding: 4px 6px;
    }

    .reaction-option {
        min-width: 32px;
        min-height: 32px;
    }

    .reaction-emoji {
        font-size: 20px;
    }
}

/* ==================== VIDEO PLAYER STYLES ==================== */
.post-video-container {
    position: relative;
    width: 100%;
    background: #000;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-video {
    width: 100%;
    max-height: 600px;
    display: block;
    outline: none;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px 16px 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.post-video-container:hover .video-controls {
    opacity: 1;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 8px;
}

.video-progress-filled {
    height: 100%;
    background: #ef4444;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-time {
    font-size: 12px;
    color: white;
    font-weight: 600;
    margin-bottom: 4px;
}

.video-view-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.video-preview-wrapper video {
    max-height: 400px !important;
}

@media (max-width: 640px) {
    .post-video {
        max-height: 400px;
    }
    
    .video-play-btn {
        width: 60px;
        height: 60px;
    }
    
    .video-play-btn svg {
        width: 36px;
        height: 36px;
    }
	
}


/* Right-side input panel layout */
.messages-conversation {
    display: flex !important;
    flex-direction: row;
    height: 100%;
    gap: 0;
}

.messages-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--border-color, #e0e0e0);
}

.messages-right-panel {
    width: 320px;
    display: flex;
    flex-direction: column;
    background: var(--background-secondary, #f9f9f9);
    padding: 16px;
}

.messages-right-panel .messages-input-container {
    flex-direction: column;
    gap: 12px;
    padding: 0;
    border: none;
    background: transparent;
}

.messages-right-panel textarea {
    min-height: 200px;
    max-height: 400px;
    resize: vertical;
}

.messages-right-panel .media-preview {
    margin-bottom: 12px;
    padding: 0;
}

.messages-right-panel .media-upload-btn,
.messages-right-panel .send-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

/* Mobile responsive - stack vertically */
@media (max-width: 768px) {
    .messages-conversation {
        flex-direction: column;
    }
    
    .messages-left-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color, #e0e0e0);
    }
    
    .messages-right-panel {
        width: 100%;
        padding: 12px;
    }
    
    .messages-right-panel textarea {
        min-height: 80px;
        max-height: 120px;
    }
}

@keyframes commentCountUpdate {
    0%, 100% { 
        transform: scale(1); 
        color: inherit;
    }
    50% { 
        transform: scale(1.3); 
        color: #ef4444; /* Red flash */
        font-weight: 700;
    }
}

@keyframes countFlash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* ========== LIGHT BACKGROUND OVERRIDES ========== */
.auth-screen {
    background: #fafafa !important;
    background-size: initial !important;
    animation: none !important;
}

.auth-screen::before {
    display: none !important;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.app-loader {
    background: #fafafa !important;
}

.loader-content {
    color: #1a1a1a !important;
}

.loader-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1) !important;
    border-top-color: #1a1a1a !important;
}

body {
    background: #fafafa !important;
}

.app-container {
    background: #fafafa !important;
}