:root {
    --primary: #2563eb;
    --primary-rgb: 37, 99, 235;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-rgb: 16, 185, 129;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --dark: #111827;
    --dark-light: #1f2937;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --light: #f9fafb;
    --white: #ffffff;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --info: #0284c7;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
    --bg-primary: var(--white);
    --bg-primary-rgb: 255, 255, 255;
    --bg-secondary: var(--light);
    --bg-secondary-rgb: 249, 250, 251;
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --border-color: var(--gray-200);
}

[data-theme="dark"] {
    --bg-primary: #020617;   /* Deeper background */
    --bg-primary-rgb: 2, 6, 23;
    --bg-secondary: #0f172a; /* Card/Surface background */
    --bg-secondary-rgb: 15, 23, 42;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #1e293b;
    --light: #1e293b;
    --white: #020617;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
    --dark: #f8fafc;
    --dark-light: #e2e8f0;
}

/* Premium Blog-style Hero Gradient */
.deep-dark-hero {
    background: linear-gradient(135deg, #020617 0%, #0f172a 60%, #020617 100%) !important;
    position: relative;
    overflow: hidden;
}

.deep-dark-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(37,99,235,0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(139,92,246,0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* Landing Page Hero & Zuri AI Dark Mode Fixes */
[data-theme="dark"] .hero-label {
    background: #1e293b !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

[data-theme="dark"] .hero-label p:first-child {
    color: #f8fafc !important;
}

[data-theme="dark"] .hero-label p:last-child {
    color: #94a3b8 !important;
}

[data-theme="dark"] .zuri-promo-text {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .zuri-lp-chat {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

[data-theme="dark"] .zuri-lp-msg-received {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .zuri-lp-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .zuri-lp-input {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] .title,
[data-theme="dark"] .step-card h4,
[data-theme="dark"] .feature-card h3,
[data-theme="dark"] .footer-section h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .description,
[data-theme="dark"] p,
[data-theme="dark"] .bio {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .category-card span {
    color: var(--text-primary);
}

.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.marketplace-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    padding: 40px 0;
}

.filters-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section h4 {
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.filter-option:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.filter-option.active {
    background: var(--primary);
    color: white !important;
}

.filter-option i {
    width: 16px;
    text-align: center;
}

/* Improved Marketplace Cards - Facebook Style */
.product-card-marketplace {
    /* Glassmorphism card */
    background: var(--bg-secondary);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: grab;
}

.product-card-marketplace:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px var(--shadow-hover);
    border-color: var(--primary);
}

.product-card-marketplace.dragging { cursor: grabbing; opacity: 0.9; }

.products-grid-marketplace {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.product-image-wrapper {
    height: 140px;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    width: 100%;
}

.product-image-wrapper .zuri-mini {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
    padding: 2px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(135deg, #3b82f6, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    z-index: 30;
}

.product-image-wrapper .zuri-mini svg { display: block; width: 100%; height: 100%; }

.product-content {
    padding: 12px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.product-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2px 0;
}

.product-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.card-meta-info { margin-top: 4px; }

.seller-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

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

.seller-avatar-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.seller-details {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.seller-username {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.verification-badge {
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.verification-badge.verified {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.verification-badge.unverified {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.verification-badge i {
    font-size: 0.55rem;
}

.card-meta-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.time-ago {
    display: flex;
    align-items: center;
    gap: 3px;
}

.time-ago i {
    font-size: 0.55rem;
}

.location-tag {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 3px;
    width: fit-content;
}

.location-tag i {
    font-size: 0.55rem;
}

.zuri-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 6px 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.zuri-chat-btn i {
    font-size: 0.8rem;
}

.zuri-chat-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.zuri-chat-btn .chat-text {
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    gap: 8px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-bottom: 12px;
}

.mobile-filter-toggle:hover {
    background: var(--primary-dark);
}

.mobile-filter-toggle i {
    font-size: 1rem;
}

.filter-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 4px;
    padding: 8px 0;
    min-width: 100%;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.filter-dropdown-content.show {
    display: flex;
    flex-direction: column;
}

.filter-section {
    position: relative;
}

.filter-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 8px;
}

.filter-dropdown-toggle:hover {
    background: var(--bg-secondary);
}

.filter-dropdown-toggle.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.zuri-anchor {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.zuri-anchor.drag-active .zuri-avatar {
    transform: scale(1.12);
    box-shadow: 0 14px 40px rgba(139,92,246,0.5);
}

.zuri-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    animation: floatZuri 3s ease-in-out infinite;
    border: 2px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(2, 132, 199, 0.15));
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.zuri-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#zuriDefault {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#zuriDefault svg {
    width: 100%;
    height: 100%;
}

@keyframes floatZuri {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.zuri-speech {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(2, 132, 199, 0.95));
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(11,46,90,0.45);
    transform-origin: right bottom;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 180px;
    text-align: center;
}

.zuri-speech.visible { opacity: 1; transform: translateY(-6px); }
.zuri-speech.hidden { opacity: 0; transform: translateY(0); }

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUpModal 0.3s ease;
}

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

.zuri-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.modal-zuri {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: contain;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    padding: 4px;
    flex-shrink: 0;
}

.zuri-fallback-svg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
}

.zuri-modal .modal-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 24px;
}

.zuri-message {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.zuri-inspection {
    background: rgba(139,92,246,0.08);
    border-left: 3px solid #8b5cf6;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.inspection-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.inspection-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.detail-row .label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-row .value {
    color: var(--primary);
    font-weight: 600;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.product-card-marketplace.dragging {
    cursor: grabbing;
    opacity: 0.8;
    transform: scale(0.95);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37,99,235,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

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

/* Mobile adjustments for Zuri modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .zuri-modal .modal-header {
        padding: 16px;
    }
    
    .zuri-modal .modal-header h2 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
    }
    
    .detail-row {
        padding: 6px;
        font-size: 0.85rem;
    }
    
    .zuri-anchor {
        right: 16px;
        bottom: 90px;
    }
}

/* Horizontal pills */
.horizontal-pills { margin-top: 14px; margin-bottom: 10px; }
.horizontal-pills .pills-scroll { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; }
.horizontal-pills .pill { flex: 0 0 auto; padding:8px 12px; background: rgba(255,255,255,0.02); border-radius: 999px; color:var(--text-secondary); border:1px solid rgba(255,255,255,0.03); font-weight:600; text-decoration:none; }
.horizontal-pills .pill.active { background: linear-gradient(135deg,#111827,#0b1222); color:var(--white); border-color: rgba(139,92,246,0.6); box-shadow: 0 6px 18px rgba(11,46,90,0.45); }

/* mobile bottom nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15,23,42,0.98);
    border-top: 1px solid rgba(255,255,255,0.03);
    padding: 6px 12px;
    z-index: 1300;
    justify-content: space-around;
}
.mobile-bottom-nav a { color: var(--text-secondary); font-weight:600; text-decoration:none; display:flex; flex-direction:column; align-items:center; gap:4px; font-size:0.8rem; }

@media (max-width: 768px) {
    .zuri-anchor { right: 20px; bottom: 78px; }
    .mobile-bottom-nav { display:flex; }
    .marketplace-layout { padding-bottom: 84px; }
    
    .products-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .image-wrapper {
        height: 150px;
    }
    
    .card-body {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }
    
    .image-wrapper {
        height: 180px;
    }
}

@media (max-width: 1024px) {
    .products-grid-marketplace {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .product-image-wrapper {
        height: 120px;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .marketplace-layout {
        display: flex !important;
        flex-direction: column !important;
        padding: 20px 0 !important;
    }
    
    .mobile-filter-toggle {
        display: flex !important;
    }
    
    .filters-sidebar {
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 100vh !important;
        background: var(--bg-primary) !important;
        padding: 16px !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
    }
    
    .filters-sidebar.active {
        transform: translateX(0) !important;
    }
    
    .filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .close-mobile-filters {
        background: transparent;
        border: none;
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
        display: flex !important;
    }
    
    .products-grid-marketplace {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: 12px;
    }
    
    .product-image-wrapper {
        height: 100px;
    }
    
    .product-content {
        padding: 10px 8px;
    }
    
    .product-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .product-price {
        font-size: 0.9rem;
        margin: 1px 0;
    }
    
    .product-footer {
        gap: 6px;
        margin-bottom: 2px;
    }
    
    .seller-username {
        font-size: 0.65rem;
    }
    
    .card-meta-info {
        font-size: 0.6rem;
        margin-bottom: 4px;
    }
    
    .zuri-chat-btn {
        padding: 5px 6px;
        font-size: 0.7rem;
        gap: 3px;
        margin-top: 2px;
    }
    
    .zuri-chat-btn i {
        font-size: 0.7rem;
    }
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-marketplace:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card-marketplace:hover .product-overlay {
    opacity: 1;
}

.view-product {
    background: white;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.view-product:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Product Info Section - Compact */
.product-info {
    padding: 10px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-info h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

/* Seller Row with Verification */
.seller-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 0.7rem;
    flex-wrap: wrap;
}

.seller-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.seller-mini .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    background: var(--primary);
    position: relative;
    flex-shrink: 0;
}

.seller-mini .avatar.verified-avatar {
    background: linear-gradient(135deg, #10b981, #059669);
}

.seller-mini .avatar.unverified-avatar {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.seller-mini .avatar i {
    font-size: 0.5rem;
    position: absolute;
}

.seller-mini .name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Verification Badge */
.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.verification-badge.verified {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.verification-badge.unverified {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.verification-badge i {
    font-size: 0.75rem;
}

/* University Tag */
.uni-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.uni-tag i {
    font-size: 0.7rem;
}

/* Time Ago */
.time-ago {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Dark Mode visibility fixes */
[data-theme="dark"] .product-overlay .view-product {
    background: var(--bg-primary);
    color: var(--primary);
    border: 1px solid var(--primary);
}

[data-theme="dark"] .search-input {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .filter-option:not(.active):hover {
    background: #1e293b;
}

[data-theme="dark"] .card, 
[data-theme="dark"] .auth-container,
[data-theme="dark"] .modal-content {
    background: #0f172a;
    border-color: #1e293b;
}

[data-theme="dark"] .btn-outline {
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .btn-outline:hover {
    background: #1e293b;
}

[data-theme="dark"] .footer {
    background: #020617;
}

[data-theme="dark"] .ticker-item {
    color: #ffffff;
}

[data-theme="dark"] .product-card-marketplace,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .product-card,
[data-theme="dark"] .category-card,
[data-theme="dark"] .stat-item,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .how-it-works,
[data-theme="dark"] .auth-container,
[data-theme="dark"] .billing-section,
[data-theme="dark"] .user-card,
[data-theme="dark"] .item-card,
[data-theme="dark"] .stat-box,
[data-theme="dark"] .billing-search-bar,
[data-theme="dark"] .billing-table-container {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .user-card-title,
[data-theme="dark"] .item-card-title,
[data-theme="dark"] .stat-box-value,
[data-theme="dark"] .product-title,
[data-theme="dark"] .product-info .title {
    color: #f8fafc !important;
}

[data-theme="dark"] .user-card-meta,
[data-theme="dark"] .item-card-meta,
[data-theme="dark"] .stat-box-label,
[data-theme="dark"] .product-info .meta {
    color: #94a3b8 !important;
}

[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

.footer-contact {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-links {
    margin-top: 24px;
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Global Text Decoration Suppression - Fail-safe Reset */
a, a:hover, a:focus, a:active, a:visited, 
.nav-links a, .mp-card, .blog-card, .footer a {
    text-decoration: none !important;
}

img {
    max-width: 100%;
    height: auto;
}

.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .logo i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Navbar notification badge */
.navbar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 2px 12px rgba(239, 68, 68, 0.8);
    }
}

.nav-links .btn-primary {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
}

.nav-links .btn-primary:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: -0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 12px;
}

.theme-toggle {
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--gray-200);
    color: var(--primary);
}

.hero {
    background: var(--bg-primary);
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.section {
    padding: 60px 0;
}

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

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.carousel-container {
    margin-bottom: 40px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-200);
    min-height: 360px;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 360px;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.carousel-caption h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.announcement-ticker {
    background: var(--primary);
    color: white;
    padding: 12px 0;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    animation: ticker 22s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.ticker-item {
    padding: 0 40px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 40px 0;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 12px;
}

.category-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.how-it-works {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.marketplace-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding: 32px 0;
}

.sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.marketplace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-box {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-toggle button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.view-toggle button.active,
.view-toggle button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 20px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.image-wrapper img,
.image-wrapper > div {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card:hover .image-wrapper img {
    transform: scale(1.05);
    transition: var(--transition);
}

.card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body .title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-image {
    height: 180px;
    overflow: hidden;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
}

.product-info .category-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.product-info .title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    margin-top: auto;
}

.product-info .meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.product-detail {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 32px 0;
}

.profile-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.profile-product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-product-image {
    height: 140px;
    width: 100%;
}

.profile-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-product-info {
    padding: 12px;
    flex: 1;
}

.profile-product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

.product-gallery {
    border-radius: var(--radius);
    overflow: hidden;
}

.product-gallery img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.product-detail-info .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.product-detail-info .description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.seller-info {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.seller-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.seller-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.seller-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.verified-badge {
    color: var(--info);
    font-size: 0.9rem;
    margin-left: 4px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group .help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.auth-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.auth-container h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-container .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.auth-container .divider {
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-container .auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-container .auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(37, 99, 235, 0.8) 100%);
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-bottom: 32px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.profile-header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: start;
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    transition: all 0.3s ease;
}

.profile-avatar-clickable {
    cursor: pointer;
}

.profile-avatar-clickable:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-picture-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 500;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: white;
}

.profile-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-username {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.profile-meta-item i {
    flex-shrink: 0;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    margin-top: 8px;
}

.profile-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-actions .btn {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border: none;
    flex: 0 1 auto;
}

.profile-actions .btn:hover {
    background: white;
    transform: translateY(-2px);
}

/* Profile Modal */
.profile-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.profile-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.profile-modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 600px;
    max-height: 600px;
}

.profile-modal-placeholder {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary), rgba(37, 99, 235, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    font-weight: 700;
}

.profile-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.profile-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.chat-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    margin-bottom: 80px;
}

.chat-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    box-shadow: inset -1px 0 0 var(--border-color);
}

.chat-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.chat-sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.chat-sidebar-header h2 i {
    font-size: 1.4rem;
}

.notification-badge-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* Custom scrollbar styling */
.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background 0.2s;
}

.chat-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.chat-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 12px;
    margin: 4px 8px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    cursor: pointer;
    user-select: none;
}

.chat-item-image-wrapper {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-item-image-wrapper img,
.chat-item-image-wrapper > div {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unread-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--border-color), 0 0 8px rgba(239, 68, 68, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 2px var(--border-color), 0 0 8px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 0 2px var(--border-color), 0 0 16px rgba(239, 68, 68, 0.8);
    }
}

.chat-list-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.chat-list-item:hover .chat-item-image-wrapper img,
.chat-list-item:hover .chat-item-image-wrapper > div {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-list-item img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
}

.chat-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-info h4 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 4px 0;
    transition: color 0.2s;
}

.chat-list-item:hover .chat-info h4 {
    color: var(--primary);
}

.chat-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    transition: color 0.2s;
}

.chat-list-item:hover .chat-info p {
    color: var(--text-primary);
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    flex-shrink: 0;
    min-width: 60px;
}

.chat-time {
    font-size: 0.73rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    transition: color 0.2s;
}

.chat-list-item:hover .chat-time {
    color: var(--text-primary);
}

/* Notification Badge for messages */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    transition: all 0.2s;
}

.notification-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Unread conversation indicator */
.notification-badge.unread {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.05);
    }
}

/* Unread conversation styling */
.chat-list-item.unread-conversation {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 3px solid var(--primary);
    font-weight: 500;
}

.chat-list-item.unread-conversation:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

/* Read status indicator */
.chat-status-read {
    font-size: 0.8rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

/* Message status icons */
.message-status {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    margin-left: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.message-status.read {
    color: #3b82f6;
}

.message-status.read:hover::after {
    content: attr(data-time);
    position: absolute;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    pointer-events: none;
}

.message-status.unread {
    color: var(--gray-400);
}

.message-status.new-message {
    color: var(--primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.chat-main {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    overflow: hidden;
}

.chat-header {
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-header img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid var(--border-color);
}

.chat-header:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-header-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.chat-header-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

/* Chat Verification Badge */
.chat-verification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.chat-verification-badge.verified {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.chat-verification-badge.unverified {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    padding-bottom: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 12px;
    animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.message-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.message-text {
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    font-size: 0.95rem;
    margin: 0;
    display: block;
    -webkit-user-select: text;
    user-select: text;
}

/* Fix emoji display - prevent downward shift */
.message-text img[alt*="emoji"],
.message-text img[alt*="smile"] {
    vertical-align: middle;
    height: 1.2em;
    display: inline;
    margin: 0 2px;
}

.message.sent .message-content {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.message.sent .message-content:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.message.sent {
    align-self: flex-end;
    margin-left: 20px;
}

.message.received .message-content {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #1f2937;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message.received .message-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.message.received {
    align-self: flex-start;
    margin-right: 20px;
}

[data-theme="dark"] .message.received .message-content {
    background: linear-gradient(135deg, #3f3f46 0%, #35353a 100%);
    color: #f4f4f5;
    border: 1px solid #52525b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .message.received .message-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Marketplace Mobile Improvements */
@media (max-width: 768px) {
    .marketplace-hero {
        padding: 40px 0;
        text-align: center;
    }
    
    .search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        padding: 12px;
    }
    
    .filters-sidebar {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .filter-options {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-option {
        padding: 6px 12px;
        background: var(--bg-secondary);
        border-radius: 20px;
        border: 1px solid var(--border-color);
        font-size: 0.8rem;
    }
    
    .filter-option.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
}

.chat-list-item.admin-broadcast-item {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 14px 12px;
    margin: 4px 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.chat-list-item.admin-broadcast-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(245, 158, 11, 0.03) 100%);
    pointer-events: none;
}

.chat-list-item.admin-broadcast-item:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%);
    border-left-color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.chat-list-item.admin-broadcast-item .chat-avatar-admin {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.chat-list-item.admin-broadcast-item:hover .chat-avatar-admin {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.marketplace-hero {
    background: var(--bg-primary);
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.marketplace-search {
    max-width: 600px;
    margin: 24px auto 0;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
}

.search-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-btn {
    padding: 0 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .marketplace-layout {
        display: flex;
        flex-direction: column;
    }
    
    .filters-sidebar {
        order: 2;
    }
    
    .products-main {
        order: 1;
    }
}

.message.admin-broadcast .admin-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
}

.message .time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

.message img {
    max-width: 250px;
    border-radius: var(--radius);
    margin-top: 8px;
}

.chat-input {
    padding: 24px 24px 40px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-top: 2px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    min-height: 180px;
}

.chat-input:hover {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.chat-input form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    transition: all 0.3s ease;
}

.chat-input textarea {
    flex: 1;
    min-height: 100px;
    max-height: 200px;
    resize: none;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background: var(--bg-primary);
}

.chat-input textarea::placeholder {
    color: var(--text-secondary);
}

.admin-dashboard .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.stat-icon.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-icon.secondary {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.stat-icon.warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.stat-icon.info {
    background: rgba(2, 132, 199, 0.1);
    color: var(--info);
}

.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-card .stat-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-table-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
}

.admin-table td {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.status-badge.banned {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.ai-assistant {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 1000;
}

.ai-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    z-index: 1998;
    position: relative;
}

.ai-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

.ai-toggle-btn:active {
    transform: scale(0.95);
}

.ai-toggle-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
}

.ai-toggle-btn:hover .ai-toggle-tooltip {
    opacity: 1;
}

.ai-chat-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
    display: none;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 1999;
}

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

.ai-chat-window.active {
    display: flex;
    flex-direction: column;
}

.ai-chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(37, 99, 235, 0.8) 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.ai-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255,255,255,0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255,255,255,0.6);
    }
}

.ai-header-content {
    flex: 1;
}

.ai-chat-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.ai-status {
    font-size: 0.75rem;
    opacity: 0.95;
    display: block;
    font-weight: 500;
}

.ai-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.ai-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.ai-chat-body {
    height: 370px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-secondary);
}

.ai-chat-body::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.ai-chat-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.ai-message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

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

.ai-message .bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ai-message.bot .bubble {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.ai-message.user {
    justify-content: flex-end;
}

.ai-message.user .bubble {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
}

.ai-chat-input {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.ai-chat-input form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.ai-chat-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ai-product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-top: 8px;
    display: flex;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.ai-product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.ai-product-card img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ai-product-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.ai-product-info .price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.toast.warning .toast-icon {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.toast.info .toast-icon {
    background: rgba(2, 132, 199, 0.1);
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-content p {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.listing-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 1024px) {
    .marketplace-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 24px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-dashboard .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 0 16px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        gap: 8px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
    }
    
    .hero {
        padding: 48px 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-dashboard .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
        margin-bottom: 100px;
    }
    
    .chat-sidebar {
        height: auto;
        max-height: 300px;
    }
    
    .chat-main {
        min-height: 60vh;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .stats-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .profile-header {
        padding: 32px 24px;
    }
    
    .profile-header-content {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: center;
    }
    
    .profile-picture-section {
        margin-bottom: 16px;
    }
    
    .profile-avatar {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
    
    .profile-username {
        font-size: 1.8rem;
    }
    
    .profile-header-top {
        justify-content: center;
    }
    
    .profile-info {
        align-items: center;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-actions .btn {
        width: 100%;
    }
    
    .profile-modal-placeholder {
        width: 80vw;
        height: 80vw;
        font-size: 4rem;
    }
    
    .carousel-item {
        height: 240px;
    }
    
    .ai-chat-window {
        width: calc(100vw - 48px);
        right: -12px;
    }
    
    .auth-container {
        margin: 24px 16px;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 12px;
        right: 12px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .message {
        max-width: 85%;
    }

    .message-image {
        max-width: 160px;
        max-height: 200px;
    }

    .message-meta {
        font-size: 0.7rem;
        gap: 4px;
        padding: 0 2px;
    }

    .time {
        font-size: 0.7rem;
    }

    .message-status {
        font-size: 0.75rem;
        margin-left: 2px;
    }

    .chat-messages {
        padding: 16px;
        padding-bottom: 140px;
        gap: 12px;
    }

    .chat-input {
        padding: 16px 12px 20px;
    }
    
    .search-box {
        max-width: none;
        width: 100%;
    }
    
    .marketplace-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

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

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

/* ===== GLOBAL DARK MODE CONSISTENCY FIXES ===== */

/* All links: no underlines ever */
a, a:link, a:visited, a:hover, a:active, a:focus {
    text-decoration: none !important;
}

/* Force dark backgrounds on every surface when in dark mode */
[data-theme="dark"] body {
    background-color: #020617 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] section,
[data-theme="dark"] main,
[data-theme="dark"] .section,
[data-theme="dark"] .how-it-works {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .step-card,
[data-theme="dark"] .step-card p,
[data-theme="dark"] .step-card h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-contact-item,
[data-theme="dark"] .footer-contact-item span,
[data-theme="dark"] .footer-bottom p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .footer-links a:hover {
    color: var(--primary) !important;
}

[data-theme="dark"] .footer-section h4 {
    color: #f8fafc !important;
}

/* Forms stay dark */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #64748b !important;
}

/* Category & product cards */
[data-theme="dark"] .category-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .category-card:hover {
    border-color: var(--primary) !important;
}

[data-theme="dark"] .category-card span {
    color: #f8fafc !important;
}

[data-theme="dark"] .product-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .product-card .title {
    color: #f8fafc !important;
}

/* Stats */
[data-theme="dark"] .stat-item {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .stat-label {
    color: #94a3b8 !important;
}

/* Auth pages */
[data-theme="dark"] .auth-container,
[data-theme="dark"] .auth-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

[data-theme="dark"] .auth-container label,
[data-theme="dark"] .auth-card label {
    color: #cbd5e1 !important;
}

/* Profile & misc pages */
[data-theme="dark"] .profile-card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .listing-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

/* Tables */
[data-theme="dark"] table th,
[data-theme="dark"] table td {
    border-color: #1e293b !important;
    color: #f8fafc !important;
    background: #0f172a !important;
}

[data-theme="dark"] table thead th {
    background: #020617 !important;
    color: #94a3b8 !important;
}

/* Pagination */
[data-theme="dark"] .pagination .page-link {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* Alert boxes */
[data-theme="dark"] .alert {
    border-color: #1e293b !important;
}

[data-theme="dark"] .alert-info {
    background: rgba(2, 132, 199, 0.1) !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #6ee7b7 !important;
}

[data-theme="dark"] .alert-danger {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #fcd34d !important;
}

/* Sidebar in dark mode */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .filters-sidebar {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

/* Notification bell */
[data-theme="dark"] .notification-bell {
    color: var(--text-secondary) !important;
}

/* Theme toggle button */
[data-theme="dark"] .theme-toggle {
    background: #1e293b !important;
    color: #f8fafc !important;
}

/* Buttons keep their colors in both modes */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: white !important;
}

[data-theme="dark"] .btn-outline {
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-outline:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
}

