        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
            --bg: #000000;
            --surface: #0a0a0a;
            --surface-elevated: #111111;
            --surface-hover: #1a1a1a;
            --surface-active: #222222;
            --text-main: #ffffff;
            --text-muted: #808080;
            --accent: #ffffff;
            --accent-bg: #000000;
            --error: #ff2a5f;
            --warning: #f5a623;
            --radius-sm: 8px;
            --radius-md: 14px;
            --radius-lg: 24px;
            --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            --transition: 0.35s cubic-bezier(0.25, 1, 0.5, 1);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
        body { background-color: var(--bg); color: var(--text-main); font-family: var(--font-family); -webkit-font-smoothing: antialiased; overflow: hidden; width: 100vw; height: 100dvh; }

        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: var(--bg); }
        ::-webkit-scrollbar-thumb { background: #333333; border-radius: 6px; }
        ::-webkit-scrollbar-thumb:hover { background: #555555; }

        a, button { cursor: pointer; border: none; background: none; font-family: inherit; transition: var(--transition); }
        input, textarea { font-family: inherit; transition: var(--transition); }
        
        .hidden { display: none !important; }
        .text-center { text-align: center; }
        .text-muted { color: var(--text-muted); }
        .w-full { width: 100%; }
        .h-full { height: 100%; }
        .flex { display: flex; }
        .flex-col { flex-direction: column; }
        .items-center { align-items: center; }
        .justify-center { justify-content: center; }
        .justify-between { justify-content: space-between; }
        .font-bold { font-weight: 700; }
        .mb-2 { margin-bottom: 0.5rem; }
        .mb-3 { margin-bottom: 0.75rem; }
        .mb-4 { margin-bottom: 1rem; }
        .mb-6 { margin-bottom: 1.5rem; }
        .mb-8 { margin-bottom: 2rem; }
        .mt-2 { margin-top: 0.5rem; }
        .mt-4 { margin-top: 1rem; }
        .gap-2 { gap: 0.5rem; }
        .gap-3 { gap: 0.75rem; }
        
        .p-2 { padding: 0.5rem; }
        .p-4 { padding: 1rem; }
        .text-xs { font-size: 0.75rem; }
        .text-sm { font-size: 0.875rem; }
        .tracking-widest { letter-spacing: 0.1em; }
        .bg-white { background-color: #ffffff; }
        .rounded-lg { border-radius: 0.5rem; }
        .inline-block { display: inline-block; }
        .border-b { border-bottom: 1px solid var(--surface-hover); }
        .border-surface-hover { border-color: var(--surface-hover); }
        .overflow-y-auto { overflow-y: auto; }
        .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .bg-surface-hover { background-color: var(--surface-hover); }

        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        @keyframes slide-up-fade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes heart-pop { 
            0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 
            25% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; } 
            75% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 
            100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; } 
        }
        @keyframes spin { 100% { transform: rotate(360deg); } }
        @keyframes slide-down-fade { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

        .smooth-fade-in { animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
        .spin { animation: spin 1s linear infinite; }

        .dump-logo {
            font-family: var(--font-family);
            font-weight: 800;
            color: var(--text-main);
            display: inline-block;
            transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            user-select: none;
            letter-spacing: -1px;
        }
        .dump-logo:active { transform: scale(0.9); }

        .view-section {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            opacity: 0; visibility: hidden; pointer-events: none;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            background-color: var(--bg); z-index: 1;
        }
        .view-section.active { opacity: 1; visibility: visible; pointer-events: auto; z-index: 5; }

        .input-group { position: relative; margin-bottom: 1.25rem; }
        .vc-input {
            width: 100%; background-color: var(--surface-elevated);
            border: 1px solid transparent; color: var(--text-main);
            padding: 24px 16px 8px 16px; border-radius: var(--radius-md);
            outline: none; font-size: 1rem;
        }
        .vc-input:focus { background-color: var(--surface-hover); }
        .vc-label {
            position: absolute; left: 16px; top: 16px;
            color: var(--text-muted); font-size: 1rem;
            pointer-events: none; transition: var(--transition);
        }
        .vc-input:focus ~ .vc-label, .vc-input:not(:placeholder-shown) ~ .vc-label {
            top: 6px; font-size: 0.75rem; font-weight: 500;
        }

        .vc-btn {
            background-color: var(--accent); color: var(--accent-bg);
            font-weight: 600; padding: 16px 24px; border-radius: var(--radius-md);
            display: inline-flex; align-items: center; justify-content: center;
            font-size: 1rem; width: 100%; gap: 8px; cursor: pointer; border: 1px solid transparent;
        }
        .vc-btn:active { transform: scale(0.98); }
        .vc-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .vc-btn-outline { background-color: transparent; color: var(--text-main); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-md); padding: 16px 24px; font-weight: 600; text-align: center; cursor: pointer;}
        .vc-btn-outline:hover { background-color: var(--surface-elevated); border-color: transparent; }
        .vc-btn-text { color: var(--text-muted); font-size: 0.9rem; margin-top: 1rem; }
        .vc-btn-text:hover { color: var(--text-main); }

        .nav-bar {
            position: fixed; top: 0; left: 0; width: 100%; padding: 1.25rem 1.5rem;
            display: flex; justify-content: space-between; align-items: center;
            z-index: 50; background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
            pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
        }
        .nav-bar.visible { opacity: 1; visibility: visible; pointer-events: auto; }
        .nav-brand { font-size: 2.2rem; cursor: pointer; }
        
        .nav-tabs { position: absolute; left: 50%; transform: translateX(-50%); display: flex; background: var(--surface-elevated); border-radius: 99px; padding: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
        .tab-indicator { position: absolute; top: 4px; bottom: 4px; left: 4px; background: var(--surface-active); border-radius: 99px; transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), width 0.3s cubic-bezier(0.25, 1, 0.5, 1); z-index: 0; pointer-events: none; }
        .nav-tab { padding: 6px 20px; border-radius: 99px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); transition: color 0.2s ease; position: relative; z-index: 1; }
        .nav-tab.active { color: var(--text-main); }

        .icon-btn {
            width: 44px; height: 44px; border-radius: 50%; background-color: var(--surface-elevated);
            color: var(--text-main); display: flex; align-items: center; justify-content: center;
            font-size: 1.2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        }
        .icon-btn:active { transform: scale(0.92); }

        .feed-container { position: relative; overflow: hidden; width: 100vw; height: 100dvh; touch-action: pan-y; }
        .feed-wrapper { display: flex; flex-direction: row; height: 100%; width: max-content; transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1); will-change: transform; transform: translateZ(0); }
        .post-card { flex: 0 0 100vw; width: 100vw; height: 100dvh; display: flex; justify-content: center; align-items: center; position: relative; }
        
        .post-wrapper { width: 100%; max-width: 450px; height: 82dvh; max-height: 850px; position: relative; background-color: var(--surface); border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transform: translateZ(0); }
        
        .post-overlay-bottom { position: absolute; bottom: 0; left: 0; width: 100%; padding: 4rem 1.5rem 1.5rem; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%); color: white; font-size: 1.05rem; line-height: 1.4; pointer-events: none; word-break: break-word; z-index: 20; }
        .post-overlay-bottom a, .post-overlay-bottom .hashtag { pointer-events: auto; } 
        
        .scrollable-overlay { max-height: 45dvh; overflow-y: auto; pointer-events: auto; overscroll-behavior: contain; }
        .post-text-content { pointer-events: auto; }
        
        .hashtag { color: #ffffff; font-weight: 700; cursor: pointer; transition: 0.2s; position: relative; z-index: 50; }
        .hashtag:hover { color: #e0e0e0; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }

        .image-slider { display: flex; width: 100%; height: 100%; position: relative; z-index: 10; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; transform: translateZ(0); }
        .slider-img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
        .slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 30; pointer-events: none; }
        
        .slider-dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.3); transition: width 0.3s, background-color 0.3s; position: relative; overflow: hidden; }
        .slider-dot.active { width: 32px; background: rgba(255,255,255,0.2); }
        .slider-dot.active::after {
            content: '';
            position: absolute;
            top: 0; left: 0; bottom: 0;
            width: 0%;
            background: #ffffff;
            animation: dot-progress 2s linear forwards;
        }
        .slider-dot.active.paused::after {
            animation-play-state: paused !important;
        }
        @keyframes dot-progress {
            0% { width: 0%; }
            100% { width: 100%; }
        }

        .post-author { position: absolute; top: 1.5rem; left: 1.5rem; display: flex; align-items: center; gap: 0.5rem; background: rgba(0,0,0,0.65); padding: 4px 12px 4px 4px; border-radius: 99px; cursor: pointer; z-index: 30; max-width: 60%; }
        .post-author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
        .author-name { font-size: 0.85rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .post-time { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-left: 2px; white-space: nowrap; }

        .post-actions { position: absolute; right: 1.5rem; bottom: 2rem; display: flex; flex-direction: column; gap: 1.2rem; z-index: 30; }
        .action-btn { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; color: white; cursor: pointer; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
        .action-btn .icon-bg { background: rgba(0,0,0,0.65); padding: 12px; border-radius: 50%; font-size: 1.6rem; transition: var(--transition); }
        .action-btn:active .icon-bg { transform: scale(0.9); }
        .action-btn span { font-size: 0.85rem; font-weight: 700; }

        .double-tap-heart { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); color: var(--error); font-size: 6rem; filter: drop-shadow(0 0 30px rgba(255,42,95,0.6)); z-index: 25; pointer-events: none; }
        .double-tap-heart.animating { animation: heart-pop 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

        .floating-comment { position: absolute; bottom: -50px; display: flex; align-items: center; gap: 10px; background: rgba(20, 20, 20, 0.95); padding: 6px 14px 6px 6px; border-radius: 99px; font-size: 0.9rem; pointer-events: none; z-index: 25; animation: floatUp 4.5s linear forwards; max-width: 80%; }
        .floating-comment img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
        .fc-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; overflow: hidden; }
        .fc-name { font-weight: 700; color: var(--text-muted); font-size: 0.65rem; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .fc-msg { color: white; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        @keyframes floatUp { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-300px); opacity: 0; } }

        .profile-container { padding: 6rem 1rem 2rem; max-width: 600px; margin: 0 auto; left: 0; right: 0; height: 100dvh; overflow-y: auto; }
        .profile-header { display: flex; align-items: center; gap: 2rem; margin-bottom: 1.5rem; }
        .profile-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; background: var(--surface-elevated); }
        .profile-stats { display: flex; gap: 2rem; margin-top: 1.2rem; }
        .stat-item { display: flex; flex-direction: column; align-items: center; }
        .stat-val { font-size: 1.4rem; font-weight: 800; }
        .stat-lbl { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
        
        .profile-tabs-wrapper { padding: 0 0.5rem; margin-bottom: 1rem; margin-top: 1rem; }
        .profile-tabs { position: relative; display: flex; background: var(--surface-elevated); border-radius: 12px; padding: 3px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); }
        .profile-tab-indicator { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); background: var(--surface-active); border-radius: 9px; transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); z-index: 0; }
        .profile-tab { flex: 1; padding: 10px 0; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 5px; transition: color 0.3s; }
        .profile-tab.active { color: var(--text-main); }

        .profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
        .grid-item { aspect-ratio: 1/1; background-color: var(--surface-elevated); overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
        .grid-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
        .grid-item img.loaded { opacity: 1; }
        .grid-item .text-preview { font-size: 0.75rem; padding: 0.5rem; text-align: center; color: var(--text-muted); word-break: break-word; line-height: 1.3; overflow-y: hidden; }
        .multi-img-icon { position: absolute; top: 6px; right: 6px; color: white; background: rgba(0,0,0,0.5); border-radius: 4px; padding: 2px; font-size: 0.8rem; z-index: 10;}

        .modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
        .modal-overlay.open { opacity: 1; visibility: visible; }
        .modal-bottom { align-items: flex-end; }
        
        .modal-content { background: var(--bg); width: 100%; max-width: 450px; border-radius: var(--radius-lg); padding: 1.5rem; position: relative; transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
        .modal-overlay.open .modal-content { transform: scale(1); }
        
        .modal-bottom .modal-content { background: var(--surface); border-radius: 24px 24px 0 0; height: 80dvh; max-height: 800px; display: flex; flex-direction: column; padding: 0; transform: translateY(100%); max-width: 600px; }
        .modal-overlay.open.modal-bottom .modal-content { transform: translateY(0); }

        .settings-tabs { display: flex; border-bottom: 1px solid var(--surface-hover); margin-bottom: 1.5rem; flex-shrink: 0; background: var(--bg); }
        .settings-tab { padding: 12px 16px; font-weight: 600; color: var(--text-muted); position: relative; white-space: nowrap; flex-shrink: 0; cursor: pointer; }
        .settings-tab.active { color: var(--text-main); }
        .settings-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--accent); border-radius: 2px; }
        .settings-panes { overflow-y: auto; flex: 1; min-height: 0; }
        #settingsModal > .modal-content { overflow: hidden; }

        .session-item { background: var(--surface-elevated); padding: 12px 16px; border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
        
        .comments-list { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
        .comment-item { display: flex; gap: 0.8rem; animation: slide-up-fade 0.3s ease forwards; position: relative; }
        .comment-item.is-reply { margin-left: 2.5rem; position: relative; }
        .comment-item.is-reply::before { content:''; position:absolute; left:-20px; top:0; width:2px; height:100%; background:var(--surface-hover); border-radius:2px;}
        .comment-item > img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; cursor: pointer; flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
        .comment-content { flex: 1; background: var(--surface-elevated); padding: 12px 16px; border-radius: 4px 16px 16px 16px; display: flex; flex-direction: column; }
        .comment-header { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
        .comment-author { font-weight: 700; font-size: 0.9rem; cursor: pointer; }
        .comment-time { font-size: 0.7rem; color: var(--text-muted); margin-left: 4px; }
        .comment-text { font-size: 0.95rem; line-height: 1.4; color: var(--text-main); word-break: break-word; }
        .comment-delete { color: var(--text-muted); cursor: pointer; transition: color 0.2s; font-size: 1.1rem; }
        .comment-delete:hover { color: var(--error); }
        
        .comment-actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 0.8rem; }
        .c-action-btn { 
            display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; 
            font-weight: 600; color: var(--text-muted); cursor: pointer; 
            transition: var(--transition); padding: 4px 10px; 
            border-radius: 99px; margin-left: -8px; background: transparent; 
        }
        .c-action-btn:hover { background: var(--surface-hover); color: var(--text-main); }
        .c-action-btn:active { transform: scale(0.95); }
        .c-action-btn i { font-size: 1.1rem; }
        
        .comment-input-area { padding: 1rem; border-top: 1px solid var(--surface-hover); display: flex; align-items: stretch; background: var(--surface); flex-direction: column; }
        .comment-input-wrapper { display: flex; gap: 0.5rem; align-items: flex-end; width: 100%; }
        .comment-input-wrapper textarea { flex: 1; background: var(--surface-elevated); border: none; color: white; outline: none; font-size: 0.95rem; padding: 12px 16px; border-radius: 20px; resize: none; max-height: 120px; min-height: 44px; overflow-y: hidden; }
        
        #replyingToIndicator { animation: slide-down-fade 0.2s ease forwards; }

        #toastContainer { position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; align-items: center; }
        .toast { background: var(--text-main); color: var(--bg); padding: 12px 24px; border-radius: 99px; font-weight: 600; font-size: 0.9rem; animation: toast-in 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards; box-shadow: 0 4px 20px rgba(0,0,0,0.4); text-align: center; max-width: 90vw; pointer-events: auto; }
        .toast.fade-out { animation: toast-out 0.3s forwards; }
        @keyframes toast-in { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
        @keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(0.9); } }

        .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text-muted); text-align: center; padding: 2rem; flex-grow: 1; }
        .empty-state i { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.4; }

        .auth-container { display: flex; align-items: center; justify-content: center; padding: 1rem; }
        .auth-card { width: 100%; max-width: 380px; margin: auto; }
        
        .search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); transition: var(--transition); cursor: pointer; }
        .search-result-item:hover { background: var(--surface-elevated); }
        .search-result-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
        .search-result-post { border-radius: 8px; width: 44px; height: 44px; }
        .search-section-title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin: 1rem 0 0.5rem 0.5rem; letter-spacing: 0.5px; }

        .loader-screen { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; flex: 1; min-height: 200px; }
        
        .big-preview { position: relative; width: 100%; height: 350px; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 1rem; background: var(--surface-elevated); }
        .big-preview img { width: 100%; height: 100%; object-fit: cover; }
        .big-preview .overlay-btn { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; cursor: pointer; }
        .big-preview:hover .overlay-btn { opacity: 1; }
        .big-preview .remove-btn { position: absolute; top: 12px; right: 12px; background: rgba(255,42,95,0.8); color: white; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; z-index: 10; cursor: pointer; font-size: 1.2rem; transition: var(--transition); }
        .big-preview .remove-btn:hover { background: rgba(255,42,95,1); transform: scale(1.1); }
        
        .preview-grid { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; margin-bottom: 1rem; }
        .preview-grid::-webkit-scrollbar { height: 4px; }
        .preview-item { position: relative; width: 80px; height: 80px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
        .preview-item img { width: 100%; height: 100%; object-fit: cover; }
        .preview-item .remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.7); color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; }
        .add-more-grid-item { border: 2px dashed var(--surface-hover); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; border-radius: 8px; flex-shrink: 0; width: 80px; height: 80px; transition: var(--transition); }
        .add-more-grid-item:hover { background: var(--surface-hover); color: white; border-color: transparent; }

        .toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--surface-hover); transition: .4s; border-radius: 20px; }
        .toggle-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: var(--text-muted); transition: .4s cubic-bezier(0.25, 1, 0.5, 1); border-radius: 50%; }
        .toggle-switch input:checked + .toggle-slider { background-color: var(--text-main); }
        .toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); background-color: var(--bg); }
        .toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

        .radio-group { display: flex; gap: 1rem; margin-bottom: 1rem; }
        .radio-label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--surface-elevated); border: 2px solid transparent; border-radius: var(--radius-md); cursor: pointer; font-weight: 600; transition: var(--transition); }
        .radio-label input { display: none; }
        .radio-label input:checked + span { color: var(--accent); }
        .radio-label:has(input:checked) { border-color: var(--accent); background: rgba(255,255,255,0.05); }

        .legal-link { color: var(--text-muted); font-size: 0.85rem; cursor: pointer; transition: color 0.2s, opacity 0.2s; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,0.15); }
        .legal-link:hover { color: var(--text-main); text-decoration-color: var(--text-main); }
        .legal-consent { font-size: 0.72rem; line-height: 1.5; margin-bottom: 0; text-align: center; color: #444; }
        .legal-consent .legal-link { color: #555; text-decoration-color: rgba(255,255,255,0.15); font-weight: 400; }
        .legal-consent .legal-link:hover { color: white; }
        .auth-footer-links { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--surface-hover); }

        #captchaWidget iframe { border: 0; border-radius: var(--radius-md); overflow: hidden; }

        .profile-bio { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
        .profile-bio br { flex-basis: 100%; height: 0; }
        .bio-link-pill {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 5px 12px 5px 6px; border-radius: 99px;
            background: var(--surface-elevated); border: 1px solid var(--surface-hover);
            color: var(--text-main); font-size: 0.82rem; font-weight: 600;
            text-decoration: none; max-width: 100%; transition: background 0.2s, transform 0.2s;
        }
        .bio-link-pill:hover { background: var(--surface-hover); }
        .bio-link-pill:active { transform: scale(0.96); }
        .bio-link-favicon { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-active); }
        .bio-link-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        .legal-body { overflow-y: auto; padding: 0 0.25rem 0.5rem; font-size: 0.95rem; line-height: 1.65; color: #d4d4d4; }
        .legal-body h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin: 1.5rem 0 0.75rem; }
        .legal-body h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-main); margin: 1.5rem 0 0.6rem; }
        .legal-body h3 { font-size: 1rem; font-weight: 700; color: var(--text-main); margin: 1.2rem 0 0.5rem; }
        .legal-body p { margin: 0.5rem 0; }
        .legal-body ul, .legal-body ol { margin: 0.5rem 0 0.5rem 1.25rem; }
        .legal-body li { margin: 0.3rem 0; }
        .legal-body a { color: #6ea8fe; text-decoration: underline; text-underline-offset: 2px; }
        .legal-body a:hover { color: #9bc1fe; }
        .legal-body hr { border: none; border-top: 1px solid var(--surface-hover); margin: 1.25rem 0; }
        .legal-body blockquote { border-left: 3px solid var(--surface-hover); padding-left: 0.75rem; color: var(--text-muted); margin: 0.75rem 0; }
        .legal-body code { background: var(--surface-elevated); padding: 1px 6px; border-radius: 6px; font-size: 0.85em; }
        .legal-body strong { color: var(--text-main); }

        /* ─── Bottom Navigation ─── */
        .bottom-nav {
            position: fixed; bottom: 0; left: 0; right: 0; height: 56px;
            background: var(--surface);
            border-top: 1px solid var(--surface-hover);
            display: none; align-items: center; justify-content: space-around;
            z-index: 60;
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }
        .bottom-nav.visible { display: flex; }
        .bottom-nav-item {
            display: flex; align-items: center; justify-content: center;
            flex: 1; height: 100%;
            color: var(--text-muted);
            -webkit-tap-highlight-color: transparent;
            padding: 0; position: relative;
            transition: color 0.2s;
        }
        .bottom-nav-item i {
            font-size: 1.4rem; transition: transform 0.15s, color 0.2s;
        }
        .bottom-nav-item.active { color: var(--text-main); }
        .bottom-nav-item:active i { transform: scale(0.85); }
        .bottom-nav-item[data-nav="create"] i {
            font-size: 1.5rem;
        }

        /* ─── Mobile: только то, что реально нужно ─── */
        @media (max-width: 768px) {
            .post-wrapper {
                max-width: 100%; width: 100%;
                height: calc(100dvh - 112px); max-height: none;
                border-radius: 0;
            }
            .post-actions {
                right: 0.75rem; bottom: 1.5rem; gap: 0.8rem;
            }
            .action-btn .icon-bg {
                padding: 14px; font-size: 1.8rem;
            }
            .action-btn span { font-size: 0.75rem; }
            .post-author {
                top: 1rem; left: 1rem;
                max-width: 70%;
            }
            .double-tap-heart { font-size: 5rem; }
            .nav-bar {
                padding: 0.6rem 1rem;
                padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
            }
            .nav-brand { font-size: 2rem; }
            .nav-tabs { left: auto; right: 16px; transform: none; padding: 3px; }
            .nav-tab { padding: 5px 16px; font-size: 0.78rem; }
            .icon-btn {
                width: 40px; height: 40px; font-size: 1.1rem;
            }
            body {
                padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
            }
            .post-card {
                height: 100dvh;
            }
            .profile-container {
                padding: 4.5rem 0.75rem 1.5rem;
                height: 100dvh;
                padding-bottom: calc(1.5rem + 56px + env(safe-area-inset-bottom, 0px));
            }
            .profile-header {
                flex-direction: column; text-align: center; gap: 0.75rem;
            }
            .profile-stats { justify-content: center; gap: 1.5rem; }
            .profile-header > div:last-child { display: flex; flex-direction: column; align-items: center; }
            .profile-avatar { width: 80px; height: 80px; }
            .auth-container { padding: 0; }
            .auth-card { max-width: 100%; padding: 0.5rem; }
            .modal-content {
                max-width: 100%; border-radius: 16px;
                width: calc(100% - 16px); margin: 8px;
            }
            .modal-overlay:not(.modal-bottom) .modal-content {
                min-height: auto; border-radius: 16px;
                max-height: 90dvh; overflow-y: auto;
            }
            .modal-bottom .modal-content {
                width: 100%; margin: 0;
                border-radius: 24px 24px 0 0;
                max-height: 92dvh;
            }
            .search-result-item { padding: 14px; }
            .comment-input-wrapper textarea { font-size: 0.9rem; padding: 10px 14px; }
            .auth-footer-links { font-size: 0.8rem; gap: 8px; }
            .settings-tab { padding: 8px 12px; font-size: 0.85rem; }

            /* Скрываем дублирующие кнопки в топ-баре на мобилках */
            #mainNav .icon-btn { display: none; }
            #navBackBtn { display: flex; }
            #mainNav.show-notif-btn #navNotifBtn { display: flex !important; }
            .bottom-nav { display: flex; }
            .bottom-nav.visible { display: flex; }
        }

        @media (min-width: 769px) {
            .bottom-nav { display: none !important; }
        }

        @media (max-width: 380px) {
            .post-wrapper { height: calc(100dvh - 100px); }
            .post-actions { right: 0.5rem; gap: 0.6rem; }
            .action-btn .icon-bg { padding: 10px; font-size: 1.5rem; }
            .nav-brand { font-size: 1.8rem; }
            .nav-tabs { left: auto; right: 12px; transform: none; padding: 2px; }
            .nav-tab { padding: 4px 12px; font-size: 0.72rem; }
            .bottom-nav { height: 50px; }
            .bottom-nav-item i { font-size: 1.3rem; }
            body { padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px)); }
        }

        .notif-badge {
            position: absolute; top: -2px; right: -2px;
            background: var(--error); color: white;
            font-size: 0.65rem; font-weight: 700;
            min-width: 18px; height: 18px;
            border-radius: 99px; display: flex;
            align-items: center; justify-content: center;
            padding: 0 4px; line-height: 1;
            border: 2px solid var(--bg);
            pointer-events: none;
        }
        .notif-badge-bottom {
            position: absolute; top: 4px; right: calc(50% - 16px);
            background: var(--error); color: white;
            font-size: 0.6rem; font-weight: 700;
            min-width: 16px; height: 16px;
            border-radius: 99px; display: flex;
            align-items: center; justify-content: center;
            padding: 0 3px; line-height: 1;
            pointer-events: none;
        }
        .notif-item {
            display: flex; align-items: center; gap: 12px;
            padding: 14px 12px; border-radius: var(--radius-md);
            cursor: pointer; transition: background 0.2s;
            position: relative; overflow: hidden;
        }
        .notif-item:hover { background: var(--surface-elevated); }
        .notif-item:active { background: var(--surface-active); }
        .notif-item > * { position: relative; z-index: 1; }
        .notif-unread { background: rgba(255,255,255,0.03); }
        .notif-unread::before {
            content: ''; position: absolute; left: 0; top: 50%;
            transform: translateY(-50%); width: 4px; height: 60%;
            background: var(--accent); border-radius: 0 4px 4px 0;
        }
        .notif-item { position: relative; }
        .notif-avatar {
            width: 44px; height: 44px; border-radius: 50%;
            object-fit: cover; flex-shrink: 0;
        }
        .notif-avatar-placeholder {
            width: 44px; height: 44px; border-radius: 50%;
            background: var(--surface-elevated); flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
        }
        .notif-body { flex: 1; min-width: 0; }
        .notif-text {
            font-size: 0.9rem; line-height: 1.35;
            color: var(--text-main);
            overflow: hidden; text-overflow: ellipsis;
            display: -webkit-box; -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .notif-text b { font-weight: 700; }
        .notif-time {
            font-size: 0.75rem; color: var(--text-muted);
            margin-top: 3px;
        }
        .notif-icon-indicator {
            flex-shrink: 0; font-size: 1.2rem;
            display: flex; align-items: center;
        }

        .notifications-container {
            display: flex; flex-direction: column;
            overflow: hidden;
            max-width: 600px;
            left: 50%; transform: translateX(-50%);
        }
        .notif-page-header {
            padding: 5rem 1.5rem 1rem;
            border-bottom: 1px solid var(--surface-hover);
            background: var(--bg);
            flex-shrink: 0;
        }
        .notif-scroll-area {
            flex: 1; overflow-y: auto; padding: 0.5rem 1rem 2rem;
        }
        .notif-pulse {
            animation: notifPulse 2s ease-in-out infinite;
        }
        @keyframes notifPulse {
            0%, 100% { color: var(--text-muted); }
            50% { color: var(--error); }
        }
        .notif-badge-profile {
            position: absolute; top: -4px; right: -4px;
            background: var(--error); color: white;
            font-size: 0.6rem; font-weight: 700;
            min-width: 16px; height: 16px;
            border-radius: 99px; display: flex;
            align-items: center; justify-content: center;
            padding: 0 3px; line-height: 1;
            pointer-events: none;
        }
        @media (max-width: 768px) {
            .notif-page-header {
                padding: 4rem 1rem 0.75rem;
                padding-top: calc(4rem + env(safe-area-inset-top, 0px));
            }
            .notif-scroll-area {
                padding-bottom: calc(2rem + 56px);
            }
        }


