/* ====================================
   FUTURES: Modern Student Audio Platform
   Design System v3.0 - Premium Youthful Aesthetic
   ==================================== */

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

:root {
    /* ==== Vibrant Accent Colors ==== */
    --electric-blue: #0076ff;
    --electric-blue-light: #e8f2ff;
    --electric-blue-rgb: 0, 118, 255;

    --neon-purple: #9d50ff;
    --neon-purple-light: #f0e6ff;
    --neon-purple-rgb: 157, 80, 255;

    --accent-cyan: #00dbff;
    --accent-pink: #ff3b96;
    --accent-green: #00d67d;

    /* ==== Gradients ==== */
    --gradient-primary: linear-gradient(135deg,
            var(--electric-blue) 0%,
            var(--neon-purple) 100%);
    --gradient-glow: linear-gradient(135deg,
            rgba(var(--electric-blue-rgb), 0.5) 0%,
            rgba(var(--neon-purple-rgb), 0.5) 100%);
    --gradient-soft: linear-gradient(135deg,
            var(--electric-blue-light) 0%,
            var(--neon-purple-light) 100%);

    /* ==== Theme: Soft Dark-Light Hybrid ==== */
    /* By default, we use a very clean, "high-contrast but soft" hybrid look */
    --bg-main: #f4f7ff;
    --bg-primary: #f2f3f7;
    --bg-secondary: #eef2ff;
    --bg-card: rgba(255, 255, 255, 1);
    --bg-hover: #f0f4ff;

    --text-primary: #1a1f36;
    --text-secondary: #4f566b;
    --text-muted: #8792a2;

    --border-color: #e3e8ee;
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.7);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 50, 150, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 50, 150, 0.12);
    --shadow-glow: 0 0 20px rgba(var(--electric-blue-rgb), 0.3);

    /* ==== Spacing ==== */
    --spacing-xs: 0.15rem;
    --spacing-sm: 0.3rem;
    --spacing-md: 0.6rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;

    /* ==== Border Radius ==== */
    --radius-sm: 0.3rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.8rem;
    --radius-xl: 1.25rem;
    --radius-full: 100px;

    /* ==== Transitions & Easing ==== */
    --transition-snap: 100ms cubic-bezier(0.4, 0, 1, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

    /* ==== Animation Timing ==== */
    --duration-fast: 0.15s;
    --duration-standard: 0.25s;
    --duration-slow-p: 0.4s;

    /* ==== Modern UI Tokens (Restored) ==== */
    --glass-bg-premium: rgba(255, 255, 255, 0.7);
    --glass-bg-solid: rgba(255, 255, 255, 1);
    --glass-border-premium: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    --card-gradient: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.4) 100%);
    --inner-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);

    --var-invert: 0;
    --accent-pink-rgb: 255, 59, 150;
    --accent-red: #ff4d4d;
    --accent-red-rgb: 255, 77, 77;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Outfit', 'Inter', sans-serif;
    transition: background-color var(--duration-standard) var(--ease-in-out-cubic);
}

/* ==== PAGE TRANSITIONS ==== */
.page-fade-in {
    animation: softFadeIn var(--duration-slow) var(--ease-out-expo) forwards;
}

.app-transition-enter {
    animation: appRouteEnter 210ms var(--ease-in-out-cubic) both;
    will-change: transform, opacity;
}

.app-transition-exit {
    animation: appRouteExit 210ms var(--ease-in-out-cubic) both;
    will-change: transform, opacity;
}

@keyframes appRouteEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@keyframes appRouteExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes softFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ==== SCROLL REVEAL ==== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
        transform var(--duration-slow) var(--ease-out-expo);
    will-change: transform, opacity;
}

/* Shared Post Highlight */
@keyframes highlightPulse {
    0% {
        transform: scale(1);
        border-color: var(--electric-blue);
        box-shadow: 0 0 0 rgba(0, 118, 255, 0);
    }

    50% {
        transform: scale(1.02);
        border-color: var(--electric-blue);
        box-shadow: 0 0 25px rgba(0, 118, 255, 0.3);
    }

    100% {
        transform: scale(1);
        border-color: var(--border-color);
        box-shadow: 0 0 0 rgba(0, 118, 255, 0);
    }
}

.shared-highlight {
    animation: highlightPulse 2s ease-out;
    z-index: 10;
    position: relative;
    border: 2px solid var(--electric-blue) !important;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: none;
}

.perf-hud {
    position: fixed;
    right: 10px;
    top: 74px;
    z-index: 120000;
    background: rgba(16, 22, 36, 0.9);
    color: #dff3ff;
    border: 1px solid rgba(0, 180, 255, 0.35);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 600;
    backdrop-filter: blur(6px);
    min-width: 148px;
}

.perf-hud-title {
    font-size: 12px;
    color: #7ce1ff;
    margin-bottom: 4px;
    font-weight: 800;
}

.perf-low-end .reveal-on-scroll {
    transition-duration: 220ms;
    transform: translateY(14px);
}

.perf-low-end .page-fade-in {
    animation-duration: 180ms;
}

.perf-low-end .post-card:hover .post-image-container img {
    transform: none;
}

.perf-low-end .main-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.perf-low-end .chat-messages {
    -webkit-overflow-scrolling: auto;
}

/* ==== PREMIUM BUTTON BASE ==== */
button,
.btn {
    transition: all var(--duration-fast) var(--ease-in-out-cubic);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

button:active,
.btn:active {
    transform: scale(0.96);
    /* Instant feedback */
}

.premium-btn {
    position: relative;
    overflow: hidden;
    transition: all var(--duration-standard) var(--ease-out-expo);
}

.premium-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0;
    border-radius: 100%;
    transform: translate(-50%, -50%);
    transition: all var(--duration-standard) var(--ease-out-expo);
}

.premium-btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: 0s;
}

[data-theme="dark"] {
    --var-invert: 1;
    --glass-bg-premium: rgba(18, 23, 33, 0.7);
    --glass-bg-solid: rgba(18, 23, 33, 1);
    --glass-border-premium: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    --card-gradient: linear-gradient(135deg,
            rgba(18, 23, 33, 0.8) 0%,
            rgba(18, 23, 33, 0.4) 100%);
    --inner-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

@keyframes searchingRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {

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

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

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

@keyframes fadeInScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-main: #0a0d14;
    --bg-primary: #121721;
    --bg-secondary: #1c2331;
    --bg-card: rgba(22, 28, 41, 0.9);
    --bg-hover: #242e42;

    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    --border-color: #2d3748;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(0, 0, 0, 0.2);

    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ==== Global Styles ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family:
        "Outfit",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    transition:
        background var(--transition-base),
        color var(--transition-base);
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.layout-container {
    display: flex;
    flex: 3;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    gap: var(--spacing-lg);
}

/* ====================================
   HEADER & NAVIGATION
   ==================================== */

.rate-star:hover {
    transform: scale(1.2);
}

.rate-star:hover,
.rate-star:hover~.rate-star {
    color: #FFD700 !important;
}

.rate-star.rated {
    animation: pulseGlow 0.5s ease;
}

.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transform: translate3d(0, 0, 0);
    will-change: background-color;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.logo {
    font-size: 1.9rem;
    font-weight: 800;
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Avatar Initials */
.avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50%;
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.header-nav-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    transition: all var(--transition-base);
    position: relative;
    font-size: 1rem;
    text-decoration: none;
}

.header-nav-btn .icon {
    font-size: 1.4rem;
}

.badge {
    position: absolute;
    top: -1px;
    left: 25px;
    background: #ff5e5e;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 94, 94, 0.4);
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse-icon {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #7c3aed);
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px #7c3aed);
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #7c3aed);
    }
}

.pulse-new i {
    animation: pulse-icon 2s infinite ease-in-out !important;
}

.user-profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Avatar icon — links directly to /profile/ */
.avatar-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50%;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.avatar-link:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(var(--electric-blue-rgb), 0.3);
    border-radius: 50%;
}

/* Username text — toggles dropdown */
#headerUsername {
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

#headerUsername:hover {
    background: var(--bg-hover);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-glow);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2px 2px 2px 18px;
    border-radius: 40px;
    border: 1.5px solid var(--glass-border-premium);
    cursor: pointer;
    font-weight: 700;
    transition: all var(--duration-standard) var(--ease-out-expo);
    box-shadow: var(--glass-shadow);
    height: 3.2rem;
}

