:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

/* Smooth transitions */
a, button, .btn, .card, .form-control, .form-select {
    transition: var(--transition);
}

/* Modern Header styles */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
    transform: translateY(-1px);
}

.navbar-brand i {
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin: 0 0.3rem;
    padding: 0.6rem 1rem !important;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    transition: all 0.4s ease;
    z-index: -1;
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.navbar-nav .nav-link i {
    margin-right: 0.4rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.1);
}

/* Mobile menu animations */
.navbar-toggler {
    border: none;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--primary-color);
}

.navbar-toggler:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.navbar-toggler-icon {
    background-image: none;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Dropdown animations */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideDown 0.3s ease;
}

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

.dropdown-item {
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Language selector special styling */
.language-selector .nav-link {
    background: rgba(var(--primary-color), 0.1);
    border: 1px solid rgba(var(--primary-color), 0.2);
}

/* User menu styling */
.user-menu .dropdown-toggle::after {
    display: none;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Professional Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.loading-spinner {
    text-align: center;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

.spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
}

.spinner-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-top: 3px solid rgba(255, 255, 255, 0.9);
    border-right: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spinFast 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
    border-top: 3px solid rgba(255, 255, 255, 0.7);
    border-right: 3px solid rgba(255, 255, 255, 0.4);
    animation: spinSlow 2s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    animation: spinFast 1.5s linear infinite;
}

.loading-text {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 6px;
    margin-bottom: 16px;
    opacity: 0.95;
    animation: textGlow 3s ease-in-out infinite;
}

.loading-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes spinFast {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textGlow {
    0%, 100% {
        opacity: 0.95;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Mobile Responsive Design für Loading Screen */
@media (max-width: 768px) {
    .loading-spinner {
        padding: 20px;
        max-width: 90%;
    }
    
    .spinner-ring {
        width: 80px;
        height: 80px;
        border: 6px solid rgba(255, 255, 255, 0.15);
        border-top: 6px solid white;
        margin-bottom: 25px;
    }
    
    .spinner-ring::before {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(255, 255, 255, 0.1);
        border-bottom: 3px solid rgba(255, 255, 255, 0.6);
    }
    
    .loading-text {
        font-size: 1.3rem;
        letter-spacing: 3px;
        margin-bottom: 15px;
    }
    
    .loading-subtitle {
        font-size: 0.9rem;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .loading-spinner {
        padding: 15px;
    }
    
    .spinner-ring {
        width: 70px;
        height: 70px;
        border: 5px solid rgba(255, 255, 255, 0.15);
        border-top: 5px solid white;
        margin-bottom: 20px;
    }
    
    .spinner-ring::before {
        width: 45px;
        height: 45px;
        border: 3px solid rgba(255, 255, 255, 0.1);
        border-bottom: 3px solid rgba(255, 255, 255, 0.6);
    }
    
    .loading-text {
        font-size: 1.1rem;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }
    
    .loading-subtitle {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .loading-subtitle::after {
        width: 60px;
    }
}

/* Body padding for fixed navbar */
body {
    padding-top: 80px;
    transition: all 0.3s ease;
}

body.page-transition {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        animation: mobileMenuSlide 0.3s ease;
    }
    
    .navbar-nav .nav-link {
        margin: 0.2rem 0;
        text-align: center;
    }
    
    body {
        padding-top: 70px;
    }
}

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

/* Animation classes for content */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Smooth page transitions */
.page-transition {
    transition: all 0.3s ease;
}

/* Enhanced hover effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Active navigation states */
.navbar-nav .nav-link.active {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.navbar-nav .nav-link.active::before {
    left: 0;
}

/* User Avatar in Navigation */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Dropdown Menu Fix */
.navbar .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.navbar .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Enhanced Mobile Dropdown */
@media (max-width: 991.98px) {
    /* Specific styling for language dropdown */
    .language-selector .dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        left: 20px !important;
        right: 20px !important;
        transform: none !important;
        width: auto !important;
        max-width: calc(100vw - 40px);
        z-index: 1060 !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
        border-radius: 16px;
        background-color: white;
        border: 3px solid rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        margin: 0;
    }
    
    /* User dropdown specific styling */
    .user-dropdown .dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        right: 20px !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        min-width: 200px;
        max-width: calc(100vw - 40px);
        z-index: 1060 !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
        border-radius: 16px;
        background-color: white;
        border: 3px solid rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        margin: 0;
    }
    
    /* General dropdown fallback */
    .navbar .dropdown-menu:not(.language-selector .dropdown-menu):not(.user-dropdown .dropdown-menu) {
        position: fixed !important;
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 220px;
        max-width: calc(100vw - 2rem);
        z-index: 1050 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        background-color: white;
        border: 2px solid rgba(0, 0, 0, 0.1);
        padding: 0.75rem 0;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .navbar .dropdown-item {
        padding: 1.5rem 2rem;
        border-radius: 0;
        margin: 0;
        background-color: transparent;
        color: #333 !important;
        transition: all 0.2s ease;
        text-decoration: none;
        white-space: nowrap;
        font-weight: 600;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        font-size: 1.1rem;
        min-height: 70px;
        display: flex;
        align-items: center;
        position: relative;
    }
    
    .navbar .dropdown-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: -1;
        transition: background-color 0.2s ease;
    }
    
    .navbar .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus,
    .navbar .dropdown-item:active {
        background-color: rgba(0, 123, 255, 0.15) !important;
        color: #007bff !important;
        transform: translateX(5px);
    }
    
    .navbar .dropdown-item:hover::before,
    .navbar .dropdown-item:focus::before,
    .navbar .dropdown-item:active::before {
        background-color: rgba(0, 123, 255, 0.1);
    }
    
    .language-selector .dropdown-menu {
        display: none;
        animation: slideInScale 0.3s ease-out;
        animation-fill-mode: both;
    }
    
    .language-selector.show .dropdown-menu {
        display: block !important;
    }
    
    @keyframes slideInScale {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-20px) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0) scale(1);
        }
    }
    
    /* Enhanced backdrop for mobile */
    .dropdown-backdrop {
        pointer-events: auto;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        background: rgba(0,0,0,0.4);
        touch-action: manipulation;
        z-index: 1055 !important;
    }
    
    /* Prevent scrolling when dropdown is open */
    body.dropdown-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

.navbar-nav .nav-link:hover {
    color: var(--white) !important;
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.navbar-toggler {
    border: none;
    outline: none !important;
    box-shadow: none !important;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #003d82);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: linear-gradient(135deg, var(--light-color), var(--white));
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-weight: 600;
}

.listing-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.listing-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-card .card-text {
    flex-grow: 1;
}

.listing-image {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

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

.price-tag {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

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

/* Hero section */
.hero, .hero-section {
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1, .hero-section h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
    animation: fadeInUp 1s ease;
    text-align: center;
}

.hero p, .hero-section p, .hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.2s both;
    text-align: center;
}

@media (max-width: 768px) {
    .hero h1, .hero-section h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    .hero p, .hero-section p, .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .hero, .hero-section {
        padding: 3rem 0;
        min-height: 50vh;
    }
    .hero-content, .hero-section .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1, .hero-section h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    .hero p, .hero-section p, .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    .hero, .hero-section {
        padding: 2.5rem 0;
        min-height: 45vh;
    }
    .btn-lg {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}

.hero .btn {
    animation: fadeInUp 1s ease 0.4s both;
}

/* Search bar */
.search-bar {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-top: -3rem;
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease 0.6s both;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Category cards */
.category-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark-color);
    display: block;
    height: 100%;
}

.category-card:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Stats section */
.stats {
    background: var(--light-color);
    padding: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

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

.stat-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Enhanced Flash Messages/Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.2rem 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.5s ease;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-success::before {
    background: #28a745;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-info::before {
    background: #17a2b8;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-warning::before {
    background: #ffc107;
}

.alert-danger, .alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-danger::before, .alert-error::before {
    background: #dc3545;
}

/* Flash message container */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1055;
    max-width: 400px;
    width: 100%;
}

.flash-messages .alert {
    margin-bottom: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: none;
    transform: translateX(100%);
    animation: slideInRight 0.5s ease forwards;
}

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

/* Auto-dismiss animation */
.alert.auto-dismiss {
    animation: slideInRight 0.5s ease forwards, slideOutRight 0.5s ease 4s forwards;
}

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

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Pagination */
.pagination .page-link {
    border-radius: var(--border-radius);
    margin: 0 0.2rem;
    border: 2px solid #e9ecef;
    color: var(--primary-color);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

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

/* Language selector */
.language-selector .dropdown-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
}

.language-selector .dropdown-menu {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
}

/* Image gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

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

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Hover effects */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .search-bar {
        margin: 1rem;
        padding: 1.2rem;
    }
    
    .category-card {
        padding: 1.2rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .category-icon {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .category-card h5 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Mobile navigation and buttons */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    
    .search-bar {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .search-bar .form-control {
        font-size: 0.9rem;
    }
    
    .category-card {
        padding: 1rem 0.6rem;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    .category-card h5 {
        font-size: 0.8rem;
    }
}

/* Admin panel styles */
.admin-sidebar {
    background: var(--white);
    box-shadow: var(--shadow);
    min-height: calc(100vh - 76px);
}

.admin-nav-link {
    color: var(--dark-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin: 0.2rem 0;
    transition: var(--transition);
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

/* Badge styles */
.badge {
    border-radius: 12px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Status indicators */
.status-active {
    color: var(--success-color);
}

.status-inactive {
    color: var(--danger-color);
}

/* Image upload preview */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.image-remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) 1;
}
