/* ============================================
   Chalobuddy - Premium Global Design System
   Version: 2.0 (Instagram/Facebook Style)
   ============================================ */

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

/* ---- CSS Variables / Design Tokens ---- */
:root {
    /* Premium Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;
    --primary-glow: rgba(99, 102, 241, 0.15);

    --secondary: #a855f7;
    --secondary-light: #f5f3ff;

    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;

    /* Gradients */
    --grad-premium: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --grad-sunset: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    --grad-ocean: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
    --grad-forest: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;

    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-link: var(--primary);

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --topbar-h: 0px;
    --navbar-h: 70px;
    --sidebar-w: 280px;
    --right-sidebar-w: 340px;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);

    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
input, textarea, select { font-family: var(--font); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */
body.announcement-active {
    --topbar-h: 40px;
}
.announcement-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(90deg, #6366f1 0%, #7c3aed 50%, #a855f7 100%);
    color: #ffffff;
    z-index: 2001;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.announcement-track {
    display: flex;
    overflow: hidden;
    width: 100%;
    position: relative;
    align-items: center;
}
.announcement-content {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 35s linear infinite;
    flex-shrink: 0;
}
.announcement-content span {
    padding: 0 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.announcement-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 12px;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.announcement-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}
@keyframes marquee-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Smooth transitions for elements affected by topbar height */
.navbar, .sidebar, .right-sidebar, .app-layout {
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   TOP UTILITY BAR
   ============================================ */
.top-utility-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    z-index: 1001;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.top-utility-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-links-left, .top-links-right { display: flex; align-items: center; gap: 16px; }
.utility-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}
.utility-link:hover { color: var(--primary); }
.free-listing-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display:flex; align-items:center; gap:4px;
    color: var(--accent);
    font-size: 0.75rem;
    font-family: var(--font);
}
.free-listing-btn:hover { color: #dc2626; }
.login-link {
    font-weight: 700;
    color: var(--primary);
    display: flex; align-items: center;
}

@media(max-width: 768px) {
    .hide-mobile { display: none !important; }
    .top-links-right { gap: 10px; }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: var(--topbar-h); left: 0; right: 0;
    height: var(--navbar-h);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}
.logo i { font-size: 1.4rem; }

/* Search Bar */
.nav-search {
    flex: 1;
    max-width: 360px;
    position: relative;
}
.nav-search input {
    width: 100%;
    padding: 9px 16px 9px 40px;
    background: var(--bg-input);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}
.nav-search input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.nav-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: var(--transition);
}
.nav-search input:focus + i,
.nav-search i { left: 14px; top: 50%; transform: translateY(-50%); }

/* Nav Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.nav-icon-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
}
.nav-icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.05);
}
.nav-avatar {
    width: 37px; height: 37px;
    border-radius: var(--radius-full);
    object-fit: cover;
    cursor: pointer;
    border: 2.5px solid var(--border);
    transition: var(--transition);
}
.nav-avatar:hover { border-color: var(--primary); transform: scale(1.05); }

.badge-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 9px; height: 9px;
    background: var(--accent);
    border-radius: var(--radius-full);
    border: 1.5px solid white;
}

/* ============================================
   LAYOUT WRAPPER
   ============================================ */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr var(--right-sidebar-w);
    gap: 0;
    min-height: 100vh;
    padding-top: calc(var(--navbar-h) + var(--topbar-h));
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   LEFT SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: calc(var(--navbar-h) + var(--topbar-h));
    height: calc(100vh - (var(--navbar-h) + var(--topbar-h)));
    overflow-y: auto;
    padding: 20px 12px;
    border-right: 1px solid var(--border);
    background: var(--bg-white);
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Profile Mini Widget */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}
.sidebar-profile:hover { background: var(--bg-input); }
.sidebar-profile img {
    width: 46px; height: 46px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-light);
}
.sidebar-profile .profile-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}
.sidebar-profile .profile-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.nav-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px 4px;
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: 0.93rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    text-decoration: none;
}
.nav-item i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}
.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-item:hover i { transform: scale(1.1); }
.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

/* ============================================
   MAIN FEED
   ============================================ */