.user-badge:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 8px 25px rgba(var(--neon-purple-rgb), 0.1);
    transform: translateY(-2px);
}

.avatar-circle-sm {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#userAvatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
}

#userAvatar > img,
#userAvatar > .avatar-initial,
#userAvatar > .avatar-default-icon {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block;
    object-fit: cover;
}

.profile-pic-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 200px;
    box-shadow: var(--shadow-lg);
    display: none;
    padding: var(--spacing-sm);
    z-index: 100;
}

.dropdown-item {
    width: 100%;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    text-align: left;
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--electric-blue);
}

/* ====================================
   MAIN CONTENT & DASHBOARD
   ==================================== */

/* Container positioning */
/* ===== SIDEBAR ===== */
.left-container {
    width: 240px;
    flex-shrink: 0;
}

.menu-options {
    position: sticky;
    top: 80px;
    width: 100%;
    height: calc(100vh - 100px);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding-top: 20px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 22px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0 12px 12px 0;
    margin-right: 10px;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--electric-blue);
    transform: translateX(4px);
}

.menu-item.active {
    background: linear-gradient(135deg,
            rgba(0, 118, 255, 0.1) 0%,
            rgba(157, 80, 255, 0.1) 100%);
    color: var(--electric-blue);
    font-weight: 700;
    border-left: 4px solid var(--electric-blue);
    box-shadow: inset 0 0 20px rgba(0, 118, 255, 0.08);
}

/* Legacy icon styles removed in favor of Lucide icons */

/* ===== MOBILE NAVIGATION ===== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1023px) {
    .right-container {
        order: 2;
        width: 100%;
        max-width: 100vw;
        border-radius: 0;
        margin-top: 0;
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        display: block;
    }

    .left-container {
        order: 1;
        width: 60px;
        min-width: 44px;
        max-width: 80px;
        padding: 0;
        border: none;
        background: none;
    }

    .main-content {
        order: 0;
    }
}

@media (max-width: 992px) {
    .right-container {
        display: block;
        width: 100%;
        max-width: 100vw;
        border-radius: 0;
        margin-top: 0;
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .left-container {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .layout-container {
        flex-direction: column;
        /* Important */
    }

    .right-container {
        display: none !important;
    }

    .left-container {
        display: none !important;
    }

    .main-content {
        width: 100vw;
        min-width: 0;
        padding: 0 0 70px 0;
    }

    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        justify-content: space-around;
        padding: 0.4rem 0;
        z-index: 999;
        box-shadow: var(--shadow-lg);
        backdrop-filter: blur(10px);
    }

    .mobile-bottom-nav a {
        color: var(--text-muted);
        text-align: center;
        min-height: 2.8rem;
        min-width: 2.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        border-radius: 0.75rem;
        margin: 0 0.25rem;
        transition: all var(--transition-base);
        position: relative;
    }

    .mobile-bottom-nav a:hover {
        color: var(--electric-blue);
        background: rgba(0, 118, 255, 0.08);
    }

    .mobile-bottom-nav a.active {
        color: white;
        background: linear-gradient(135deg,
                var(--electric-blue) 0%,
                var(--neon-purple) 100%);
        box-shadow: 0 4px 12px rgba(0, 118, 255, 0.3);
    }

    body {
        padding-bottom: 3.5rem;
    }
}

/* Lazy-load right sidebar for mobile */
.right-container.lazy-load {
    display: none !important;
}

@media (max-width: 768px) {
    .right-container.lazy-load {
        display: none !important;
    }
}

/* Touch target minimums */
.menu-item,
.header-nav-btn,
.tab-btn,
.common-btn-compact,
.primary-step-btn,
.ghost-btn,
.chat-call-btn,
.mobile-bottom-nav a {
    min-height: 44px;
    min-width: 44px;
    font-size: 1rem;
}

/* Accessibility: focus states */
.menu-item:focus,
.common-btn-compact:focus,
.primary-step-btn:focus,
.ghost-btn:focus,
.chat-call-btn:focus,
.mobile-bottom-nav a:focus {
    outline: 2px solid var(--electric-blue);
    outline-offset: 2px;
    z-index: 2;
}

/* Utility visibility classes shared by templates */
.hero-mobile-only {
    display: none;
}

.hero-desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .hero-mobile-only {
        display: block !important;
    }

    .hero-desktop-only {
        display: none !important;
    }
}

/* Global Ghost Button Style */
.ghost-btn {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-base);
    font-family: inherit;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

.ghost-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    color: var(--text-primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.ghost-btn:active {
    transform: translateY(0) scale(0.97);
}

.ghost-btn i,
.ghost-btn svg {
    width: 20px;
    height: 20px;
}

/* Primary Action Button (Global) */
.primary-step-btn {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(var(--electric-blue-rgb), 0.2);
    font-family: inherit;
    text-decoration: none;
}

.primary-step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--electric-blue-rgb), 0.4);
    opacity: 0.95;
}

.primary-step-btn:active {
    transform: translateY(0) scale(0.97);
}



.right-container {
    position: sticky;
    right: 0;
    top: var(--spacing-lg);
    height: calc(100vh - (var(--spacing-lg) * 2));
    width: 360px;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.menu-options a {
    text-decoration: none;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-base);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

/* Hover */
.menu-options a:hover {
    background: var(--bg-hover);
    color: var(--electric-blue);
    transform: translateX(4px);
}

/* Active */
.menu-options a.active {
    background: var(--electric-blue-light);
    color: var(--electric-blue);
}

/* Add a pseudo-element for the active indicator */
.menu-options a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background: var(--electric-blue);
    border-radius: 0 4px 4px 0;
}

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

.home-container-compact {
    display: flex;
    flex-direction: column;
    
    padding-bottom: 15px;
}

.hero-section-compact {
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-section-compact::after {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--gradient-soft);
    filter: blur(100px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.hero-section-compact h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero-section-compact p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* PRIMARY CALL BUTTON */
.common-btn-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    width: fit-content;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(var(--electric-blue-rgb), 0.3);
    position: relative;
    z-index: 2;
}

.common-btn-compact:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 45px rgba(var(--electric-blue-rgb), 0.4);
}

.common-btn-compact:active {
    transform: translateY(0) scale(0.98);
}

.icon-pulse {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    animation: bounceEmoji 2s infinite;
}

@keyframes bounceEmoji {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.btn-text {
    text-align: left;
}

.btn-text h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
}

.btn-text span {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* CATEGORY GRID */
.category-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.category-grid-compact {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);

    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

}

/* Hide ugly scrollbar (optional) */
.category-grid-compact::-webkit-scrollbar {
    display: none;
}

