/* ============================================
   BazaEstate - Modern UI Styles
   Version: 2.0
   ============================================ */

/* ============ CSS Variables ============ */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);

    /* Secondary Colors */
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --secondary-light: #f472b6;

    /* Accent Colors */
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-violet: #8b5cf6;

    /* Neutral Colors */
    --dark: #0f172a;
    --dark-light: #1e293b;
    --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;
    --gray-50: #f9fafb;
    --white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #f43f5e 100%);
    --gradient-cool: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-glow-lg: 0 0 60px rgba(99, 102, 241, 0.4);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============ Base Styles ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ Navbar ============ */
.navbar-modern {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-modern.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-lg);
}

.navbar-brand-modern {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

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

.navbar-brand-modern i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link-modern {
    color: var(--gray-300) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link-modern:hover,
.nav-link-modern.active {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link-modern:hover::after,
.nav-link-modern.active::after {
    width: 60%;
}

/* ============ Modern Buttons ============ */
.btn-modern {
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-primary-modern {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    color: var(--white);
}

.btn-secondary-modern {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    color: var(--white);
}

.btn-outline-modern {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============ Hero Section ============ */
.hero-modern {
    background: var(--gradient-dark);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    animation: heroGlow 15s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(-1%, 1%) rotate(-1deg); }
    75% { transform: translate(1%, -2%) rotate(0.5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: blobMove 8s ease-in-out infinite;
}

.hero-blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 0;
    right: 10%;
}

.hero-blob-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: 10%;
    right: 30%;
    animation-delay: -4s;
}

@keyframes blobMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -20px) scale(1.1); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.05); }
}

/* ============ Search Box ============ */
.search-box-modern {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
}

.search-box-modern .form-control {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 0.75rem 1rem;
}

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

.search-box-modern .form-control:focus {
    box-shadow: none;
}

/* ============ Category Cards ============ */
.category-card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    display: block;
    position: relative;
    overflow: hidden;
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: var(--gray-800);
    border-color: transparent;
}

.category-card-modern:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    transition: var(--transition);
}

.category-icon.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.category-icon.green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.category-icon.cyan {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    color: #0891b2;
}