.main-feed {
    min-height: calc(100vh - (var(--navbar-h) + var(--topbar-h)));
    padding: 24px 20px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

/* Stories Section */
.stories-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.stories-row::-webkit-scrollbar { display: none; }

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    text-align: center;
}
.story-item span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-ring {
    width: 64px; height: 64px;
    border-radius: var(--radius-full);
    padding: 3px;
    background: linear-gradient(135deg, #f43f5e, #f97316, #eab308, var(--primary));
    transition: var(--transition-bounce);
}
.story-ring:hover { transform: scale(1.08); }
.story-ring img {
    width: 100%; height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2.5px solid white;
}
.story-add-btn .story-ring {
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe);
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-add-btn .story-ring img { display: none; }
.story-add-inner {
    width: 100%; height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    border: 2.5px solid white;
}

/* Post Creator */
.post-creator {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}
.post-creator-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.post-creator-top img {
    width: 42px; height: 42px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.post-creator-input {
    flex: 1;
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}
.post-creator-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-main);
}
.post-creator-actions {
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}
.creator-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: var(--font);
}
.creator-btn:hover { background: var(--bg-input); }
.creator-btn i { font-size: 1rem; }

/* ============================================
   FEED CARD
   ============================================ */
.feed-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: fadeSlideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.feed-card:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

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

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.card-header .user-ava {
    width: 44px; height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-light);
}
.card-header .user-info { flex: 1; }
.card-header .user-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}
.card-header .user-name .verified-icon {
    color: var(--primary);
    font-size: 0.8rem;
}
.card-header .user-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.card-header .user-meta i { font-size: 0.65rem; }
.card-header .more-btn {
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition);
}
.card-header .more-btn:hover { background: var(--bg-input); color: var(--text-main); }

/* Trip Info Strip */
.trip-info-strip {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
    flex-wrap: wrap;
}
.trip-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.trip-tag.budget { background: #ecfdf5; color: var(--success); }
.trip-tag.date { background: #fef9c3; color: #ca8a04; }

/* Card Image */
.card-image-wrap {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.card-image-wrap img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}
.card-image-wrap:hover img { transform: scale(1.03); }
.card-image-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 40px 16px 16px;
    color: white;
}
.image-location { font-size: 0.82rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }

/* Card Body */
.card-body { padding: 14px 16px; }
.card-caption {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 14px;
}
.card-caption .read-more {
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}
.card-caption .read-more:hover { color: var(--primary); }

/* Action Bar */
.card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}
.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: var(--font);
    position: relative;
    overflow: hidden;
}
.action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.2s;
}
.action-btn:active::after { opacity: 0.06; }
.action-btn:hover { background: var(--bg-input); }
.action-btn i { font-size: 1.05rem; transition: var(--transition-bounce); }
.action-btn:hover i { transform: scale(1.15); }

.action-btn.like-btn.liked { color: var(--accent); }
.action-btn.like-btn.liked i { animation: heartPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* Likes count */
.card-likes {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}
.card-likes span { font-weight: 400; color: var(--text-secondary); }

/* ============================================
   RIGHT SIDEBAR
   ============================================ */
.right-sidebar {
    position: sticky;
    top: calc(var(--navbar-h) + var(--topbar-h));
    height: calc(100vh - (var(--navbar-h) + var(--topbar-h)));
    overflow-y: auto;
    padding: 24px 16px;
    border-left: 1px solid var(--border);
    background: var(--bg-white);
    scrollbar-width: none;
}
.right-sidebar::-webkit-scrollbar { display: none; }

/* Widget */
.widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 16px;
}
.widget-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}