.category-grid-compact {
    display: flex;
    gap: 12px;
    padding: 20px 0 2px;
    /* Bottom padding for 3D lift */
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Each card */
.category-card {
    flex: 0 0 auto;
    /* Prevent shrinking */
    width: 260px;
    /* Fixed width */
    scroll-snap-align: start;
    /* Snap point */
}

.category-card-compact {
    flex: 0 0 auto;
    width: 140px;
    /* More compact */
    height: 170px;
    /* Reduced excess space */
    scroll-snap-align: start;
    background: linear-gradient(180deg, var(--bg-primary), rgba(var(--cat-color-rgb), 0.05));
    border: 1.5px solid var(--border-color);
    border-radius: 24px;
    padding: var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    perspective: 1000px;
    overflow: hidden;
}

.category-card-compact:hover,
.category-card-compact:active,
.category-card-compact.tapped {
    transform: translateY(-12px) scale(1.05) rotateX(4deg);
    border-color: rgba(var(--cat-color-rgb, 0, 118, 255), 0.5);
    box-shadow: 0 20px 40px rgba(var(--cat-color-rgb, 0, 118, 255), 0.2);
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(var(--cat-color-rgb), 0.15) 100%);
}

/* Category Specific Colors */
.category-card-compact[data-category="banking"] {
    --cat-color: #3b82f6;
    --cat-color-rgb: 59, 130, 246;
}

.category-card-compact[data-category="cat"] {
    --cat-color: #8b5cf6;
    --cat-color-rgb: 139, 92, 246;
}

.category-card-compact[data-category="english"] {
    --cat-color: #ec4899;
    --cat-color-rgb: 236, 72, 153;
}

.category-card-compact[data-category="engineering"] {
    --cat-color: #10b981;
    --cat-color-rgb: 16, 185, 129;
}

.category-card-compact[data-category="gate"] {
    --cat-color: #f59e0b;
    --cat-color-rgb: 245, 158, 11;
}

.category-card-compact[data-category="jee"] {
    --cat-color: #06b6d4;
    --cat-color-rgb: 6, 182, 212;
}

.category-card-compact[data-category="management"] {
    --cat-color: #f43f5e;
    --cat-color-rgb: 244, 63, 94;
}

.category-card-compact[data-category="nda"] {
    --cat-color: #6366f1;
    --cat-color-rgb: 99, 102, 241;
}

.category-card-compact[data-category="neet"] {
    --cat-color: #22c55e;
    --cat-color-rgb: 34, 197, 94;
}

.category-card-compact[data-category="ssc"] {
    --cat-color: #f97316;
    --cat-color-rgb: 249, 115, 22;
}

.category-card-compact[data-category="upsc"] {
    --cat-color: #4338ca;
    --cat-color-rgb: 67, 56, 202;
}

.category-card-compact[data-category="prime"] {
    --cat-color: #fbbf24;
    --cat-color-rgb: 251, 191, 36;
}

.category-card-compact[data-category="rrb"] {
    --cat-color: #f92310;
    --cat-color-rgb: 249, 35, 16;
}


.category-card-compact::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -100%;
    width: 20%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    transition: all 0.7s ease;
    z-index: 2;
    pointer-events: none;
}

.category-card-compact:hover::after,
.category-card-compact:active::after,
.category-card-compact.tapped::after {
    left: 150%;
}

.card-icon-compact {
    width: 60px;
    /* Optimized size */
    height: 60px;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--cat-color-rgb), 0.08);
    /* Frosted tint */
    backdrop-filter: blur(4px);
    border-radius: 18px;
    color: var(--cat-color);
    transition: all 0.5s ease;
    border: 1px solid rgba(var(--cat-color-rgb), 0.15);
    box-shadow: 0 0 20px rgba(var(--cat-color-rgb), 0.1);
    /* Ambient glow */
}

.category-card-compact:hover .card-icon-compact,
.category-card-compact:active .card-icon-compact,
.category-card-compact.tapped .card-icon-compact {
    background: var(--cat-color);
    color: white;
    transform: scale(1.1) rotateZ(5deg);
    box-shadow: 0 10px 25px rgba(var(--cat-color-rgb), 0.4);
    border-color: transparent;
}

.card-icon-compact i {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.category-card-compact:hover .card-icon-compact i,
.category-card-compact:active .card-icon-compact i,
.category-card-compact.tapped .card-icon-compact i {
    animation: floatIcon 1.5s infinite ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-3px) rotate(5deg);
    }
}

.card-info-compact {
    position: relative;
    z-index: 1;
}

.card-info-compact h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
}

.card-info-compact p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
}

/* ====================================
   CATEGORY DETAILS / SPLIT VIEW
   ==================================== */

.category-page-split {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--spacing-xl);
    height: calc(100vh - 120px);
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    overflow-y: auto;
    padding-right: var(--spacing-sm);
}

.category-header {
    background: var(--bg-primary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.category-icon-large {
    font-size: 3rem;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.action-buttons-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.action-btn {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-base);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--electric-blue);
}

.action-btn.call-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-text h3 {
    margin: 0;
    font-size: 1rem;
}

.btn-text p {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.8;
}

.right-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    padding: 5px;
    border-bottom: 1px solid var(--border-color);
}

.tab-nav {
    display: flex;
    gap: var(--spacing-sm);
    padding: 4px;
    width: 100%;
}

.tab-btn {
    flex: 1;
    padding: 10px;

    border: none;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.tab-btn.active {

    color: var(--electric-blue);
    border-bottom: 2px solid var(--electric-blue);
}

#feedView,
#chatView {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.live-chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    min-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    contain: layout paint;
    overscroll-behavior: contain;
}

