@import url('google_fonts.css');

.mobile-fab {
    display: none !important;
}

.profile-owner-controls { display: flex; }

* {
    box-sizing: border-box;
}

html, body {
    position: relative;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette - 2026 SaaS (Modern Slate) */
    --bg-main: #f8fafc;
    --bg-sidebar: rgba(255, 255, 255, 0.7);
    --bg-card: var(--bg-card, #ffffff);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent: #0f172a;
    --accent-soft: rgba(15, 23, 42, 0.04);
    --leylek-accent: #3b82f6;
    
    --border: #e2e8f0;
    --border-focus: #0f172a;
    
    /* Typography */
    --font-heading: 'Fraunces', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --spacing-unit: 8px;
    --sidebar-width: 260px;
    --right-sidebar-width: 280px;
    
    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
}

/* Subtle Paper Texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent);
}

.text-huge {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-style: italic;
    letter-spacing: -0.02em;
}

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}

/* --- Layout --- */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--right-sidebar-width);
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.sidebar-spacer {
    display: none !important;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from space-between to allow natural scrolling */
    gap: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    align-self: start;
}

/* Right Sidebar */
.right-sidebar-spacer {
    display: none !important;
}

.right-sidebar {
    width: var(--right-sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    z-index: 1000;
    align-self: start;
}

.right-sidebar-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.recent-user-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    transition: var(--transition-base);
    text-decoration: none;
    color: inherit;
}

.recent-user-item:hover {
    background: rgba(56, 33, 16, 0.04);
}

.recent-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--bg-card);
    box-shadow: var(--shadow-sm);
}

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

.recent-user-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.recent-user-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.recent-user-flag {
    width: 16px;
    height: auto;
    border-radius: 2px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.04em;
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: var(--leylek-accent);
}

.logo-text span {
    color: #93c5fd;
    font-style: normal;
    font-size: 0.7em;
    font-weight: 400;
}

.nav-menu {
    margin-top: 1rem;
    flex: 1;
}

.nav-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 1rem;
    margin: 0.05rem -0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    border-radius: 10px;
    position: relative;
}

.nav-link i {
    color: var(--text-muted);
    transition: var(--transition-base);
}

.nav-link:hover {
    background: rgba(56, 33, 16, 0.03);
    color: var(--accent);
}

.nav-link:hover i {
    color: var(--accent);
    transform: scale(1.1);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(56, 33, 16, 0.05);
}

.nav-link.active i {
    color: var(--accent);
}

.nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background: var(--accent);
    border-radius: 10px;
}

.user-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.user-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-heading);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
    min-width: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-width-wrapper {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Responsive Layout --- */

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 2000;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

/* Bottom Nav */
.bottom-nav {
    display: none;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 65px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 9999 !important;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
}

.bottom-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    flex: 1;
}

.bottom-nav-link i {
    font-size: 1.25rem;
}


.bottom-nav-link.active {
    color: var(--leylek-accent);
}

.bottom-nav-link span {
    display: none;
}

/* --- Components --- */
.avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50%;
    user-select: none;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

/* Post units - Twitter Style Sharpening */
.post-card {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border) !important;
    padding: 6px 1.25rem 3px 1.25rem !important;
    margin-bottom: 0 !important;
    transition: background 0.1s ease;
    position: relative !important;
}

@media (max-width: 768px) {
    .post-card {
        padding: 1.5rem 1rem !important;
    }
}

.post-card:hover {
    background: rgba(0,0,0,0.01);
}

.post-content-wrap, .comment-content-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px !important;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 400;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    max-width: 100% !important;
}

.post-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.post-card-new:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--text-muted);
}

.post-meta-top {
    margin-bottom: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 110px;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--leylek-accent);
}

@media (max-width: 768px) {
    .stat-card {
        flex: 1 1 calc(50% - 1rem);
        padding: 1rem;
    }
}