/* Ad widget */
.ad-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    color: white;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.ad-widget::before {
    content: 'AD';
    position: absolute;
    top: 10px; right: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    background: rgba(255,255,255,0.2);
    padding: 2px 7px;
    border-radius: 4px;
}
.ad-widget h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.ad-widget p { font-size: 0.78rem; opacity: 0.9; margin-bottom: 14px; line-height: 1.5; }
.ad-widget-btn {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font);
}
.ad-widget-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* Trends */
.trend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}
.trend-item:last-child { border-bottom: none; }
.trend-item:hover .trend-tag { color: var(--primary); }
.trend-num { font-size: 1.1rem; font-weight: 800; color: var(--border); width: 24px; text-align: center; }
.trend-info { flex: 1; }
.trend-tag { font-size: 0.86rem; font-weight: 600; color: var(--text-main); line-height: 1.2; }
.trend-count { font-size: 0.72rem; color: var(--text-muted); }
.trend-icon { font-size: 1.3rem; }

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f2f5 25%, #e4e6ea 50%, #f0f2f5 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}
.skeleton-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}
.skeleton-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.skeleton-ava { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.skeleton-lines { flex: 1; }
.skeleton-line { height: 10px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-image { height: 280px; border-radius: 8px; margin-bottom: 12px; }
.skeleton-line.w80 { width: 80%; }

/* ============================================
   CARDS (GENERIC)
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-xs);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font);
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-main);
}
.btn-secondary:hover { background: var(--border); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-input); border-color: var(--text-muted); }

.btn-danger {
    background: #fee2e2;
    color: var(--accent);
}
.btn-danger:hover { background: var(--accent); color: white; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; border-radius: var(--radius); }
.btn-full { width: 100%; }
.btn-pill { border-radius: var(--radius-full); }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    position: relative;
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}
.form-input {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
    font-family: var(--font);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-input {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}
.input-icon { position: relative; }
.input-icon .form-input { padding-left: 42px; }
.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}
.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-zone i { font-size: 2rem; color: var(--text-muted); margin-bottom: 10px; }
.upload-zone p { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================
   BADGE & PILL
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.73rem;
    font-weight: 700;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gray { background: var(--bg-input); color: var(--text-secondary); }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f2f5 50%, #f0fdf4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-md);
    animation: fadeSlideUp 0.35s ease;
}

/* ============================================
   ADMIN PANEL THEME
   ============================================ */
.admin-body { background: #f1f5f9; }
.admin-layout { display: flex; min-height: 100vh; }


/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-close:hover { background: #fee2e2; color: var(--accent); }
.modal-body { padding: 22px; }

/* ============================================
   CHAT UI
   ============================================ */
.chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - var(--navbar-h) - 48px);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.chat-list { border-right: 1px solid var(--border); overflow-y: auto; }
.chat-list-header { padding: 18px 16px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: white; z-index: 1; }
.chat-list-header h3 { font-size: 1.1rem; font-weight: 700; }

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.chat-item:hover { background: var(--bg-main); }
.chat-item.active { background: var(--primary-light); border-left: 3px solid var(--primary); }
.chat-item img { width: 46px; height: 46px; border-radius: var(--radius-full); object-fit: cover; flex-shrink: 0; }
.chat-item .ci-info { flex: 1; overflow: hidden; }
.chat-item .ci-name { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
.chat-item .ci-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.chat-item .ci-time { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.online-dot { display: inline-block; width: 10px; height: 10px; background: var(--success); border-radius: 50%; border: 2px solid white; }

.chat-window { display: flex; flex-direction: column; }
.chat-window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: white;
}
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-main);
}
.msg-group { display: flex; flex-direction: column; gap: 4px; }
.msg-group.sent { align-items: flex-end; }
.msg-group.received { align-items: flex-start; }
.msg-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.msg-group.received .msg-bubble {
    background: white;
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-xs);
}
.msg-group.sent .msg-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}
.msg-time { font-size: 0.68rem; color: var(--text-muted); margin: 0 3px; }
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: white;
}
.chat-input {
    flex: 1;
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    font-family: var(--font);
    color: var(--text-main);
}
.chat-input:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.chat-send-btn {
    width: 42px; height: 42px;
    border-radius: var(--radius-full);
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-cover {
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,0.6)); }

.profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 24px;
    margin-top: -60px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}
.profile-pic {
    width: 120px; height: 120px;
    border-radius: var(--radius-full);
    border: 5px solid white;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}
.profile-meta { flex: 1; padding-bottom: 10px; }
.profile-name { font-size: 1.4rem; font-weight: 800; color: var(--text-main); }
.profile-bio { font-size: 0.88rem; color: var(--text-secondary); margin-top: 4px; }
.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 12px;
}
.pstat { text-align: center; }
.pstat-val { font-size: 1.1rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.pstat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 0.83rem; }
.text-xs { font-size: 0.72rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1200px) {
    :root {
        --sidebar-w: 220px;
        --right-sidebar-w: 0px;
    }
    .app-layout { grid-template-columns: var(--sidebar-w) 1fr; }
    .right-sidebar { display: none; }
}

@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    .app-layout { grid-template-columns: 1fr; }
    /* Old sidebar is hidden — replaced by .mobile-nav */
    .sidebar { display: none !important; }
    .main-feed { padding: 16px 12px 80px; }
    .card-image-wrap img { height: 280px; }
}

@media (max-width: 600px) {
    .main-feed { padding: 12px 8px 80px; }
    .auth-card { padding: 28px 22px; }
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; padding: 20px; }
}

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.toast {
    background: #1c1e21;
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}
@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================
   PAGE TRANSITION
   ============================================ */