.chat-msg {
    max-width: 80%;
    margin-bottom: var(--spacing-sm);
    overflow-wrap: break-word;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-msg.self {
    align-self: flex-end;
    margin-left: auto;
    align-items: flex-end;
}

.chat-msg-bubble {
    padding: 0.64rem 0.86rem;
    border-radius: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-msg.self .chat-msg-bubble {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 0.2rem;
}

.chat-msg:not(.self) .chat-msg-bubble {
    border-top-left-radius: 0.2rem;
    border-bottom-left-radius: 1rem;
    background: linear-gradient(155deg,
            color-mix(in srgb, var(--bg-primary) 82%, #ffffff 18%),
            color-mix(in srgb, var(--bg-secondary) 86%, #f8fbff 14%));
    border: 1px solid color-mix(in srgb, var(--border-color) 82%, var(--electric-blue) 18%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.chat-msg-info {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 600;
}

.chat-msg:not(.self) .chat-msg-sender {
    margin-bottom: 0.22rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
}

.chat-msg-handle {
    font-weight: 600;
    font-size: 0.66rem;
    color: var(--text-muted);
    opacity: 0.9;
    margin-left: 4px;
}

.chat-msg-time {
    font-size: 0.6rem;
    letter-spacing: 0.02em;
}

.chat-msg-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.chat-msg-meta-row.self {
    justify-content: flex-end;
}

.chat-msg-delete-btn {
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.chat-msg.self .chat-msg-delete-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(2px);
}

.chat-msg.self.long-press-active .chat-msg-delete-btn,
.chat-msg.self:focus-within .chat-msg-delete-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
    .chat-msg.self:hover .chat-msg-delete-btn {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

@media (hover: none) {
    .chat-msg.self .chat-msg-delete-btn {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(2px);
    }
}

.chat-msg-delete-btn:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
}

html[data-theme="dark"] .chat-msg-delete-btn {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fda4af;
}

.chat-msg:not(.self) .chat-msg-time {
    padding-left: 2px;
}

.chat-msg.self .chat-msg-time {
    text-align: right;
}

.chat-input-container {
    padding-top: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
}

/* ELEGANT INPUTS */
.elegant-input,
.input-field {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.elegant-input:focus,
.input-field:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 4px rgba(var(--electric-blue-rgb), 0.1);
}

/* ====================================
   SIDEBAR & WIDGETS
   ==================================== */

.right-sidebar {
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.sidebar-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 800;
}

.user-category-badge {
    background: var(--gradient-soft);
    color: var(--electric-blue);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    display: inline-block;
    border: 1px solid rgba(var(--electric-blue-rgb), 0.1);
}

.tip-item {
    background: var(--bg-hover);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--electric-blue);
    margin-bottom: var(--spacing-sm);
}

.tip-item p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ====================================
   FOOTER
   ==================================== */

.main-footer {
    padding: 60px var(--spacing-lg) 40px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(0, 118, 255, 0.02) 100%);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Footer Sections Grid */
.footer-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.footer-section-title {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--electric-blue);
    border-radius: 2px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.footer-list li {
    margin: 0;
}

.footer-list a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.footer-list a::before {
    content: '';
    width: 0;
    height: 2px;
    background: var(--electric-blue);
    position: absolute;
    bottom: -2px;
    left: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-list a:hover {
    color: var(--electric-blue);
    transform: translateX(4px);
}

.footer-list a:hover::before {
    width: 100%;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.footer-bottom p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
}

.footer-bottom strong {
    color: var(--electric-blue);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-footer {
        padding: 50px var(--spacing-md) 35px;
    }

    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: 40px var(--spacing-md) 30px;
    }

    .footer-content {
        gap: 30px;
    }

    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: 100%;
    }

    .footer-section {
        gap: 12px;
    }

    .footer-section-title {
        font-size: 0.85rem;
    }

    .footer-list {
        gap: 1px;
    }

    .footer-list a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        padding-top: 20px;
        min-height: auto;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 30px var(--spacing-sm) 20px;
    }

    .footer-content {
        gap: 25px;
    }

    .footer-sections {

        gap: 25px;
        max-width: 100%;
        margin: 20px;

    }

    .footer-section {
        gap: 10px;
    }

    .footer-section-title {
        font-size: 0.8rem;
        letter-spacing: 0.3px;
    }

    .footer-list {
        gap: 1px;
    }

    .footer-list a {
        font-size: 0.8rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }
}

/* ====================================
   CALL INTERFACE (MODERN 2026 REDESIGN)
   ==================================== */

.status-dot-pulse {
    width: 12px;
    height: 12px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-green);
    animation: glowPulsePremium 2s infinite;
}

@keyframes glowPulsePremium {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 214, 125, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 214, 125, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 214, 125, 0);
    }
}

.call-glass-card {
    background: var(--glass-bg-premium);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border-premium);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--glass-shadow);
    text-align: center;
    max-width: 850px;
    width: 100%;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.call-header {
    margin-bottom: var(--spacing-xl);
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.call-warning-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: var(--radius-full);
    color: #ff9800;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.05);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    animation: slideInDown 0.6s var(--ease-out-expo);
}

.call-warning-banner i {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

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

.participants-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    perspective: 1000px;
}

.participant {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

/* Premium Profile Card */
.avatar-wrapper {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px;
    background: var(--card-gradient);
    box-shadow: var(--shadow-md), var(--inner-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-wrapper::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-primary);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-wrapper.speaking {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(var(--electric-blue-rgb), 0.3);
}

.avatar-wrapper.speaking::before {
    opacity: 1;
    animation: searchingRotate 4s linear infinite;
}

.avatar-wrapper.searching {
    animation: none;
    /* Disable general pulse */
}

/* Pulse expanding ring effect ONLY for remote avatar while searching */
#remoteAvatar.avatar-wrapper.searching::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(var(--electric-blue-rgb), 0.2);
    animation: searchingPulseExpand 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
    z-index: 1;
}

@keyframes searchingPulseExpand {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.avatar-img,
.avatar-emoji {
    width: 100%;
    height: 100%;
    object-fit: cover;
    font-size: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--gradient-primary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 5;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s 0.2s;
}

.participant.connected .badge-overlay {
    transform: translateY(0);
    opacity: 1;
}

.name-label {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 8px;
    letter-spacing: -0.5px;
}

.category-pill-premium {
    background: var(--gradient-soft);
    color: var(--electric-blue);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid rgba(var(--electric-blue-rgb), 0.1);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connection-visual {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.connection-line {
    width: 100%;
    height: 2px;
    background: rgba(var(--electric-blue-rgb), 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.connection-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    animation: flowLine 1.5s infinite;
}

@keyframes flowLine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.wave-animation {
    display: flex;
    gap: 6px;
}

.wave-dot {
    width: 8px;
    height: 8px;
    background: var(--electric-blue);
    border-radius: 50%;
    animation: waveJumpPremium 1.2s infinite ease-in-out;
}

@keyframes waveJumpPremium {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-15px);
        opacity: 1;
        background: var(--accent-cyan);
    }
}

/* Call Control Buttons - New Layout */
.call-actions-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    margin-top: 5rem;
    width: 100%;
}

.next-match-btn {
    width: 85%;
    max-width: 380px;
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    background: #eef2ff;
    /* Light blue aspect from image */
    border: 2.5px solid var(--electric-blue);
    color: var(--electric-blue);
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 118, 255, 0.05);
}

.next-match-btn:hover {
    background: var(--electric-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 118, 255, 0.2);
}

.call-action-grid {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    width: 100%;
    margin-top: 5px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 110px;
}

.action-btn {
    width: 100%;
    aspect-ratio: 1;
    max-width: 75px;
    border-radius: var(--radius-xl);
    /* Rounded card shape */
    border: 1.5px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-md);
    background: var(--bg-hover);
}

.action-btn i {
    stroke-width: 2.5px;
}

.action-btn.mute {
    color: var(--electric-blue);
}

.action-btn.mute.active {
    background: #ff4d4d;
    /* Solid fill for active mute */
    color: white !important;
    border-color: #ff4d4d;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.action-btn.speaker {
    color: var(--accent-green);
}

.action-btn.speaker.active {
    background: #00d67d;
    /* Solid fill for active speaker */
    color: white !important;
    border-color: #00d67d;
    box-shadow: 0 4px 15px rgba(0, 214, 125, 0.3);
}

.action-btn.friend {
    color: var(--electric-blue);
}

.action-btn.friend:hover {
    background: rgba(var(--electric-blue-rgb), 0.05);
}

.action-btn.hangup {
    color: var(--accent-red);
    background: rgba(255, 77, 77, 0.02);
    border-color: rgba(255, 77, 77, 0.1);
}

.action-btn.hangup:hover {
    background: rgba(255, 77, 77, 0.08);
    border-color: var(--accent-red);
}

.action-label {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-secondary);
}

/* Connected Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
    margin-top: 10px;
}

.status-pill.connected {
    background: rgba(0, 214, 125, 0.08);
    border: 1px solid rgba(0, 214, 125, 0.2);
    color: #00d67d;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d67d;
}


/* #addFriend float style removed - now in grid */


/* Connected State Layout */
.match-stage {
    display: flex;
    width: 100%;
    gap: var(--spacing-xl);
    align-items: center;
    transition: all 0.5s;
}

.match-stage.searching-mode {
    justify-content: center;
}

.match-stage.connected-mode .connection-visual {
    width: 60px;
}

/* Timer styles */
.call-timer-bubble {
    background: rgba(var(--electric-blue-rgb), 0.1);
    color: var(--electric-blue);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.9rem;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(var(--electric-blue-rgb), 0.2);
    animation: slideInUp 0.4s 0.3s both;
}

/* User Meta Info */
.user-meta-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 200px;
}

.user-level-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.opponent-rating-glow {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--accent-green-rgb), 0.1);
    color: var(--accent-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-top: 5px;
}

/* FRIEND REQUESTS & LISTS */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.request-item {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
}

.request-item:hover {
    border-color: var(--electric-blue);
    background: var(--bg-primary);
    transform: translateX(5px);
}

.request-item.unread {
    background: var(--electric-blue-light);
    border-left: 4px solid var(--electric-blue);
}