/* Forms */
.input-minimal {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0 !important; /* Sharp edges requested */
    padding: 1.25rem 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition-base);
}

.input-minimal:focus {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: none;
}

/* Django Form Inputs */
.form-input, .input-wrapper input, .input-wrapper textarea, .input-wrapper select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1rem 12px;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-base);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(56, 33, 16, 0.05);
}

/* Buttons */
.btn-editorial {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 10px;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-editorial:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Public Layout */
.public-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.public-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

/* Collection Table */
.collection-table {
    width: 100%;
}

.collection-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: var(--transition-base);
}

.collection-row:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.collection-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent);
}

/* Auth Cards */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 3.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.auth-header h2 {
    font-style: italic;
    font-size: 2.25rem;
}

/* Post Units - Minimalist Stream Style */
.post-stream {
    display: flex;
    flex-direction: column;
    max-width: 650px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    overflow: hidden;
}

.post-unit {
    padding: 2.5rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition-base);
}

.post-unit:last-child {
    border-bottom: none;
}

.post-unit:hover {
    background: var(--bg-main);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.post-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.post-text p {
    margin-bottom: 1rem;
}

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

.animate-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Editorial Section Styling --- */
.section-editorial {
    margin-bottom: 1rem;
    position: relative;
}

.section-header-editorial {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem 1.25rem;
    border-left: 4px solid var(--accent);
    background: linear-gradient(to right, var(--accent-soft), transparent);
    border-radius: 0 4px 4px 0;
}

.dark-mode .section-header-editorial {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), transparent);
    border-left-color: var(--accent);
}

.section-index {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.8;
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: 0.2em;
}

.section-divider-editorial {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2.5rem 0;
    position: relative;
}

.section-divider-editorial::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