.page-fade { animation: fadeSlideUp 0.35s ease; }

/* ============================================
   SMART SEARCH DROPDOWN
   ============================================ */
#search-dropdown {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
#search-dropdown::-webkit-scrollbar { width: 5px; }
#search-dropdown::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.search-result-item { transition: var(--transition); }
.search-result-item:hover { background: var(--bg-main); }
.match-badge { display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;font-size:0.6rem;font-weight:800;letter-spacing:0.04em;text-transform:uppercase;margin-left:auto; }
.match-badge.exact   { background:#dcfce7;color:#166534; }
.match-badge.like    { background:var(--primary-light);color:var(--primary); }
.match-badge.soundex { background:#fef9c3;color:#92400e; }
.match-badge.fuzzy   { background:#fce7f3;color:#9d174d; }
.match-badge.random  { background:#f3e8ff;color:#7e22ce; }
.search-result-banner { padding:12px 16px;background:var(--primary-light);border-radius:var(--radius);border:1px solid #bfdbfe;margin-bottom:20px;font-size:0.9rem;color:var(--primary);font-weight:500;display:flex;align-items:center;gap:10px; }
.search-match-tag { padding:2px 9px;border-radius:var(--radius-full);font-size:0.72rem;font-weight:700;background:var(--primary);color:white;margin-left:6px; }
.ad-widget.randomized { background:linear-gradient(135deg,#7c3aed 0%,#4f46e5 100%); }
.ad-widget.matched    { background:linear-gradient(135deg,#0ea5e9 0%,#2563eb 100%); }
.ad-refresh-note { font-size:0.65rem;opacity:0.75;margin-top:-10px;margin-bottom:12px;font-style:italic; }

/* ============================================
   MOBILE BOTTOM NAVIGATION (Instagram-Style)
   ============================================ */
.mobile-nav { display: none; }

@media (max-width: 900px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 62px;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        z-index: 1001;
        align-items: stretch;
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.6rem;
        font-weight: 600;
        border: none;
        background: transparent;
        cursor: pointer;
        font-family: var(--font);
        position: relative;
        padding: 6px 0;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-item i { font-size: 1.32rem; transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1); line-height: 1; }
    .mobile-nav-item .mob-label { font-size: 0.57rem; font-weight: 600; letter-spacing: 0.01em; }
    .mobile-nav-item.active { color: var(--primary); }
    .mobile-nav-item.active i { transform: scale(1.1); }
    .mobile-nav-item:active i { transform: scale(0.88); }

    /* Center "Post" button */
    .mobile-nav-post {
        flex: 0 0 56px;
        width: 48px; height: 48px;
        background: var(--primary);
        border-radius: var(--radius-full);
        display: flex; align-items: center; justify-content: center;
        color: white; font-size: 1.5rem;
        margin: auto 4px;
        box-shadow: 0 4px 18px rgba(59,130,246,0.45);
        border: none; cursor: pointer;
        transition: var(--transition-bounce);
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-post:active { transform: scale(0.88); }

    /* Unread badge */
    .mob-badge {
        position: absolute; top: 4px;
        right: calc(50% - 18px);
        background: var(--accent);
        color: white;
        font-size: 0.52rem; font-weight: 800;
        padding: 1px 5px;
        border-radius: var(--radius-full);
        min-width: 16px; text-align: center;
        border: 1.5px solid white;
        line-height: 1.4;
    }

    /* Navbar on mobile */
    .search-bar { display: none !important; }
    .navbar { padding: 0 14px; gap: 8px; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.1rem; }
    .auth-card { padding: 24px 18px; }
}

/* ============================================
   INSTAGRAM-STYLE CHAT UI
   ============================================ */
:root {
    --chat-sent-bg: linear-gradient(135deg,#4f8ef7 0%,#3b82f6 50%,#2563eb 100%);
    --chat-recv-bg: #f0f2f5;
    --chat-header-h: 66px;
    --chat-input-h: 70px;
}

.ig-chat-layout {
    display: flex;
    height: calc(100vh - var(--navbar-h));
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-top: 16px;
}

/* Sidebar */
.ig-chat-sidebar {
    width: 340px; min-width: 280px;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    background: #fff; flex-shrink: 0;
}
.ig-sidebar-head {
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.ig-sidebar-title { font-size: 1.05rem; font-weight: 800; color: var(--text-main); }
.ig-sidebar-search { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ig-sidebar-search-wrap { position: relative; }
.ig-sidebar-search-wrap i { position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:0.8rem;pointer-events:none; }
.ig-sidebar-search-wrap input {
    width: 100%; padding: 9px 16px 9px 38px;
    background: var(--bg-input); border: none;
    border-radius: var(--radius-full); font-size: 0.87rem;
    outline: none; color: var(--text-main); font-family: var(--font);
}

.ig-conv-list { flex:1; overflow-y:auto; scrollbar-width:none; }
.ig-conv-list::-webkit-scrollbar { display:none; }

.ig-conv-item {
    display:flex; align-items:center; gap:13px;
    padding:12px 18px; cursor:pointer;
    transition: background 0.12s;
    border-bottom:1px solid var(--border-light);
    text-decoration:none; color:inherit;
}
.ig-conv-item:hover, .ig-conv-item.active { background:var(--bg-main); }

.ig-conv-ava-wrap { position:relative; flex-shrink:0; }
.ig-conv-ava { width:52px;height:52px;border-radius:var(--radius-full);object-fit:cover;border:2px solid var(--border-light); }
.ig-conv-online { position:absolute;bottom:2px;right:2px;width:12px;height:12px;background:var(--success);border:2px solid white;border-radius:50%; }

.ig-conv-info { flex:1;min-width:0; }
.ig-conv-name { font-size:0.9rem;font-weight:700;color:var(--text-main);white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.ig-conv-last { font-size:0.78rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px; }
.ig-conv-last.unread { color:var(--text-main);font-weight:600; }
.ig-conv-meta { display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0; }
.ig-conv-time { font-size:0.68rem;color:var(--text-muted); }
.ig-unread-dot { width:8px;height:8px;background:var(--primary);border-radius:50%; }

/* Chat Room */
.ig-chat-room { flex:1;display:flex;flex-direction:column;background:#fff;min-width:0; }

.ig-chat-header {
    height: var(--chat-header-h);
    display:flex; align-items:center; justify-content:space-between;
    padding:0 18px; border-bottom:1px solid var(--border);
    background:rgba(255,255,255,0.98); backdrop-filter:blur(10px);
    flex-shrink:0; z-index:10;
}
.ig-header-left { display:flex;align-items:center;gap:12px; }
.ig-back-btn {
    display:none;
    width:36px;height:36px;border-radius:var(--radius-full);
    background:var(--bg-input);color:var(--text-main);
    align-items:center;justify-content:center;
    text-decoration:none;font-size:0.95rem;border:none;cursor:pointer;
    transition:background 0.15s;
}
.ig-back-btn:hover { background:var(--border); }
.ig-header-ava { width:42px;height:42px;border-radius:var(--radius-full);object-fit:cover;border:2px solid var(--border-light);cursor:pointer; }
.ig-header-name { font-size:0.95rem;font-weight:700;color:var(--text-main);line-height:1.2;cursor:pointer; }
.ig-header-status { font-size:0.72rem;color:var(--success);display:flex;align-items:center;gap:4px; }
.ig-header-status::before { content:'';width:6px;height:6px;background:var(--success);border-radius:50%;display:inline-block; }
.ig-header-actions { display:flex;gap:8px;align-items:center; }
.ig-action-btn {
    width:38px;height:38px;border-radius:var(--radius-full);
    background:var(--bg-input);border:none;display:flex;
    align-items:center;justify-content:center;cursor:pointer;
    color:var(--text-main);font-size:1rem;transition:background 0.15s;text-decoration:none;
}
.ig-action-btn:hover { background:var(--border); }

/* Message area */
.ig-messages {
    flex:1;overflow-y:auto;padding:20px 18px;
    display:flex;flex-direction:column;gap:4px;
    background:#fafafa;scroll-behavior:smooth;
}
.ig-date-sep { text-align:center;margin:14px 0 10px; }
.ig-date-sep span { font-size:0.72rem;font-weight:600;color:var(--text-muted);background:var(--border-light);padding:4px 14px;border-radius:var(--radius-full); }

.ig-partner-intro { display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 20px 20px;gap:10px; }
.ig-partner-intro img { width:86px;height:86px;border-radius:var(--radius-full);object-fit:cover;border:3px solid var(--primary-light);box-shadow:var(--shadow-sm); }
.ig-partner-intro h4 { font-size:1.05rem;font-weight:700;color:var(--text-main);margin:0; }
.ig-partner-intro p { font-size:0.82rem;color:var(--text-muted);margin:0; }

/* Message rows */
.ig-msg-row { display:flex;align-items:flex-end;gap:8px;animation:msgPop 0.2s cubic-bezier(0.34,1.56,0.64,1); }
.ig-msg-row.sent { flex-direction:row-reverse; }
@keyframes msgPop { from{opacity:0;transform:scale(0.92) translateY(6px)} to{opacity:1;transform:scale(1) translateY(0)} }

.ig-msg-ava { width:28px;height:28px;border-radius:var(--radius-full);object-fit:cover;flex-shrink:0;margin-bottom:2px; }
.ig-msg-ava.hidden { visibility:hidden; }

.ig-bubble-wrap { display:flex;flex-direction:column;max-width:68%;gap:2px; }
.ig-msg-row.sent .ig-bubble-wrap { align-items:flex-end; }
.ig-msg-row.recv .ig-bubble-wrap { align-items:flex-start; }

.ig-bubble { padding:10px 16px;border-radius:22px;font-size:0.9rem;line-height:1.5;word-break:break-word; }
.ig-msg-row.sent .ig-bubble  { background:var(--chat-sent-bg);color:white;border-bottom-right-radius:6px; }
.ig-msg-row.recv .ig-bubble  { background:var(--chat-recv-bg);color:var(--text-main);border-bottom-left-radius:6px; }
.ig-bubble-time { font-size:0.65rem;color:var(--text-muted);padding:0 4px; }
.ig-msg-row.sent .ig-bubble-time { text-align:right; }

/* Typing dots */
.ig-typing { display:flex;align-items:center;gap:8px;padding:6px 0;animation:msgPop 0.2s ease; }
.ig-typing-dots { background:var(--chat-recv-bg);border-radius:22px;border-bottom-left-radius:6px;padding:12px 18px;display:flex;gap:5px;align-items:center; }
.ig-typing-dots span { width:7px;height:7px;background:var(--text-muted);border-radius:50%;animation:typingBounce 1.2s infinite;display:block; }
.ig-typing-dots span:nth-child(2) { animation-delay:.2s; }
.ig-typing-dots span:nth-child(3) { animation-delay:.4s; }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

/* Input bar */
.ig-input-bar {
    display:flex;align-items:center;gap:10px;
    padding:12px 14px;border-top:1px solid var(--border);
    background:#fff;flex-shrink:0;min-height:var(--chat-input-h);
}
.ig-input-icon-btn { width:40px;height:40px;border-radius:var(--radius-full);background:transparent;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-muted);font-size:1.2rem;flex-shrink:0;transition:color 0.15s; }
.ig-input-icon-btn:hover { color:var(--primary); }

.ig-input-field {
    flex:1;padding:10px 18px;background:var(--bg-input);
    border:1.5px solid transparent;border-radius:var(--radius-full);
    font-size:0.9rem;outline:none;transition:var(--transition);
    font-family:var(--font);color:var(--text-main);
    line-height:1.5;
}
.ig-input-field:focus { background:#fff;border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow); }

.ig-send-btn {
    width:42px;height:42px;border-radius:var(--radius-full);background:var(--primary);
    border:none;color:white;display:flex;align-items:center;justify-content:center;
    font-size:1rem;cursor:pointer;transition:var(--transition-bounce);flex-shrink:0;
}
.ig-send-btn:hover { background:var(--primary-dark);transform:scale(1.08); }
.ig-send-btn:active { transform:scale(0.92); }
.ig-send-btn:disabled { background:var(--border);cursor:not-allowed;transform:none; }

.ig-like-btn { width:40px;height:40px;border-radius:var(--radius-full);background:transparent;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-muted);font-size:1.35rem;flex-shrink:0;transition:var(--transition-bounce); }
.ig-like-btn:hover { color:var(--accent-pink);transform:scale(1.15); }

/* Empty state */
.ig-empty-state { flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--text-muted);background:#fafafa;text-align:center;padding:40px; }
.ig-empty-icon { width:88px;height:88px;border-radius:var(--radius-full);background:var(--bg-input);display:flex;align-items:center;justify-content:center;font-size:2.4rem; }
.ig-empty-state h3 { font-size:1.1rem;font-weight:700;color:var(--text-main); }
.ig-empty-state p  { font-size:0.85rem;max-width:260px;line-height:1.6; }

/* Mobile chat */
@media (max-width: 768px) {
    .ig-chat-layout {
        height: calc(100dvh - var(--navbar-h) - 62px);
        margin-top: 0; border:none; border-radius:0; box-shadow:none;
    }
    .ig-chat-sidebar { width:100%;min-width:0;border-right:none; }
    .ig-chat-sidebar.partner-open-state { display:none; }
    .ig-chat-room { display:none; }
    .ig-chat-room.partner-open-state { display:flex; }
    .ig-back-btn { display:flex !important; }
    .ig-messages { padding:14px 10px; }
    .ig-bubble { font-size:0.88rem;padding:9px 14px; }
    .ig-input-bar { padding:10px; }
}

/* ============================================
   PORTAL / LANDING PAGE (JustDial Style)
   ============================================ */
.portal-main { width: 100%; margin: 0 auto; padding-bottom: 40px; }

/* Hero */
.portal-hero { position: relative; border-radius: 24px; background: linear-gradient(135deg, rgba(2, 132, 199, 0.85), rgba(79, 70, 229, 0.8), rgba(219, 39, 119, 0.6)), url('https://images.unsplash.com/photo-1506929562872-bb421503ef21?q=80&w=1200&auto=format&fit=crop') center/cover; padding: 70px 30px; text-align: center; color: white; margin-bottom: 30px; box-shadow: 0 24px 50px -12px rgba(79, 70, 229, 0.35); overflow:hidden; border: 1px solid rgba(255,255,255,0.15); }
.portal-hero::after { content:''; position:absolute; inset:0; background:radial-gradient(circle at top right, rgba(255,255,255,0.25) 0%, transparent 60%); pointer-events:none; }
.hero-content { position:relative; z-index:2; flex-direction:column; align-items:center; }
.hero-badge { display:inline-block; padding:8px 20px; background:rgba(255,255,255,0.15); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-radius:30px; font-size:0.85rem; font-weight:800; text-transform:uppercase; letter-spacing:1px; margin-bottom:20px; border:1px solid rgba(255,255,255,0.35); box-shadow: 0 8px 20px rgba(0,0,0,0.15); color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.2); }
.hero-title { font-size: 3.2rem; font-weight: 800; margin-bottom: 16px; letter-spacing:-1px; text-shadow: 0 12px 30px rgba(0,0,0,0.3); line-height:1.1; }
.hero-subtitle { font-size: 1.15rem; max-width:650px; margin: 0 auto 36px; opacity: 0.95; font-weight: 500; line-height: 1.6; text-shadow: 0 4px 10px rgba(0,0,0,0.4); }

/* Glass Search Bar */
.glass-search { position:relative; max-width:600px; margin:0 auto; }
.glass-search .input-icon { background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.8); padding: 8px 8px 8px 26px; border-radius: 50px; display:flex; align-items:center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease; }
.glass-search .input-icon:focus-within { transform: translateY(-4px) scale(1.01); box-shadow: 0 25px 50px rgba(0,0,0,0.25); background: rgba(255,255,255,0.98); }
.location-icon { color: var(--primary) !important; font-size: 1.3rem !important; margin-right:12px; }
.search-btn-huge { padding: 14px 34px !important; font-size: 1.05rem !important; font-weight: 800 !important; background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important; border:none; box-shadow: 0 8px 20px rgba(37,99,235,0.3) !important; color:white; }
.search-btn-huge:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 25px rgba(37,99,235,0.4) !important; }

/* Categories */
.portal-categories { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 30px; }
.cat-card { background: white; border: 1px solid rgba(0,0,0,0.04); border-radius: 20px; padding: 20px 16px; text-align: center; color: var(--text-main); font-weight: 700; font-size: 0.9rem; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 15px rgba(0,0,0,0.03); cursor: pointer; text-decoration: none; position:relative; overflow:hidden;}
.cat-card::after { content:''; position:absolute; inset:0; border-radius:20px; box-shadow: inset 0 0 0 2px transparent; transition:0.3s; pointer-events:none; }
.cat-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.cat-card:hover::after { box-shadow: inset 0 0 0 2px var(--primary-light); }
.cat-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 12px; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cat-card:hover .cat-icon { transform: scale(1.15) translateY(-4px); box-shadow: 0 10px 20px currentColor; }


/* Banner Ad */
.portal-banner-wrap { margin-bottom: 28px; }
.portal-banner-ad { display: flex; background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--text-main); transition: var(--transition); box-shadow: var(--shadow-sm); }
.portal-banner-ad:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.portal-banner-ad img { width: 40%; object-fit: cover; border-right: 1px solid var(--border-light); }
.banner-ad-content { flex: 1; padding: 24px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg, #f8fafc, #f1f5f9); }
.banner-ad-content h4 { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 8px; }
.banner-ad-content p { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.5; }
.banner-ad-content .btn { align-self: flex-start; padding: 8px 20px; font-size:0.85rem; }

/* Feed Grid */
.portal-feed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.portal-feed-grid .feed-card { margin-bottom: 0; height:100%; display:flex; flex-direction:column; }
.portal-feed-grid .card-image-wrap img { height: 260px; }
.portal-feed-grid .card-body { flex:1; display:flex; flex-direction:column; }

/* Feed Ad Card */
.ad-card { border: 2px solid var(--primary-light); background:#fdf8f6; overflow:hidden;}
.ad-card::before { content:'SPONSORED'; position:absolute; top:14px; right:14px; background:rgba(0,0,0,0.6); color:white; font-size:0.6rem; font-weight:800; padding:3px 8px; border-radius:4px; z-index:2; letter-spacing:1px; }

@media (max-width: 900px) {
    .portal-categories { grid-template-columns: repeat(3, 1fr); }
    .portal-feed-grid { grid-template-columns: 1fr; }
    .portal-feed-grid .card-image-wrap img { height: 320px; }
    .trending-destinations { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .portal-hero { padding: 40px 20px; }
    .portal-hero h1 { font-size: 1.8rem; }
    .portal-categories { grid-template-columns: repeat(2, 1fr); gap:10px; }
    .portal-banner-ad { flex-direction: column; }
    .portal-banner-ad img { width: 100%; height: 180px; border-right: none; border-bottom: 1px solid var(--border-light); }
    .trending-destinations { display: flex; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
    .trending-destinations::-webkit-scrollbar { display: none; }
    .trending-card { width: 150px; flex-shrink: 0; }
    .feat-trip-card { width: 260px; height: 340px; }
    .hero-search-bar { width: 100%; }
    .hero-search-bar .input-icon { flex-direction: column; padding: 6px; border-radius: var(--radius-lg); }
    .hero-search-bar .input-icon i { display: none; }
    .hero-search-bar input { padding: 12px; width: 100%; text-align: center; border-bottom: 1px solid var(--border-light); margin-bottom: 6px; }
    .hero-search-bar button { width: 100%; }
}

/* Trending Destinations */
.trending-destinations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.trending-card { position: relative; border-radius: 24px; overflow: hidden; height: 220px; box-shadow: 0 10px 20px rgba(0,0,0,0.06); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); text-decoration: none; color: white; display: block; }
.trending-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.trending-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.trending-card:hover img { transform: scale(1.15); }
.trending-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 20px 20px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%); text-align: left; transition: padding 0.3s ease; }
.trending-card:hover .trending-info { padding-bottom: 25px; }
.trending-info h4 { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; text-shadow: 0 4px 8px rgba(0,0,0,0.6); }
.trending-info p { font-size: 0.85rem; font-weight: 600; opacity: 0.9; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }

/* Featured Trips Scroll */
.featured-trips-scroll { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; margin-bottom: 30px; scrollbar-width: none; }
.featured-trips-scroll::-webkit-scrollbar { display: none; }
.feat-trip-card { position: relative; width: 320px; height: 420px; border-radius: 28px; overflow: hidden; flex-shrink: 0; box-shadow: 0 12px 30px rgba(0,0,0,0.1); display: block; text-decoration: none; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.feat-trip-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(0,0,0,0.2); }
.feat-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.feat-trip-card:hover .feat-bg { transform: scale(1.08); }
.feat-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 30%, rgba(0,0,0,0.85) 100%); display: flex; flex-direction: column; justify-content: space-between; padding: 24px; color: white; transition: background 0.3s ease; }
.feat-trip-card:hover .feat-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, rgba(0,0,0,0.95) 100%); }
.feat-user { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.15); padding: 8px 16px 8px 8px; border-radius: 50px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.2); width: fit-content; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.3s ease; }
.feat-trip-card:hover .feat-user { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.4); }
.feat-user img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.feat-user span { font-size: 0.85rem; font-weight: 700; text-shadow:0 1px 2px rgba(0,0,0,0.3); }
.feat-bottom { margin-top: auto; }
.feat-bottom h4 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; line-height: 1.2; text-shadow: 0 4px 8px rgba(0,0,0,0.6); }
.feat-bottom p { font-size: 0.95rem; font-weight: 700; opacity: 0.95; text-shadow: 0 2px 4px rgba(0,0,0,0.6); display:flex; align-items:center; gap:8px; }