.request-user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.request-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
    border: 1.5px solid var(--border-color);
}

.request-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.request-username {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.request-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-accept,
.btn-reject {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-accept {
    background: var(--accent-green);
    color: white;
}

.btn-reject {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.badge-mini {
    background: var(--accent-pink);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
}

/* MODAL OVERRIDES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    /* Darker backdrop */
    backdrop-filter: blur(40px);
    /* Heavier blur */
    -webkit-backdrop-filter: blur(40px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: var(--spacing-2xl);
    max-width: 700px;
    width: 90%;
    max-height: 100%;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: var(--spacing-md);
}

.no-requests {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* UTILITIES */
.theme-toggle-header {
    background: var(--bg-hover);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.theme-toggle-header:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

/* The .settings-btn class was likely associated with the removed .floating-controls.
   If it's still needed elsewhere, its original definition should be restored.
   Based on the instruction to remove floating-controls and style the new header-theme-toggle,
   and the provided snippet, the*/
/* ==== Global Icon Styling ==== */
[data-lucide] {
    stroke-width: 2.2px;
    vertical-align: middle;
    /* transition: all var(--transition-base); */
}

/* Icons in buttons should be slightly thicker and centered */
button [data-lucide] {
    stroke-width: 2.5px;
}

@media (max-width: 992px) {
    .category-page-split {
        grid-template-columns: 1fr;
        height: auto;
    }

    .right-sidebar {
        display: none;
    }

    /* Category page: show header and actions on mobile, hide secondary sidebar cards */
    .category-page-split>.left-panel {
        display: flex;
        flex-direction: column;
        padding-right: 0;
        gap: var(--spacing-md);
        animation: fadeInUp 0.5s ease;
    }

    .category-page-split>.left-panel .sidebar-card,
    .category-page-split>.left-panel .back-link {
        display: none;
    }

    .category-header {
        padding: var(--spacing-md);
        gap: var(--spacing-md);
        margin-bottom: 0;
    }

    .category-icon-large {
        font-size: 2.5rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .action-buttons-stack {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-sm) !important;
        padding: 0 var(--spacing-md);
    }

    .action-btn {
        padding: var(--spacing-md) !important;
    }

    /* FAB stays visible everywhere; on mobile it floats above the bottom nav bar */
    .mobile-share-fab {
        bottom: 80px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    /* Profile page mobile fixes */
    .profile-page-container {
        padding: var(--spacing-md) !important;
    }

    .profile-page-container .profile-header {
        flex-direction: column !important;
        text-align: center;
        padding: var(--spacing-xl) !important;
        gap: var(--spacing-lg) !important;
        align-items: center !important;
    }

    .profile-page-container .profile-image-container {
        margin: 0 auto;
    }

    .profile-page-container .profile-info-main {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-page-container .profile-info-main h1 {
        font-size: 1.8rem !important;
    }

    /* Force stats row to be a row but centered and wrapping */
    .profile-page-container .profile-stats-row {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: var(--spacing-md) !important;
    }

    .profile-page-container .profile-actions {
        flex-direction: row !important;
        justify-content: center;
        width: 100%;
    }

    .profile-page-container .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .profile-page-container .edit-info-panel {
        width: 100% !important;
    }

    /* Friends page: show list only by default, chat fills screen when active */
    .friends-chat-active .left-panel {
        display: none !important;
    }

    .friends-chat-active .right-panel {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 var(--spacing-md);
    }

    .header-nav-btn .label {
        display: none;
    }

    .header-nav-btn {
        padding: 2px;
    }

    .user-badge {
        padding: 0px;
    }

    .user-badge span {
        display: none;
    }

    .logo {
        font-size: 1.4rem;
    }

    .layout-container {
        padding: var(--spacing-md);
    }

    /* Profile page mobile */
    .profile-page-container {
        padding: var(--spacing-md) !important;
    }

    .profile-page-container .profile-image-container img {
        width: 100px !important;
        height: 100px !important;
    }

    .profile-page-container .profile-info-main h1 {
        font-size: 1.5rem !important;
    }

    .profile-stats-row .stat-item {
        min-width: 80px;
        padding: 8px 14px;
    }

    /* Friends page responsive on mobile */
    .category-page-split {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .call-glass-card {
        padding: var(--spacing-xl) var(--spacing-md);
        margin: 10px auto;
        border-radius: var(--radius-xl);
    }

    .avatar-wrapper {
        width: 130px;
        height: 130px;
        padding: 6px;
    }

    .avatar-emoji {
        font-size: 3.5rem;
    }

    .name-label {
        font-size: 1.1rem;
    }

    .call-header h2 {
        font-size: 1.2rem !important;
    }

    /* Profile Mobile Tabs */
    .profile-mobile-tabs {
        display: flex !important;
        background: var(--bg-card);
        padding: 5px;
        border-radius: var(--radius-lg);
        margin-bottom: var(--spacing-lg);
        border: 1px solid var(--border-color);
        gap: 5px;
    }

    .profile-tab-btn {
        flex: 1;
        padding: 12px;
        border: none;
        background: transparent;
        border-radius: var(--radius-md);
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.3s;
    }

    .profile-tab-btn.active {
        background: var(--bg-primary);
        color: var(--electric-blue);
        box-shadow: var(--shadow-sm);
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .connection-visual {
        width: 60px;
    }

    .badge {
        position: absolute;
        top: -1px;
        left: 25px;
        background: #ff5e5e;
        color: white;
        font-size: 0.6rem;
        padding: 2px 6px;
        border-radius: 50%;
        font-weight: 700;
        box-shadow: 0 2px 6px rgba(255, 94, 94, 0.4);
        min-width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .call-glass-card {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin: 5px auto;
        border-radius: var(--radius-lg);
    }

    .call-header h2 {
        font-size: 1.1rem !important;
        line-height: 1.2;
    }

    .searching-dots span {
        width: 6px !important;
        height: 6px !important;
    }

    .participants-container,
    .match-stage {

        gap: var(--spacing-md);
        padding: var(--spacing-md) 0;
        margin-top: 5rem;
    }

    .participant {
        gap: var(--spacing-xs);
        width: 100%;
    }

    .avatar-wrapper {
        width: 8rem;
        height: 8rem;
        padding: 0.25rem;
    }

    .avatar-emoji {
        font-size: 2rem;
    }

    .connection-visual {
        width: 2rem;
        height: 2rem;
        transform: rotate(90deg);
        margin: 0.3rem 0;
        display: flex;
        justify-content: center;
    }

    .name-label {
        font-size: 0.9rem;
        margin-top: 0.25rem;
    }

    .user-level-badge {
        font-size: 0.65rem;
    }

    .action-btn-premium {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }

    .action-btn-premium.next {
        padding: 0 16px;
        font-size: 0.85rem;
        height: 50px;
    }

    .call-actions {
        gap: 12px;
        margin-top: var(--spacing-xl);
    }

    .call-timer-bubble {
        font-size: 0.8rem;
        padding: 4px 12px;
    }

    .post-call-panel {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .post-call-panel p {
        font-size: 0.95rem;
    }

    .user-meta-info {
        width: 100%;
    }

    .profile-page-container .profile-info-main h1 {
        font-size: 1.3rem !important;
    }

    .modal-content {
        width: 100%;
        padding: var(--spacing-lg);
        height: 100%;
    }

    /* Edge-to-edge mobile layout for feed and profile */
    .layout-container {
        padding: 0 !important;
        gap: 0 !important;
    }

    .category-page-split {
        gap: 0 !important;
    }

    .right-panel {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid var(--border-color) !important;
        height: calc(var(--visual-viewport-height, 100dvh) - 150px);
    }

    #feedView,
    #chatView {
        padding: var(--spacing-md) !important;
    }

    .post-card-modern,
    .post-card {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin-bottom: 8px !important;
    }

    .profile-tabs {
        margin: 0 var(--spacing-md) var(--spacing-md) !important;
    }
}

/* ====================================
   FLOATING SHARE INSIGHT FAB (Mobile)
   ==================================== */
.mobile-share-fab {
    display: flex;
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-size: 1.6rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(var(--electric-blue-rgb), 0.4);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fabPulse 3s infinite;
    text-decoration: none;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.mobile-share-fab:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 15px 40px rgba(var(--electric-blue-rgb), 0.5);
}

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

@media (min-width: 769px) {
    .mobile-share-fab {
        display: none !important;
    }
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(var(--electric-blue-rgb), 0.4);
    }

    50% {
        box-shadow:
            0 10px 30px rgba(var(--electric-blue-rgb), 0.6),
            0 0 0 8px rgba(var(--electric-blue-rgb), 0.08);
    }
}

/* ====================================
   FRIENDS PAGE MOBILE CHAT BACK BUTTON
   ==================================== */
.chat-back-btn,
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 38px;
    height: 38px;
}

.chat-back-btn svg,
.back-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.chat-back-btn:hover,
.back-btn:hover {
    background: var(--bg-secondary);
    transform: translateX(-3px);
    box-shadow: var(--shadow-sm);
}

.chat-back-btn:active,
.back-btn:active {
    transform: scale(0.92);
}

/* Specific for mobile chat where it's hidden on desktop */
.chat-back-btn {
    display: none;
}

@media (max-width: 992px) {
    .chat-back-btn {
        display: inline-flex;
    }
}

/* ====================================
   COMMUNITY POSTS UI
   ==================================== */

.post-card {
    background:
        radial-gradient(circle at 8% 0%, rgba(var(--electric-blue-rgb), 0.09), transparent 34%),
        radial-gradient(circle at 92% 18%, rgba(var(--electric-blue-rgb), 0.06), transparent 36%),
        linear-gradient(
            165deg,
            color-mix(in srgb, var(--bg-card) 92%, var(--bg-primary) 8%) 0%,
            color-mix(in srgb, var(--bg-primary) 88%, var(--bg-secondary) 12%) 100%
        );
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: var(--spacing-lg) var(--spacing-md);
    margin-bottom: 0;
    transition: all var(--duration-standard) var(--ease-out-expo);
    cursor: pointer;
    position: relative;
    will-change: transform, box-shadow;
}

.post-card:hover {
    background:
        radial-gradient(circle at 8% 0%, rgba(var(--electric-blue-rgb), 0.14), transparent 36%),
        radial-gradient(circle at 92% 18%, rgba(var(--electric-blue-rgb), 0.1), transparent 38%),
        linear-gradient(
            165deg,
            color-mix(in srgb, var(--bg-card) 90%, var(--bg-primary) 10%) 0%,
            color-mix(in srgb, var(--bg-hover) 78%, var(--bg-secondary) 22%) 100%
        );
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.post-card .post-image-container img {
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

.post-card:hover .post-image-container img {
    transform: scale(1.02);
}

.post-card:first-child {
    border-top: 1px solid var(--border-color);
}

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

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: var(--bg-hover);
}

.post-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.post-menu {
    position: relative;
}

.post-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 8px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
}

.post-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.post-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 140px;
    overflow: hidden;
    display: none;
    /* Initially hidden */
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
        transform-origin: top right;
    }

    to {
        opacity: 1;
        transform: scale(1);
        transform-origin: top right;
    }
}

.post-dropdown button {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.post-dropdown button:hover {
    background: var(--bg-hover);
}

.post-dropdown button i {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.post-author {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.2;
}

.post-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.post-body {
    margin-bottom: 16px;
    margin-left: 10px;
    /* Align text exactly with the author name (44px avatar + 12px gap) */
}

.post-text {
    line-height: 1.5;
    color: var(--text-primary);
    font-size: 0.92rem;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.post-image {
    width: 100%;
    border-radius: 16px;
    margin-top: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    max-height: 450px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.post-image:hover {
    opacity: 0.95;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10px;
    margin-top: 8px;
}

.post-footer-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.66rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--electric-blue) 78%, #0f172a 22%);
    background: linear-gradient(135deg,
            rgba(var(--electric-blue-rgb), 0.16),
            rgba(var(--electric-blue-rgb), 0.06));
    border: 1px solid rgba(var(--electric-blue-rgb), 0.28);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.38px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 1px 6px rgba(var(--electric-blue-rgb), 0.16);
}

.post-footer-category::before {
    content: "#";
    display: inline-block;
    font-weight: 900;
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.85;
}

.post-stats {
    display: flex;
    gap: 16px;
}

.post-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    color: var(--text-secondary);
}

.post-action-btn:hover {
    background: var(--bg-hover);
    color: var(--electric-blue);
}

.post-action-btn .icon {
    font-size: 0.95rem;
    line-height: 1;
}

.post-action-btn .icon i,
.post-action-btn .icon svg {
    width: 15px;
    height: 15px;
}

.post-action-btn .count {
    font-weight: 700;
    font-size: 0.9rem;
}

.post-action-btn.active {
    color: var(--accent-pink);
    background: rgba(255, 107, 107, 0.1);
}

/* CALL CATEGORY PILL */
.category-pill {
    background: var(--gradient-soft);
    color: var(--electric-blue);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(var(--electric-blue-rgb), 0.2);
    letter-spacing: 0.5px;
}

/* ====================================
   DEDICATED PAGES & COMPONENTS
   ==================================== */

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    background: var(--bg-secondary);
    border-radius: 0.8rem;
    margin: 0.2rem;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
}

.request-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.connection-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.connection-item:hover {
    background: var(--bg-hover) !important;
    transform: translateX(4px);
    border-color: var(--border-color);
}

.connection-item.active {
    background: var(--electric-blue-light) !important;
    border-color: rgba(var(--electric-blue-rgb), 0.2);
}

.suggestion-item {
    transition: background 0.2s;
    cursor: pointer;
}

.suggestion-item:hover {
    background: var(--bg-hover);
}

.avatar-circle {
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.chat-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.profile-stats-row .stat-item {
    text-align: center;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    min-width: 100px;
}

.category-pill {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-actions-menu {
    display: flex;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.post-card:hover .post-actions-menu {
    opacity: 1;
}

/* Tab buttons for Connections Panel */
.tab-btn {
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.tab-btn.active {
    color: var(--electric-blue);
    border-bottom: 2px solid var(--electric-blue);
    border-top: 2px solid var(--electric-blue);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--electric-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* ====================================
   TOAST NOTIFICATIONS
   ==================================== */

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
}

.toast.success::before {
    background: var(--accent-green);
}

.toast.error::before {
    background: #ef4444;
}

.toast.info::before {
    background: var(--electric-blue);
}

.toast.warning::before {
    background: #f59e0b;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* ====================================
   CUSTOM DIALOGS & MODALS
   ==================================== */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 13, 20, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.dialog-box {
    background: var(--bg-primary);
    width: 90%;
    max-width: 420px;
    border-radius: 28px;
    padding: var(--spacing-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: dialogPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dialogPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

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

.dialog-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    display: block;
}

.dialog-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.dialog-message {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
    font-weight: 500;
}

.dialog-actions {
    display: flex;
    gap: var(--spacing-md);
}

.dialog-btn {
    flex: 1;
    padding: 16px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-family: inherit;
}

.dialog-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.dialog-btn-cancel:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.dialog-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(var(--electric-blue-rgb), 0.2);
}

.dialog-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(var(--electric-blue-rgb), 0.3);
}

.dialog-btn-danger {
    background: var(--accent-pink);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 59, 150, 0.2);
}

.dialog-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 59, 150, 0.3);
}

.dialog-btn-gradient-red {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 75, 43, 0.2);
}

.dialog-btn-gradient-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 75, 43, 0.3);
}

.dialog-btn-success {
    background: var(--accent-green);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 214, 125, 0.2);
}

.dialog-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 214, 125, 0.3);
}

.dialog-btn-warning {
    background: #f59e0b;
    color: white;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

/* ====================================
   POST CARD STYLES FOR PROFILE PAGES
   ==================================== */
.post-card-modern {
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.post-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--electric-blue);
}

.post-card-header {
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.post-card-header .track-btn-sm,
.post-header .track-btn-sm {
    margin-left: auto;
    margin-right: 12px;
    /* Margin from the very right edge/menu */
}

.post-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-card-author {
    flex: 1;
}

.post-card-author-name {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.post-card-author-handle {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.post-card-body {
    padding: var(--spacing-lg);
    flex: 1;
}

.post-card-content {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    word-break: break-word;
    font-size: 0.95rem;
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: var(--spacing-md);
    display: block;
}

.post-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ====================================
   MOBILE REFINEMENTS (FORMAL POSTS)
   ==================================== */
@media (max-width: 768px) {
    

    .post-card {
        border-radius: 0.25rem;
        margin-bottom: 0.75rem;
        padding: 0.8rem;
        border-left: none;
        border-right: none;
        background:
            radial-gradient(circle at 8% 0%, rgba(var(--electric-blue-rgb), 0.09), transparent 34%),
            radial-gradient(circle at 92% 18%, rgba(var(--electric-blue-rgb), 0.06), transparent 36%),
            linear-gradient(
                165deg,
                color-mix(in srgb, var(--bg-card) 92%, var(--bg-primary) 8%) 0%,
                color-mix(in srgb, var(--bg-primary) 88%, var(--bg-secondary) 12%) 100%
            );
    }

    .post-avatar {
        width: 2.6rem;
        height: 2.6rem;
    }

    .post-author {
        font-size: 0.85rem;
    }

    .post-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .section-title {
        font-size: 1.15rem;
        margin-bottom: 0.6rem;
    }

    .post-card-modern {
        border-radius: 0.75rem;
        margin-bottom: 0.6rem;
    }

    .post-card-image {
        height: 9rem;
    }

    /* Show full landscape post images on mobile instead of center-cropping. */
    .post-card,
    .post-gallery-wrapper,
    .post-image-container {
        --feed-post-image-fit: contain;
        --feed-post-image-ratio: auto;
    }

    .gallery-slide img {
        min-height: 0;
        max-height: 70vh;
        object-fit: contain;
        background: var(--bg-hover);
    }

    .post-image {
        max-height: 70vh;
        object-fit: contain;
        background: var(--bg-hover);
    }
}

/* ====================================
   PREMIUM CATEGORY SIDEBAR & HOME RIGHT PANEL
   ==================================== */

.category-sidebar-premium,
.hero-section-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.5s ease;
}

.category-info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.category-icon-large {
    font-size: 3rem;
    padding: 10px 18px;
    background: var(--gradient-soft);
    border-radius: 20px;
}

.category-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-hover);
    border-color: rgba(var(--electric-blue-rgb), 0.3);
}

.action-btn.call-btn {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(var(--electric-blue-rgb), 0.2);
    border-radius: var(--radius-xl);
    padding: 1rem 1.25rem;
    max-width: 30rem;
    max-height: 70px;
}

.action-btn.call-btn:hover {
    background: var(--gradient-primary);
    filter: brightness(1.1);
    box-shadow: 0 15px 30px rgba(var(--electric-blue-rgb), 0.3);
    transform: translateY(-4px) scale(1.01);
}

.action-btn.call-btn h3,
.action-btn.call-btn p,
.action-btn.call-btn .icon-pulse {
    color: #ffffff !important;
}

.action-btn.chat-btn {
    background: rgba(var(--electric-blue-rgb), 0.05);
    border-color: rgba(var(--electric-blue-rgb), 0.2);
}

.action-btn.chat-btn:hover {
    background: rgba(var(--electric-blue-rgb), 0.1);
    border-color: var(--electric-blue);
}

.action-btn.chat-btn h3 {
    color: var(--electric-blue);
}

.action-btn h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}