.dark-mode .section-divider-editorial::before {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.section-divider-editorial::after {
    content: "•";
    color: var(--accent);
    background: var(--bg-card);
    padding: 0 1rem;
    font-size: 1.2rem;
    z-index: 1;
}

.section-title-wrap {
    flex: 1;
}

.section-title-editorial {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
    margin: 0;
}

.section-subtitle-editorial {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

.section-icon-wrap {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.section-editorial:hover .section-icon-wrap {
    transform: rotate(-5deg) scale(1.05);
}
/* Tom Select Dark Mode Overrides */
.dark-mode .ts-control, 
.dark-mode .ts-control input {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

.dark-mode .ts-wrapper.single .ts-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
}

.dark-mode .ts-dropdown {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

.dark-mode .ts-dropdown .option {
    color: var(--text-primary) !important;
}

.dark-mode .ts-dropdown .active {
    background-color: var(--accent) !important;
    color: white !important;
}

.dark-mode .ts-dropdown .create:hover, 
.dark-mode .ts-dropdown .option:hover {
    background-color: var(--accent) !important;
    color: white !important;
}
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden !important;
        position: relative;
        width: 100vw !important;
    }
    .app-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .sidebar, .sidebar-spacer, .right-sidebar, .right-sidebar-spacer, .sidebar-hub-tab, #chart-section-container, .right-sidebar-title, #sidebar-toggle, .sidebar-toggle {
        display: none !important;
        visibility: hidden !important;
    }

    /* Profile Page Mobile Redesign */
    .profile-owner-controls, #profile-owner-controls-bar {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .profile-header-body {
        padding: 0 1rem 2rem 1rem !important;
        margin-top: -40px !important;
    }
    .profile-header-inner {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }
    .profile-avatar-wrapper {
        margin-bottom: 0.5rem !important;
    }
    .profile-avatar-wrapper .avatar-box {
        width: 120px !important;
        height: 120px !important;
    }
    .profile-header-content {
        width: 100% !important;
        padding-bottom: 0 !important;
    }
    .profile-name-section {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
    }
    .profile-name-section h1 {
        font-size: 1.4rem !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        margin-bottom: 0.25rem !important;
    }
    .profile-stats-row {
        width: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        gap: 1rem !important;
        padding: 0.5rem 1rem !important;
        box-sizing: border-box !important;
        background: transparent !important;
        border: none !important;
    }
    .profile-stats-row a span, .profile-stats-row div span {
        font-size: 0.9rem !important;
    }
    .profile-stats-row i {
        font-size: 0.7rem !important;
    }
    .profile-stats-row div[style*="width: 1px"] {
        height: 12px !important;
    }

    .profile-info-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 0 1rem !important;
    }
    .profile-info-grid section, .profile-info-grid > div {
        width: 100% !important;
    }
    .profile-info-grid .glass-card {
        padding: 1.5rem !important;
    }

    .profile-personal-details {
        justify-content: center !important;
        gap: 3rem !important;
        text-align: center !important;
    }
    .mobile-header {
        display: flex !important;
        width: 100% !important;
    }
    /* Show bottom nav on tablets too (769px – 1024px) */
    .bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px !important;
        background: var(--bg-sidebar) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid var(--border) !important;
        z-index: 10000 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
        align-items: center !important;
        justify-content: space-around !important;
    }
    .bottom-nav-link {
        flex: 1 !important;
        height: 60px !important;
        display: grid !important;
        place-items: center !important;
        text-decoration: none !important;
        color: var(--text-muted) !important;
        transition: all 0.2s ease !important;
    }
    .bottom-nav-link i {
        font-size: 1.6rem !important;
    }
    .bottom-nav-link.active {
        color: var(--leylek-accent) !important;
    }
    .main-content {
        padding: 60px 0.5rem calc(60px + 1rem) 0.5rem !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        margin: 0 !important;
    }
    .content-width-wrapper {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* Typography Scaling */
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.2rem !important; }
    
    /* Tap Targets */
    .btn-editorial, .nav-link, .bottom-nav-link, .btn-tag, .filter-chip, .bottom-nav-link i, .hamburger-btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Sidebar Toggle Logic */
    .sidebar-open .sidebar {
        display: flex !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        width: 280px !important;
        height: calc(100vh - 60px) !important;
        z-index: 3000 !important;
        background: var(--bg-card) !important;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1) !important;
        animation: slideInLeft 0.3s ease forwards !important;
    }
    
    @keyframes slideInLeft {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }

    /* Profile Page Overrides */
    .profile-header-container {
        padding: 2rem 1.25rem !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-top: -40px !important;
    }
    .profile-header-container .avatar-box {
        width: 120px !important;
        height: 120px !important;
        margin-bottom: 1rem !important;
    }
    .profile-info-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .profile-stats-row {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    .profile-actions-wrapper {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        margin-top: 1rem !important;
        justify-content: center !important;
    }

    /* Global Grid Collapse */
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .glass-card {
        padding: 2rem 1.25rem !important;
    }

    /* Edit Profile Specifics */
    .status-bar {
        margin: -2rem -1.25rem 2rem -1.25rem !important;
        padding: 0.75rem 1rem !important;
    }
    #sticky-save-footer {
        padding: 1rem !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    #sticky-save-footer button {
        width: 100% !important;
    }

    /* Hub Local Content */
    .local-content-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .local-nav {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
    }
    .hub-tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 1.5rem !important;
        padding-bottom: 1rem !important;
        margin: 0 -0.75rem 1.5rem -0.75rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        scrollbar-width: none !important;
    }
    .hub-tabs::-webkit-scrollbar { display: none !important; }
}