.category-icon.amber {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.category-icon.rose {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
}

.category-card-modern:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-card-modern h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-card-modern p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

/* ============ Listing Cards ============ */
.listing-card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.listing-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.listing-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.listing-card-modern:hover .listing-card-image img {
    transform: scale(1.1);
}

.listing-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-modern {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-sale {
    background: rgba(16, 185, 129, 0.9);
    color: var(--white);
}

.badge-rent {
    background: rgba(99, 102, 241, 0.9);
    color: var(--white);
}

.badge-new {
    background: rgba(236, 72, 153, 0.9);
    color: var(--white);
}

.badge-featured {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: var(--white);
}

.listing-card-favorite {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-400);
}

.listing-card-favorite:hover {
    background: var(--white);
    color: var(--accent-rose);
    transform: scale(1.1);
}

.listing-card-favorite.active {
    color: var(--accent-rose);
}

.listing-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.listing-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.listing-card-price small {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 400;
}

.listing-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.listing-card-location i {
    color: var(--primary);
}

.listing-card-features {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.listing-feature {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.listing-feature i {
    color: var(--gray-400);
}

/* ============ Stats Section ============ */
.stats-section {
    background: var(--gradient-dark);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.stat-card {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-400);
    font-size: 1rem;
    font-weight: 500;
}

/* ============ Section Headers ============ */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
}

/* ============ Footer ============ */
.footer-modern {
    background: var(--gradient-dark);
    color: var(--gray-400);
    padding-top: 5rem;
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-description {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-title {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-bottom p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============ Cards & Containers ============ */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.card-modern:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* ============ Forms ============ */
.form-control-modern {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-label-modern {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ============ Filter Sidebar ============ */
.filter-card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.filter-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.25rem;
}

.filter-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-body {
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

/* ============ Pagination ============ */
.pagination-modern .page-link {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    margin: 0 0.25rem;
    transition: var(--transition);
}

.pagination-modern .page-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.pagination-modern .page-item.active .page-link {
    background: var(--gradient-primary);
    color: var(--white);
}

/* ============ Alerts ============ */
.alert-modern {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    border-left: 4px solid;
}

.alert-success-modern {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: var(--accent-emerald);
    color: #065f46;
}

.alert-danger-modern {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: var(--accent-rose);
    color: #9f1239;
}

.alert-warning-modern {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: var(--accent-amber);
    color: #92400e;
}

.alert-info-modern {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: var(--primary);
    color: #1e40af;
}

/* ============ Dropdown ============ */
.dropdown-menu-modern {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    animation: dropdownFade 0.2s ease;
}

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

.dropdown-item-modern {
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item-modern:hover {
    background: var(--gray-100);
}

/* ============ Image Gallery ============ */
.gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

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

.gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============ Loading States ============ */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius);
}

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

.spinner-modern {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============ Animations ============ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-up {
    animation: slideUp 0.5s ease;
}

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

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============ Responsive ============ */
@media (max-width: 991.98px) {
    .hero-modern {
        min-height: auto;
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-modern {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .listing-card-features {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer-modern {
        padding-top: 3rem;
    }
}

/* ============ Utility Classes ============ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-dark {
    background: var(--gradient-dark);
}

.hover-lift {
    transition: var(--transition);
}

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

.hover-scale {
    transition: var(--transition);
}

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

/* ============ Profile Page ============ */
.profile-header {
    background: var(--gradient-primary);
    padding: 3rem 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-username {
    color: rgba(255, 255, 255, 0.7);
}

/* ============ Login Page ============ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 2rem;
}

.social-login-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #00a0dc 100%);
    color: var(--white);
}

.btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
    color: var(--white);
}

.btn-google {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-google:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-400);
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* ============ Empty State ============ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: var(--gray-400);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ============ Rating & Favorites ============ */
.listing-card-rating {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.95) 0%, rgba(245, 158, 11, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.listing-card-rating i {
    color: var(--white);
    font-size: 0.7rem;
}

/* Modern Stars Rating */
.listing-card-stars {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

.star-rating-group {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    background: var(--gray-50);
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.star-rating-group:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.star-btn {
    background: none;
    border: none;
    padding: 0.125rem 0.1rem;
    cursor: pointer;
    color: var(--gray-300);
    font-size: 1rem;
    transition: var(--transition);
    line-height: 1;
}

.star-btn:hover {
    transform: scale(1.25);
}

.star-btn i {
    transition: all 0.15s ease;
}

.star-btn.active i {
    color: #fbbf24;
}

/* Hover effect - highlight all stars up to hovered one */
.star-rating-group:hover .star-btn i {
    color: var(--gray-300);
}

.star-rating-group .star-btn:hover i,
.star-rating-group .star-btn:hover ~ .star-btn i {
    color: var(--gray-300);
}

.star-rating-group:hover .star-btn:hover i,
.star-rating-group:hover .star-btn:has(~ .star-btn:hover) i {
    color: #fbbf24;
}

/* Keep active state when not hovering */
.star-rating-group:not(:hover) .star-btn.active i {
    color: #fbbf24;
}

/* When hovering, light up stars from start to hovered */
.star-rating-group:hover .star-btn {
    color: var(--gray-300);
}

.star-rating-group:hover .star-btn:hover,
.star-rating-group:hover .star-btn:hover ~ .star-btn {
    color: var(--gray-300);
}

.star-rating-group .star-btn:first-child:hover ~ .star-btn,
.star-rating-group .star-btn:nth-child(2):hover ~ .star-btn,
.star-rating-group .star-btn:nth-child(3):hover ~ .star-btn,
.star-rating-group .star-btn:nth-child(4):hover ~ .star-btn {
    color: var(--gray-300);
}

/* Simpler hover solution using JavaScript-friendly classes */
.star-btn:hover i {
    color: #fbbf24 !important;
    transform: scale(1.1);
}

.rating-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

/* Favorites */
.listing-card-favorite {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-400);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.listing-card-favorite:hover {
    background: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.listing-card-favorite:hover i {
    color: var(--accent-rose);
}

.listing-card-favorite.active {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: var(--accent-rose);
}

.listing-card-favorite.active i {
    animation: heartPulse 0.4s ease;
}

.listing-card-favorite i {
    font-size: 1.1rem;
    transition: var(--transition);
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ============ Modern Filters ============ */
.filter-modern {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filter-modern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.filter-modern-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-modern-title i {
    color: var(--primary);
}

.filter-modern-clear {
    color: var(--gray-500);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.filter-modern-clear:hover {
    color: var(--accent-rose);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
}

.filter-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    background: var(--white);
    transition: var(--transition);
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.filter-price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-price-inputs input {
    flex: 1;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-price-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.filter-price-inputs span {
    color: var(--gray-400);
    font-size: 0.85rem;
}

.filter-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Filter chips/tags */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    background: var(--gray-100);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.filter-chip.active {
    background: var(--gradient-primary);
    color: var(--white);
}

.filter-chip-remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.filter-chip-remove:hover {
    opacity: 1;
}

/* Quick filter buttons */
.quick-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.quick-filter-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.quick-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Results header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.results-count strong {
    color: var(--gray-900);
    font-weight: 700;
}

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

.results-sort label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.results-sort select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
}

/* View toggle */
.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
}

.view-toggle-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.view-toggle-btn:hover {
    color: var(--gray-700);
}

.view-toggle-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

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

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