.action-btn p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-icon {
    font-size: 1.5rem;
}

.sidebar-card.insights-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 20px;
}

.communities-teaser {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.mini-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-cat-item {
    display: inline-flex;
    padding: 8px 14px;
    background: var(--bg-hover);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.mini-cat-item:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    color: var(--electric-blue);
}

.view-all-link {
    display: block;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--electric-blue);
    text-decoration: none;
    text-align: right;
}

.back-home-link {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 14px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.back-home-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Home Sidebar Enhancement */
.hero-section-compact h1 {
    font-size: 1.4rem;
    background: var(--text-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.hero-section-compact p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.stats-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 10px 0;
}

.stat-box-mini {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 18px;
    text-align: center;
}

.stat-box-mini h4 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--electric-blue);
}

.stat-box-mini span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.home-cta-card {
    background: var(--gradient-soft);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(var(--electric-blue-rgb), 0.2);
    text-align: center;
    margin: 0px;
}

.chat-date-divider {
    text-align: center;
    position: relative;
    padding: 10px 0;
}

.chat-date-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.chat-date-divider span {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* ====================================
   TRACK BUTTON SYSTEM
   ==================================== */
.track-btn-standard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 22px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--electric-blue-rgb), 0.3);
    line-height: 1;
    text-transform: none;
    letter-spacing: -0.2px;
    gap: 8px;
    margin-right: 5px;
}