@media (max-width: 768px) {
    /* Identity Bar (Top Header) */
    .mobile-header {
        display: flex !important;
        position: sticky !important;
        top: 0 !important;
        height: 60px !important;
        width: 100% !important;
        background: var(--bg-sidebar) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid var(--border) !important;
        z-index: 2000 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        padding: 0 1rem !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .header--hidden {
        transform: translateY(-100%) !important;
    }

    .mobile-header-actions {
        display: flex !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    .mobile-action-btn {
        min-width: 48px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--text-secondary) !important;
        text-decoration: none !important;
        font-size: 1.25rem !important;
    }

    /* Action Bar (Bottom Navigation) */
    .bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px !important;
        background: var(--bg-sidebar) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid var(--border) !important;
        z-index: 10000 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
        align-items: center !important;
        justify-content: space-around !important;
    }

    .bottom-nav-link {
        flex: 1 !important;
        height: 60px !important;
        display: grid !important;
        place-items: center !important;
        text-decoration: none !important;
        color: var(--text-muted) !important;
        transition: all 0.2s ease !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .bottom-nav-link i {
        font-size: 1.6rem !important;
        width: 1em !important;
        height: 1em !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        vertical-align: middle !important;
    }

    .bottom-nav-link i.fa-plus {
        transform: translateY(2px) !important;
    }

    .bottom-nav-link span {
        display: none !important;
    }

    .bottom-nav-link.active {
        color: var(--leylek-accent) !important;
    }

    .bottom-nav-link.create-btn {
        transform: none !important;
    }

    /* Content Adjustment */
    .main-content {
        padding-top: 75px !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        margin-top: 0 !important;
    }

    /* Global UI Tweaks */
    .post-card {
        padding: 1.25rem 1rem 0.625rem 1rem !important;
        border-radius: 0 !important; /* Mobile feed looks better with flush edges or very small radius */
        margin-bottom: 0 !important;
    }
    
    .logo-text {
        font-size: 1.3rem !important;
    }

    /* Hanging New Post Button (Twitter-style FAB) */
    .mobile-fab {
        display: flex !important;
        position: fixed !important;
        bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        background-color: #1d9bf0 !important; /* Twitter Blue */
        color: white !important;
        border-radius: 50% !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 8px 24px rgba(29, 155, 240, 0.4) !important;
        z-index: 9999 !important;
        text-decoration: none !important;
        transition: transform 0.2s ease, background-color 0.2s ease !important;
    }
    .mobile-fab:active {
        transform: scale(0.95) !important;
        background-color: #1a8cd8 !important;
    }
    .mobile-fab i {
        font-size: 1.5rem !important;
        color: white !important;
    }
}

/* --- Post Card Styles from post_list_snippet.html --- */
.post-card { position: relative; }
.post-card:hover { background: var(--bg-main) !important; }
.post-card:active { transform: scale(0.995); }

/* Space between pinned and normal posts */
.pinned-post-card + :not(.pinned-post-card) {
    border-top: 16px solid var(--bg-main) !important;
}

/* Pinned Post Styles */
.pinned-post-content-collapsed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media screen and (max-width: 768px) {
    .pinned-post-content-collapsed {
        -webkit-line-clamp: 2;
    }
}
@media screen and (min-width: 769px) {
    .pinned-post-content-collapsed {
        -webkit-line-clamp: 5;
    }
}

/* Post Images Gallery Scrollbar */
.post-images-gallery::-webkit-scrollbar { display: none; }


/* --- Styles relocated from global_feed.html --- */

/* Custom Leaflet Overrides */
.leaflet-container {
    background: #f5f0e8;
    font-family: var(--font-body);
}
.dark-mode .leaflet-container {
    background: #252e3e;
}
.dark-mode .leaflet-tile {
    filter: brightness(4.0) contrast(0.55) saturate(1.2) !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    font-family: var(--font-body);
}

.leaflet-popup-tip {
    box-shadow: none;
}

.city-marker {
    background: var(--accent);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 11px;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: default;
    transition: none;
}

.city-marker:hover {
    transform: none;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(74, 60, 49, 0.15) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: var(--accent) !important;
    color: white !important;
    font-family: var(--font-mono) !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
}

@keyframes slowZoomPan {
    from {
        transform: scale(1.1) translateX(0);
    }
    to {
        transform: scale(1.25) translateX(-3%);
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section-premium {
    text-align: left; 
    padding: 0; 
    overflow: hidden; 
    border: 1px solid var(--border); 
    display: flex; 
    align-items: stretch; 
    min-height: 400px; 
    background: var(--bg-card); 
    animation: heroFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: var(--shadow-md); 
    margin-bottom: 4rem;
    width: 100%;
    box-sizing: border-box;
}
.hero-actions-group {
    display: flex; 
    gap: 1.25rem; 
    align-items: center;
}
@media (max-width: 1024px) {
    .hero-section-premium {
        flex-direction: column !important;
        min-height: auto !important;
        margin-bottom: 2rem !important;
    }
    .hero-image-wrap {
        height: 200px !important;
        flex: none !important;
    }
    .hero-content-wrap {
        padding: 2rem 1.25rem !important;
    }
    .hero-content-wrap h1 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }
    .hero-content-wrap p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        padding-left: 1rem !important;
    }
    .hero-actions-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    .hero-actions-group a {
        text-align: center !important;
        width: 100% !important;
        padding: 0.85rem 1.5rem !important;
    }
}

.feed-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}
.view-switch-link {
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(56, 33, 16, 0.05);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.view-switch-link:hover {
    background: var(--accent);
    color: white;
    transform: translateX(3px);
}
.posting-box-premium {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}
.posting-box-premium:focus-within {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.post-input-area {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    resize: none;
    min-height: 30px;
    color: var(--text-primary);
    background: transparent;
    border-radius: 0px !important;
}
.post-input-area::placeholder { color: var(--text-muted); }

/* ── Hub Filter Pills ── */
.filter-pill {
    flex: 0 0 auto;
    padding: 0.5rem 1.25rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}
.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 126, 95, 0.3);
}

