:root {
    --bg-color: #eeeeef;
    /* Very light off-white */
    --sidebar-bg: #ffffff;
    --text-color: #050505;
    --accent-color: #1877f2;
    --bubble-sent: #1877f2;
    --bubble-received: #ffffff;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --danger-color: #ff453a;
}

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

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    overflow: hidden;
    /* Prevent global scrollbar */
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #6b6b6b;
    border-radius: 10px;
    border: 4px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555555;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    line-height: 1.5;
}

/* Auth Styles */
.landing-body {
    height: 100%;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modern Rimless Header */
.topbar {
    width: 100%;
    flex-shrink: 0;
    /* Don't compress header */
    position: relative;
    /* Changed from sticky as container now handles scroll */
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-inner {
    width: 100%;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    /* Rimless - stretches to edges */
}

.brand-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.brand-inline:hover {
    transform: scale(1.02);
}

.brand-name {
    font-weight: 800;
    font-size: 1.6rem;
    color: #0f172a;
    letter-spacing: -0.04em;
    background: none;
    -webkit-text-fill-color: initial;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .top-nav {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .top-nav.active {
        display: flex;
    }

    .top-nav .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
}

.top-nav .nav-link {
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0;
}

.top-nav .nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.top-nav .nav-link.active {
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Mobile Toggle - Hamburger Menu */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-toggle span {
    width: 100%;
    height: 2px;
    background-color: #0f172a;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Burger Animation to X */
.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


.brand h1 {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(to right, #7ab8ff, #c8e1ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.brand p {
    color: #d1d5db;
    font-weight: 500;
}

.header-login {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.header-login input[type="text"],
.header-login input[type="email"],
.header-login input[type="password"] {
    width: 150px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.95rem;
}

.btn-primary.compact {
    padding: 10px 14px;
    width: auto;
}

.btn-ghost {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid currentColor;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-ghost.success {
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.4);
    background: rgba(22, 163, 74, 0.08);
}

.btn-ghost.success:hover {
    background: rgba(22, 163, 74, 0.16);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.auth-kicker {
    display: inline-block;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: #5aa8ff;
    margin-bottom: 0.5rem;
}

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

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.switch-text {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #65676b;
}

.switch-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.alert {
    background-color: rgba(255, 69, 58, 0.1);
    color: var(--danger-color);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-inline {
    width: min(1200px, 100%);
    margin: 12px auto 16px;
    padding: 12px 16px;
}

.content-shell {
    width: min(1200px, 100%);
    margin: 24px auto 0;
    padding: 0 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.section-row {
    width: 100%;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    height: calc(100vh - 80px);
}

.main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-scroll {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 4px;
}

.brand-block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.brand-tagline {
    color: #4b5563;
    font-weight: 500;
    margin-top: 4px;
}

.login-col {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.5s ease-out;
    margin: 0 auto;
    /* Center horizontally */
}

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

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: #64748b;
    font-size: 1rem;
}

.landing-form .form-group {
    margin-bottom: 1.25rem;
}

.landing-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.landing-body .btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s, background-color 0.2s;
    border: none;
    text-align: center;
    display: inline-block;
}

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

.landing-body .btn-primary {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    margin-bottom: 0.75rem;
}

.landing-body .btn-primary:hover {
    background-color: #2563eb;
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
}

.landing-body .btn-secondary {
    background-color: transparent;
    border: 2px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
}

.landing-body .btn-secondary:hover {
    border-color: #64748b;
    color: #1e293b;
    background-color: #f8fafc;
}

.btn-small {
    font-size: 0.875rem;
    padding: 0.6rem 1.2rem;
    width: auto;
    background: white;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-small:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.new-user-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.new-user-box h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.new-user-box p {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.news-section {
    background: rgba(255, 255, 255, 0.4);
    border-left: 1px solid #e2e8f0;
    padding: 2rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.news-section::-webkit-scrollbar {
    width: 6px;
}

.news-section::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.news-header {
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    padding-bottom: 10px;
    background: rgba(255, 255, 255, 0.9);
}

.news-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.news-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg, #3b82f6, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.1;
}

.author-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

.date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.news-content {
    font-size: 0.925rem;
    line-height: 1.5;
    color: #334155;
}

.login-heading h2 {
    margin-bottom: 4px;
    font-size: 1.4rem;
}

.login-heading p {
    color: #4b5563;
    margin-bottom: 12px;
}

.text-link {
    display: inline-block;
    width: 100%;
    text-align: right;
    margin-top: 6px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
}

.onboarding-card {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.feed-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.news-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 2px solid rgba(24, 119, 242, 0.25);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.news-link:hover {
    color: #0f6fe0;
    border-color: rgba(15, 111, 224, 0.35);
}

.blog-list {
    display: grid;
    gap: 16px;
}

.blog-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.blog-author {
    display: block;
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.blog-role {
    display: block;
    font-size: 0.85rem;
    color: #2563eb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-date {
    display: block;
    font-size: 0.9rem;
    color: #4b5563;
}

.blog-body {
    line-height: 1.65;
    color: #1f2937;
    white-space: pre-wrap;
}

.empty-card {
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    background: #f9fafb;
}

.sidebar-panel {
    align-self: start;
}

.new-users-card {
    margin-top: 18px;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.new-users-header h3 {
    margin: 6px 0 4px;
}

.helper-text {
    color: #a5b4fc;
    font-size: 0.9rem;
}

.new-users-grid {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.new-members {
    background: #f7fafc;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.section-heading h2 {
    margin: 4px 0 8px;
}

.fun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.04);
}

.user-name {
    display: block;
    font-weight: 700;
}

.user-joined {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
}

.user-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.user-splash {
    position: absolute;
    inset: 0;
    background: radial-gradient(140px circle at 20% 20%, rgba(79, 70, 229, 0.08), transparent 60%);
    pointer-events: none;
}

.user-card .user-chip {
    position: relative;
    background: #f8fafc;
    border-color: #e5e7eb;
    margin-bottom: 10px;
}

.muted {
    color: #9ca3af;
}

/* Home Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-section {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    position: relative;
}

.profile-pic-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.profile-pic-container .settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.profile-pic-container:hover .settings-overlay {
    opacity: 1;
}

.settings-overlay svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: transparent;
    object-fit: cover;
    display: block;
    border: none;
    box-shadow: none;
}

.username {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 10px 16px;
    color: #65676b;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #f0f2f5;
    color: var(--accent-color);
    font-weight: 600;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.logout-link {
    color: #ff453a;
}

.nav-hot {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 170, 120, 0.65);
    background: linear-gradient(135deg, #ffe9d7 0%, #ffd8b5 60%, #ffcba0 100%);
    color: #8a3b00;
    box-shadow: 0 10px 28px rgba(255, 170, 120, 0.35);
    justify-content: flex-start;
    gap: 0.65rem;
}

.nav-hot:hover,
.nav-hot.active {
    color: #5b2400;
    background: linear-gradient(135deg, #ffe0c2 0%, #ffd0a4 55%, #ffbf85 100%);
    box-shadow: 0 14px 32px rgba(255, 160, 110, 0.38);
}

.nav-icon-hot {
    position: relative;
    color: #d95b1d;
    filter: drop-shadow(0 4px 10px rgba(255, 140, 80, 0.35));
}

.nav-icon-hot::after {
    content: '';
    position: absolute;
    inset: -6px;
    background: radial-gradient(circle, rgba(255, 181, 125, 0.32) 0%, rgba(255, 151, 90, 0.12) 55%, transparent 70%);
    filter: blur(7px);
    opacity: 0.9;
    z-index: -1;
    animation: hotPulse 2s ease-in-out infinite;
}

@keyframes hotPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.95;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.6;
    }
}

.nav-hot-pill {
    background: linear-gradient(135deg, #ffb347, #ff5f6d);
    color: #1a1a1c;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    box-shadow: 0 6px 14px rgba(255, 99, 54, 0.35);
    margin-left: auto;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    overflow-y: auto;
    /* Enable scrolling for main content */
}

.feed-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Profile Layout Fixes */
.profile-layout {
    color: #0f172a;
}

.profile-layout h2,
.profile-layout h3 {
    color: #0f172a !important;
}

.profile-layout .text-muted {
    color: #64748b !important;
}

/* Global Toast */
.toast-global {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0a84ff;
    color: #fff;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

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

.feed-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-color);
    border-radius: 4px;
}

.mobile-nav-toggle:hover {
    background: #f5f5f7;
    transform: translateY(-1px);
}

.header-message {
    color: var(--accent-color);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

.nav-settings {
    position: relative;
    display: none;
}

.settings-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #1f1f22;
    background: #1a1a1c;
    color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.settings-toggle:hover,
.settings-toggle[aria-expanded="true"] {
    background: #222226;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.settings-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 180px;
    display: none;
    z-index: 30;
}

.settings-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}

.settings-menu a:hover {
    background: #f0f2f5;
    color: var(--accent-color);
}

.nav-settings.open .settings-menu {
    display: block;
}

.feed-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Feed Bubbles */
.feed-item {
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: 0;
    margin-right: auto;
}

.chat-thread {
    position: relative;
    padding: 0.5rem 0;
}

.chat-thread::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 45px;
    bottom: 45px;
    border-left: 2px dashed var(--border-color);
    opacity: 0.8;
}

.chat-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.bubble-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.avatar-holder {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.question-row .question-bubble,
.answer-row .answer-bubble {
    margin-left: 0;
    margin-right: 0;
}

.answer-row {
    margin-left: 40px;
}

.question-bubble {
    background-color: var(--bubble-sent);
    color: white;
    padding: 12px 18px;
    border-radius: 20px 20px 2px 20px;
    margin-bottom: 0.5rem;
    position: relative;
    width: fit-content;
    max-width: 600px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.answer-bubble {
    background-color: var(--bubble-received);
    color: #050505;
    padding: 12px 18px;
    border-radius: 2px 20px 20px 20px;
    width: fit-content;
    max-width: 600px;
    position: relative;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.answer-bubble .user-link {
    color: #000;
}

.question-bubble a.user-link:hover {
    color: blue;
}

.meta-info {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 4px;
    display: block;
}

.ask-box {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--sidebar-bg);
}

.ask-form {
    display: flex;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.ask-input {
    flex: 1;
    background-color: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-color);
    resize: none;
    height: 44px;
    line-height: 22px;
}

.ask-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.send-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: #166fe5;
}

.user-select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    padding: 0 1rem;
}

/* Picture Gallery */
.picture-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.picture-item {
    background: var(--sidebar-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
}

.picture-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.picture-info {
    padding: 1rem;
}

.picture-date {
    font-size: 0.85rem;
    color: #65676b;
    margin-bottom: 0.5rem;
}

.picture-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-small:hover {
    opacity: 0.8;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

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

.current-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .landing-body {
        padding: 24px 16px 32px;
    }

    .header-login {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-login input[type="text"],
    .header-login input[type="email"],
    .header-login input[type="password"] {
        flex: 1 1 45%;
        min-width: 180px;
    }

    .btn-primary.compact,
    .btn-ghost {
        flex: 1 1 100%;
        text-align: center;
    }

    .content-shell {
        padding: 0 12px 24px;
    }

    .two-col {
        grid-template-columns: 1fr;
        height: auto;
    }

    .login-col {
        order: -1;
        justify-content: flex-start;
    }

    .news-section {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        background: #f8fafc;
        padding: 2rem 1.5rem;
    }

    .top-nav {
        display: none;
    }

    .feed-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        align-items: center;
    }

    .sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 20;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
        border-right: none;
        border-bottom: 1px solid #1c1c1e;
        backdrop-filter: blur(12px);
        justify-content: center;
        padding: 0.75rem 1.25rem;
        background: #0f0f0f;
        color: #f5f5f5;
    }

    .nav-links a {
        margin-bottom: 0.25rem;
    }

    .sidebar-inner {
        width: 100%;
        max-width: 1000px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        flex-direction: row;
        flex-wrap: nowrap;
        align-self: center;
    }

    .profile-section {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.25rem 0.75rem;
        border-radius: 999px;
        background: #161616;
        box-shadow: inset 0 0 0 1px #1f1f22;
        justify-content: flex-start;
        margin-bottom: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: none;
        flex: 0 0 auto;
    }

    .profile-pic-container {
        width: 60px;
        height: 60px;
        margin: 0;
        border-radius: 50%;
        position: relative;
        border: none;
        overflow: hidden;
        background-color: #2a2a2c;
    }

    .profile-pic {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border: none;
        display: block;
    }

    .profile-pic-container .settings-overlay {
        display: none;
    }

    .username {
        display: none;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
        width: 100%;
        overflow-x: auto;
        padding: 0.25rem 0;
    }

    .nav-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 10px 12px;
        color: #f5f5f5;
        text-decoration: none;
        border-radius: 12px;
        transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
        font-weight: 600;
        background: #1a1a1c;
        box-shadow: inset 0 0 0 1px #1f1f22;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background-color: #222226;
        color: #5aa8ff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    }

    .nav-icon {
        display: inline-flex;
    }

    .nav-label {
        display: none;
    }

    .nav-hot-pill {
        display: none;
    }

    .nav-settings {
        margin-bottom: 0;
        display: inline-flex;
    }

    .settings-menu {
        position: fixed;
        right: 12px;
        top: 70px;
        margin-top: 0;
        background: #1a1a1c;
        border: 1px solid #2a2a2c;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
        display: none;
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        min-width: 200px;
        border-radius: 16px;
    }

    .nav-settings.open .settings-menu {
        display: flex;
    }

    .settings-menu a {
        background: transparent;
        color: #f5f5f5;
        border-radius: 12px;
        padding: 12px 16px;
        font-weight: 500;
        text-align: left;
        width: 100%;
        transition: background 0.2s;
    }

    .settings-menu a:hover {
        background: #2c2c2e;
        color: #fff;
    }

    .logout-link {
        display: none;
    }

    .main-content {
        width: 100%;
    }

    .feed-header {
        position: sticky;
        top: 0;
        z-index: 15;
    }

    .feed-scroll {
        padding: 1.25rem;
    }
}

/* Developer News Styles */
.news-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-card {
    background: var(--sidebar-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-bg {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e4e6eb;
}

.news-content {
    padding: 25px;
}

.news-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #65676b;
}

.news-author-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.news-date {
    margin-left: auto;
}

.news-body {
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Admin News Form */
.news-form-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: var(--sidebar-bg);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    resize: vertical;
}

.form-group input[type="file"] {
    width: 100%;
}

.btn-submit {
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.btn-submit:hover {
    opacity: 0.9;
}

.message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
}


.message-status {
    font-size: 0.7rem;
    color: #8e8e93;
    margin-top: 2px;
    margin-bottom: 4px;
    align-self: flex-end;
    margin-right: 4px;
}

/* Global Loading Bar */
.global-loading-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 200px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 4px;
    z-index: 9999;
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
    pointer-events: none;
}

.global-loading-bar.loading {
    transform: translateX(-50%) scaleX(1);
}

.global-loading-bar.finished {
    transform-origin: right;
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.3s ease-in;
}

/* Search Loading Effect - Pulse Animation */
@keyframes cardPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.search-loading .user-card-item {
    animation: cardPulse 1.2s infinite ease-in-out;
    pointer-events: none;
}

.notification-actions-inline {
    width: 100%;
}

.notification-reply-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.notification-reply-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
}

.notification-reply-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-reply-actions a {
    color: #0a84ff;
    text-decoration: none;
}

.notification-row {
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease, margin 0.25s ease;
}

.notification-row.notification-dismissed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.notification-preview {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
}

/* Reusable link hover for usernames */
.user-link {
    color: #FFF;
    text-decoration: none;
    transition: color 0.15s ease;
}

.user-link:hover {
    color: #0a84ff;
}

/* New Conversation Search Styling */
.new-conv-search {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.new-conv-search:focus {
    outline: none;
    background-color: #e4e6eb;
    /* Slightly darker on focus */
}

.no-friends-found {
    padding: 15px;
    text-align: center;
    color: #65676b;
    font-size: 0.9rem;
}

/* Settings */
.settings-shell {
    background: transparent;
    padding: 1rem 0;
}

.settings-shell .settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.settings-shell .settings-nav {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-shell .settings-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.settings-shell .settings-nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
}

.settings-shell .settings-nav a.active {
    background: rgba(10, 132, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.35);
    color: #0a84ff;
}

.settings-shell .settings-content {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.settings-shell .settings-card {
    background: var(--sidebar-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.settings-shell .settings-subtitle {
    margin-bottom: 0.75rem;
}

.settings-shell .settings-empty {
    text-align: center;
    padding: 3rem;
    background: var(--sidebar-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.settings-shell .settings-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.settings-shell .settings-empty-copy {
    color: #65676b;
    font-size: 1.05rem;
}

.settings-shell .settings-toast {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.settings-shell .settings-toast.success {
    background-color: rgba(52, 199, 89, 0.12);
    color: #34c759;
    border-color: rgba(52, 199, 89, 0.35);
}

.settings-shell .settings-save-btn {
    width: auto;
    padding: 10px 18px;
    margin-top: 0.5rem;
}

.settings-shell .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-shell .toggle-copy {
    flex: 1;
}

.settings-shell .toggle-copy label {
    font-weight: 700;
    display: block;
    margin-bottom: 0.1rem;
}

.settings-shell .toggle-hint {
    color: #8e8e93;
}

.settings-shell .switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
}

.settings-shell .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-shell .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c7c7cc;
    transition: .3s;
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.settings-shell .slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.settings-shell .switch input:checked+.slider {
    background: linear-gradient(135deg, #0a84ff, #4ac0ff);
    box-shadow: 0 6px 14px rgba(10, 132, 255, 0.35);
}

.settings-shell .switch input:checked+.slider:before {
    transform: translateX(22px);
}

.settings-shell .settings-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--sidebar-bg);
    color: var(--text-color);
    font-weight: 600;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #0a84ff 50%), linear-gradient(135deg, #0a84ff 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.settings-shell .settings-select:focus {
    outline: none;
    border-color: rgba(10, 132, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

.settings-shell .picture-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.settings-shell .picture-item {
    position: relative;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    width: 240px;
}

.settings-shell .picture-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.settings-shell .current-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0a84ff;
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

.settings-shell .picture-info {
    padding: 0.75rem 0.9rem 1rem;
}

.settings-shell .picture-date {
    color: #8e8e93;
    font-size: 0.85rem;
}

.settings-shell .picture-date.time {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.settings-shell .picture-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.settings-shell .active-pill {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.settings-shell .dropzone {
    min-height: 140px;
    border: 1.5px dashed #cfd7df;
    background: var(--sidebar-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #0a84ff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
    box-shadow: none;
}

.settings-shell .dropzone .dz-message {
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.2;
    color: #0a84ff;
}

.settings-shell .dropzone:before {
    content: '';
}

.settings-shell .dropzone.dz-drag-hover {
    border-color: #0a84ff;
    box-shadow: 0 12px 30px rgba(10, 132, 255, 0.12);
    transform: translateY(-2px);
    background: rgba(10, 132, 255, 0.04);
}

.settings-shell .dropzone .dz-message span {
    display: inline-block;
    max-width: 260px;
}

@media (max-width: 900px) {
    .settings-shell .settings-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .login-wrapper {
        display: flex;
        width: 100%;
        max-width: none;
        height: 100vh;
        /* Fixed height */
        overflow: hidden;
        /* No scrollbar */
    }

    .login-intro {
        width: 75%;
        background: linear-gradient(135deg, #2563eb, #1e40af);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4rem;
    }

    .login-form-container {
        width: 25%;
        background: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        position: relative;
        z-index: 5;
        height: 100vh;
        /* Ensure full height */
        overflow-y: auto;
        /* Allow form scroll if absolutely necessary on tiny height screens, but generic hidden mainly */
    }

    .login-panel {
        width: 100%;
        max-width: 380px;
    }

    /* Ensure header doesn't cause scroll or weird overlap issues if needed, but fixed header is O.K. */
}

body.view-login {
    overflow-x: hidden;
}

@media (min-width: 992px) {
    body.view-login {
        overflow: hidden;
        /* Kill scrollbar on desktop */
    }
}

.scale-hover:hover {
    transform: scale(1.05);
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group img:first-child {
    margin-left: 0 !important;
}

@media (max-width: 991.98px) {
    .login-form-container {
        padding: 10px;
        align-items: flex-start;
        padding-top: 15vh;
    }

    .login-panel {
        max-width: 100%;
        width: 100%;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 10px;
    }
}

@media (max-width: 991.98px) {
    .login-form-container {
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100vh;
        padding-top: 0;
    }

    .login-panel {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-shadow: none;
        background: transparent;
    }
}

.user-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.bubble-circle {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: floatUp linear infinite;
}

.bubble-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.9);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-120vh) scale(1.1);
        opacity: 0;
    }
}

/* Mobile-only Login Form Redesign */
@media (max-width: 991.98px) {
    body.landing-body.view-login {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    /* Center the login wrapper and remove the large top-padding */
    body.view-login .login-wrapper {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 80vh !important;
        padding: 2rem 1.5rem !important;
    }

    /* Make the form container full width but with a sensible max-width for centering */
    body.view-login .login-form-container {
        width: 100% !important;
        max-width: 440px !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    body.view-login .login-panel {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Modern, borderless input fields for mobile */
    body.view-login .form-control {
        border: none !important;
        background-color: #f1f5f9 !important;
        border-radius: 12px !important;
        padding: 1rem 1.25rem !important;
        box-shadow: none !important;
    }

    body.view-login .form-control:focus {
        background-color: #ffffff !important;
        box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1) !important;
    }

    /* Remove the 'ugly black lines' from the footer area */
    body.view-login .login-panel .border-top {
        border-top: none !important;
        padding-top: 1.5rem !important;
    }

    /* Ensure the mobile header from login.php looks good */
    body.view-login .d-lg-none .text-dark {
        font-weight: 800;
        letter-spacing: -0.04em;
    }
}

/* Fullscreen Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-modal {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#loading-overlay.active .loading-modal {
    transform: translateY(0);
}

/* Global Feed and Comment Styles */
.comment-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    color: #b0b3b8;
    font-size: 0.95rem;
    cursor: pointer;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.comment-bar:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1c1c1e;
}

.comment-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.comment-icon svg {
    width: 18px;
    height: 18px;
}

.chat-thread .comment-section {
    margin-top: 0.75rem;
    margin-left: 60px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    padding: 0.75rem;
    display: none;
    gap: 0.75rem;
    flex-direction: column;
}

.chat-thread .comment-section.active {
    display: flex;
}

.chat-thread .comment-item {
    display: flex;
    gap: 0.65rem;
}

.chat-thread .comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-thread .comment-body {
    flex: 1;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e2e8f0;
    color: #111;
}

.comment-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
}

.comment-text {
    color: #1c1c1e;
    font-size: 0.95rem;
    line-height: 1.4;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #8e8e93;
}

.like-btn {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.like-btn.liked {
    color: #ff7a1a;
    font-weight: 700;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e5ea;
    background: #fff;
    color: #1c1c1e;
}

.comment-submit {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: #0a84ff;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 768px) {
    .chat-thread .comment-section {
        margin-left: 0;
    }
}

#app-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#app-content::-webkit-scrollbar {
    width: 6px;
}

#app-content::-webkit-scrollbar-track {
    background: transparent;
}

#app-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.view-login #app-content,
.view-inbox #app-content {
    overflow-y: auto;
    overflow-x: hidden;
}

body.view-feed,
body.view-users,
body.view-profile {
    overflow-y: auto;
}

body.view-feed .app-container {
    min-height: 100vh;
    height: auto;
}

body.view-feed .main-content {
    overflow: visible;
}

body.view-feed #app-content,
body.view-users #app-content,
body.view-profile #app-content {
    overflow: visible;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for users and profile view scrolling */
.view-users #app-content>*,
.view-profile #app-content>* {
    flex-shrink: 0;
}