.track-btn-standard:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(var(--electric-blue-rgb), 0.4);
    filter: brightness(1.1);
}

.track-btn-standard:active {
    transform: translateY(-1px) scale(0.98);
}

@keyframes trackPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 118, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 118, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 118, 255, 0);
    }
}

.track-btn-standard:not(.active) {
    animation: trackPulse 2s infinite;
}

.track-btn-standard.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    box-shadow: none;
}

.track-btn-standard.active:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
    background: rgba(var(--accent-pink-rgb), 0.05);
}


.track-btn-sm {
    font-size: 0.75rem;
    padding: 3px 12px;
    height: auto;
    min-height: unset;
    min-width: unset;
}

/* Specific adjustment for profile page */
#trackBtnFromProfile {

    padding: 10px 10px;
    font-size: 0.7rem;
}

/* ====================================
   SWIPE NAVIGATION TRANSITIONS
   ==================================== */

/* Container Setup */
body.swipe-nav-active {
    overflow-x: hidden !important;
    width: 100%;
}

.main-content {
    transition: transform 0.35s cubic-bezier(0.15, 1, 0.3, 1), opacity 0.35s ease;
    will-change: transform, opacity;
}

/* Slide Directions */
.page-slide-out-left {
    transform: translateX(-30%) !important;
    opacity: 0;
}

.page-slide-out-right {
    transform: translateX(30%) !important;
    opacity: 0;
}

.page-slide-in-from-right {
    transform: translateX(100%);
    opacity: 0;
}

.page-slide-in-from-left {
    transform: translateX(-100%);
    opacity: 0;
}

.page-slide-in-active {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

/* ====================================
   PREMIUM STYLING: QUIZ & INTERACTION
   ==================================== */
.quiz-card-premium {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
}

.quiz-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.12);
}

.quiz-option-btn:active {
    transform: scale(0.96) !important;
}