@media (max-width: 1024px) {
    .feed-header-compact {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: flex-start !important;
        padding-bottom: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .posting-box-premium {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
        width: 100% !important;
    }
    .post-input-area {
        font-size: 0.95rem !important;
    }
    .filter-scroll-container {
        display: flex !important;
        overflow-x: auto !important;
        gap: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        margin: 0 -0.75rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .filter-scroll-container::-webkit-scrollbar {
        display: none !important;
    }
    .feed-tab {
        padding: 0.6rem 0.5rem !important;
        font-size: 10px !important;
        white-space: nowrap !important;
    }
    #world-map {
        height: 350px !important;
    }
}

@media (max-width: 768px) {
    .feed-main-container {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .posting-box-premium {
        display: none !important;
    }

    .posting-box-premium.show-mobile-create {
        display: block !important;
        margin-bottom: 1.5rem !important;
    }

    .timeline-controls-bar {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0 0.25rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 1rem !important;
    }

    .timeline-controls-bar .hub-select-container {
        width: 140px !important;
    }

    .timeline-controls-bar select {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    .timeline-controls-bar .feed-tab {
        padding: 0.5rem 0.75rem !important;
    }

    .timeline-controls-bar .feed-tab .tab-text {
        display: none !important;
    }

    .timeline-controls-bar .feed-tab i {
        margin: 0 !important;
        font-size: 0.95rem !important;
    }

    .desktop-timeline-tabs {
        display: none !important;
    }

    .mobile-members-container {
        display: block !important;
    }
}

.mobile-members-container {
    display: none;
}

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

.mobile-recent-user-item {
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.mobile-recent-user-item:hover, .mobile-recent-user-item:focus {
    background-color: var(--accent-soft) !important;
}
.mobile-recent-user-item:active {
    transform: scale(0.98);
}

.hub-toggle-btn {
    color: var(--text-muted) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.hub-toggle-btn.active {
    color: white !important;
    background: var(--accent) !important;
    box-shadow: 0 4px 10px rgba(56, 33, 16, 0.15);
}
.hub-toggle-btn:not(.active):hover {
    color: var(--accent) !important;
    background: var(--bg-card) !important;
}
@media (max-width: 768px) {
    .hub-toggle-container {
        padding: 2px !important;
    }
    .hub-toggle-btn {
        padding: 0.4rem 0.65rem !important;
        font-size: 9px !important;
    }
}

#timeline-push-banner {
    display: none;
}
@media (max-width: 768px) {
    #timeline-push-banner {
        margin: 0 auto 1.5rem !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.feed-main-container {
    padding-top: 1rem;
}

.timeline-controls-bar .feed-tab {
    flex: none !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.25rem !important;
}

.feed-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.05em;
}
.feed-tab:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.5);
}
.feed-tab.active {
    color: white;
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(56, 33, 16, 0.15);
}
.feed-tab i { font-size: 0.8rem; }

.like-btn {
    opacity: 0.6;
}

.like-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.like-btn.liked {
    opacity: 1;
}

.like-btn.liked .likes-count {
    color: #e63946;
}

/* Emoji Picker Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.emoji-item:hover {
    background: var(--bg-sidebar);
    transform: scale(1.2);
}

.btn-toolbar-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--accent);
    background: rgba(56, 33, 16, 0.05);
    border: 1px solid rgba(56, 33, 16, 0.1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}

.btn-toolbar-icon:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 33, 16, 0.2);
    border-color: var(--accent);
}

.btn-toolbar:hover {
    border-color: var(--accent) !important;
    background: white !important;
}

/* Responsive Posting Box */
.posting-avatar {
    display: none;
}

/* Compose Post Actions styles */
.post-actions-left {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}
.post-actions-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pin-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    margin-left: 0.5rem;
}
.post-submit-btn {
    margin-left: auto;
}

@media (min-width: 600px) {
    .posting-avatar {
        display: block;
    }
}

@media (max-width: 600px) {
    .posting-card form {
        padding: 1.5rem !important;
    }

    .forum-post-card {
        padding: 1.5rem !important;
    }

    .forum-post-card h3 {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 768px) {
    #post-actions {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }
    .post-actions-left {
        gap: 0.75rem !important;
        width: 100% !important;
        justify-content: space-between !important;
    }
    .post-actions-tools {
        gap: 0.5rem !important;
    }
    .post-actions-tools .btn-toolbar-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
    .pin-checkbox-label {
        margin-left: 0.25rem !important;
        font-size: 9px !important;
        gap: 0.25rem !important;
    }
    .post-submit-btn {
        padding: 0.5rem 1.5rem !important;
        font-size: 0.7rem !important;
        border-radius: 50px !important;
    }
}

@keyframes slideDownPost {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        padding-top: 6px;
        padding-bottom: 3px;
        transform: translateY(0);
    }
}

.new-post-incoming {
    animation: slideDownPost 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

#new-posts-pill:hover {
    background: var(--accent-hover, #d95d43) !important;
    transform: translateX(-50%) translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(239, 126, 95, 0.4) !important;
}

#new-posts-pill:active {
    transform: translateX(-50%) translateY(0) scale(1) !important;
    box-shadow: 0 2px 10px rgba(239, 126, 95, 0.2) !important;
}

/* --- Post Card Skeleton Loader --- */
.post-card-skeleton {
    border-radius: 10px;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.dark-mode .skeleton-shimmer {
    background: #334155;
}

.skeleton-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer-anim 1.6s infinite;
}

.dark-mode .skeleton-shimmer::after {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0) 100%
    );
}

@keyframes shimmer-anim {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
}

.skeleton-line.username {
    width: 100px;
    height: 14px;
}

.skeleton-line.date {
    width: 60px;
    height: 10px;
}

.skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.25rem 0 0.5rem 0;
}

.skeleton-body .line-1 {
    width: 90%;
}

.skeleton-body .line-2 {
    width: 75%;
}

.skeleton-body .line-3 {
    width: 40%;
}

.skeleton-footer {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.skeleton-footer-item {
    width: 40px;
    height: 12px;
    border-radius: 4px;
}