.quiz-progress-bar {
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.quiz-badge-floating {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.quiz-letter-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    transition: all 0.2s;
}

/* Ensure post cards are consistent */
.post-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* ====================================
   PREMIUM QUIZ & POST ANIMATIONS
   ==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Ensure quiz cards have proper context */
.quiz-card-premium {
    z-index: 10;
    position: relative;
    box-sizing: border-box;
}

.quiz-option-btn:hover {
    transform: translateY(-2px);
    border-color: var(--electric-blue) !important;
    background: var(--bg-hover) !important;
}

/* ====================================
   PREMIUM MULTI-IMAGE GALLERY SYSTEM
   ==================================== */

.post-gallery-wrapper {
    position: relative;
    width: 100%;
    margin-top: 15px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.post-gallery-container {
    display: flex;
    overflow-x: auto;
    /* Enable manual swipe */
    scroll-snap-type: x mandatory;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    /* Remove gap for seamless full-width slides if navigate by buttons */
    padding: 0;
}

.post-gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    /* Ensure each slide takes 100% of container since we removed peek effect */
    scroll-snap-align: center;
    position: relative;
    border-radius: 0;
    /* Let wrapper handle border-radius */
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slide img {
    width: 100%;
    max-height: 550px;
    min-height: 300px;
    object-fit: cover;
    display: block;
    user-select: none;
    transition: transform 0.6s ease;
}

.gallery-slide:hover img {
    transform: scale(1.02);
}

/* Glass Indicator (3/7) */
.gallery-counter-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Pagination Dots */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-bottom: 5px;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-dot.active {
    background: var(--electric-blue);
    transform: scale(1.4);
    width: 12px;
    border-radius: 6px;
}

/* Desktop Navigation Arrows */
/* Full-height Hit-Zones for Navigation */
.gallery-nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20%;
    /* Large side hit-zones */
    height: 100%;
    transform: none;
    background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.05));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    /* Hidden until hover or active on mobile */
    transition: all 0.3s;
    border-radius: 0;
    box-shadow: none;
}

.gallery-nav-next {
    right: 0;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.05));
}

.gallery-nav-prev {
    left: 0;
}

.post-gallery-wrapper:hover .gallery-nav-btn,
.gallery-nav-btn:active {
    opacity: 1;
}

.gallery-nav-btn i {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    width: 32px;
    height: 32px;
}

.gallery-nav-btn:hover i {
    background: var(--electric-blue);
    transform: scale(1.1);
}

/* Double Tap Heart Animation */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #ff3b96;
    z-index: 100;
    pointer-events: none;
}

.double-tap-heart.animate {
    animation: heartPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    30% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

/* Fullscreen Viewer (Integrated with Lightbox) */
.lightbox-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-gallery-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-weight: 700;
    z-index: 1000;
}

/* Multi-image indicator overlay for first image */
.multi-image-overlay-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    pointer-events: none;
}

/* Create Post Grid Preview Enhancements */
.img-preview-box::after {
    content: "⋮⋮";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    opacity: 0.6;
}

/* ==== SKELETON LOADING SYSTEM ==== */
.skeleton {
    background: linear-gradient(90deg,
            rgba(var(--electric-blue-rgb), 0.05) 25%,
            rgba(var(--neon-purple-rgb), 0.08) 50%,
            rgba(var(--electric-blue-rgb), 0.05) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite var(--ease-in-out-cubic);
    border-radius: var(--radius-md);
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    width: 100%;
    margin-bottom: 0.5em;
}

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

.skeleton-card {
    height: 200px;
    width: 100%;
    border-radius: var(--radius-xl);
}

/* ==== SMOOTH SCROLL HOOKS ==== */
.smooth-entry {
    animation: slideUpFade var(--duration-slow) var(--ease-out-expo) forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Standard User Link Styling */
.user-link {
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-link:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px);
    color: var(--electric-blue) !important;
}

.user-link:active {
    transform: scale(0.97);
}

.suggestion-item:hover {
    background: var(--bg-hover) !important;
    cursor: pointer;
}

/* =========================================================
   DESKTOP FIXED SIDEBARS & SCROLLING CENTER (ISSUE FIX)
   ========================================================= */
@media (min-width: 993px) {

    /* Prevent body from scrolling */
    html,
    body {
        overflow: hidden;
        height: 100vh;
    }

    .app-wrapper {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    /* Ensure header remains static relative to app-wrapper */
    .main-header {
        flex-shrink: 0;
        position: relative !important;
        z-index: 1000;
        top: 0 !important;
        /* Overrides any JS sticking */
        transform: translate3d(0, 0, 0) !important;
    }

    .layout-container {
        flex: 1;
        overflow: hidden;
        height: 100%;
        padding-bottom: 0 !important;
        /* Ensure bottom doesn't cut off inside scroll block */
    }

    /* Sidebars */
    .left-container {
        height: 100%;
        overflow: hidden;
    }

    .menu-options {
        position: relative !important;
        top: 0 !important;
        height: 100% !important;
        /* Fills left container perfectly */
        overflow-y: auto;
        padding-bottom: var(--spacing-2xl);
    }

    .right-container {
        position: relative !important;
        top: 0 !important;
        height: 100% !important;
        /* Prevent overlap & ensure fits */
        overflow-y: auto;
        padding-bottom: var(--spacing-2xl);
    }

    /* Center scroll container */
    .main-content {
        height: 100%;
        overflow-y: auto;
        padding-bottom: var(--spacing-2xl);
    }

    /* Clean scrollbars for desktop */
    .menu-options::-webkit-scrollbar,
    .main-content::-webkit-scrollbar,
    .right-container::-webkit-scrollbar {
        width: 6px;
    }

    .menu-options::-webkit-scrollbar-track,
    .main-content::-webkit-scrollbar-track,
    .right-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .menu-options::-webkit-scrollbar-thumb,
    .main-content::-webkit-scrollbar-thumb,
    .right-container::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 10px;
    }

    .main-content::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);

    }
}

/* --- Load More Combined Feed --- */
.load-more-btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px auto;
    padding: 2px 10px;
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 20px;
    color: var(--electric-blue);
    font-size: 0.5rem;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.05);
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.load-more-btn-premium:hover {
    background: var(--electric-blue);
    color: white !important;
    border-color: var(--electric-blue);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.3);
}

.load-more-btn-premium i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.load-more-btn-premium:hover i {
    transform: translateY(3px);
}

.load-more-btn-premium:active {
    transform: translateY(-1px) scale(1);
}

/* ===== COMPACT FOOTER ===== */
.main-footer {
    padding: 0.6rem 2rem !important;
    background: var(--bg-hover);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-sections {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    width: auto;
    flex-wrap: nowrap;
}

.footer-section {
    min-width: unset;
    display: flex;
    align-items: center;
    gap: 1px;
}

.footer-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-right: 12px;
    border-right: 1px solid rgba(128, 128, 128, 0.3);
}

.footer-list {
    display: flex;
    gap: 1px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0;
}

.footer-list a {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
    margin: 5px
}

.footer-list a:hover {
    color: var(--electric-blue);
}

.footer-bottom {
    text-align: right;
    border-top: none;
    padding-top: 0;
    width: auto;
}

.footer-bottom p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 1023px) {
    .main-footer {
        padding-bottom: 5px !important;
        /* Safety padding for bottom nav */
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
    }

    .footer-sections {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }

    .footer-section {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .footer-section-title {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid rgba(128, 128, 128, 0.2);
        padding-bottom: 2px;
    }

    .footer-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1px;
    }

    .footer-bottom {
        text-align: center;
    }
}

#dedicatedChatInput,
#chatInput,
#categoryChatInput {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    text-align: left;
    direction: ltr;
    unicode-bidi: plaintext;
}

/* Replaced dynamic JS height logic */
.feed-viewport {
    min-height: 100vh;
    height: auto;
}