/* Цвета навигации для светлой темы */
.desktop-nav a,
.bottom-nav .nav-item {
    color: #000;
}

/* Цвета навигации для темной темы */
[data-theme="dark"] .desktop-nav a,
[data-theme="dark"] .bottom-nav .nav-item {
    color: #ffffff;
}

/* Временно скрываем переключатель языков */
.lang-switch, #langSwitch, #mobileLangSwitch {
    display: none !important;
}

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

:root {
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #e0e0e0;
    --primary-color: #ff8a50;
    --primary-hover: #ff7043;
    --secondary-color: #666;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --header-height: 60px;
    --mobile-bottom-nav: 60px;
    --bg-tertiary: #e9ecef;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #ffffff;
    --border-color: #444;
    --secondary-color: #aaa;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --bg-tertiary: #2a2a2a;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: none;
    align-items: center;
    padding: 0 32px;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: auto;
    cursor: pointer;
    text-decoration: none;
}

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

.desktop-nav {
    display: flex;
    gap: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.desktop-nav a {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.desktop-nav a.active {
    background: var(--primary-color);
    color: white;
}

.desktop-nav a:hover {
    background: var(--primary-hover);
    color: white;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch, .theme-toggle {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.theme-toggle {
    font-size: 16px;
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle svg,
.mobile-theme-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.profile-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
}

.profile-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.profile-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Bottom Navigation - Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom-nav);
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 11px;
    gap: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: right 0.3s ease;
    padding: var(--header-height) 0 0 0;
    overflow-y: auto;
}

.side-menu.open {
    right: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.mobile-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-theme-toggle span {
    font-weight: 500;
}

.mobile-theme-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mobile-theme-btn:hover {
    border-color: var(--primary-color);
}

.menu-item {
    display: block;
    padding: 16px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    cursor: pointer;
}

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

.auth-buttons {
    padding: 20px;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

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

.auth-btn.secondary {
    background: transparent;
    color: var(--primary-color);
}

.auth-btn.secondary:hover {
    background: rgba(255, 138, 80, 0.1);
}

.user-info {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.user-avatar svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
}

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.user-email {
    font-size: 12px;
    color: var(--secondary-color);
}

.logout-btn {
    color: #dc3545;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Language Dropdown in Mobile Menu */
.mobile-lang-select {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-lang-select select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
}

/* Sticky Header Container */
.sticky-header {
    position: sticky;
    top: var(--header-height);
    z-index: 25;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-top: var(--header-height);
    position: sticky;
    top: 0;
    margin-top: 0;
}

/* Central Search Section */
.search-section {
    background-color: var(--card-bg);
    padding: 20px 16px;
}

.search-section-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.central-search-container {
    position: relative;
    margin-bottom: 1px;
}

.central-search-input {
    width: 100%;
    padding: 16px 24px 16px 56px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.2s;
    color: var(--text-color);
}

.central-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.1);
}

.central-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: #9ca3af;
}

/* Filter Bar */
.filter-bar {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.filter-bar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
}

.main-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sort-dropdown {
    background-color: #f3f4f6;
    border: none;
    border-radius: 9999px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #000;
}

.sort-dropdown:hover {
    background-color: #e5e7eb;
}

.filters-button {
    background-color: #f3f4f6;
    border: none;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #000;
}

.filters-button:hover {
    background-color: #e5e7eb;
}

/* Results info */
.results-info {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

/* Manga Grid */
.manga-grid-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    /* Оптимизации для плавной прокрутки */
    contain: layout style;
    will-change: scroll-position;
}

@media (min-width: 640px) {
    .manga-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) {
    .manga-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
        
    }
}

@media (min-width: 1024px) {
    .manga-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Title Card */
.title-card {
    cursor: pointer;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    /* CSS оптимизации для производительности */
    will-change: transform;
    contain: layout style;
}

.optimized-card {
    /* Дополнительные оптимизации для виртуальной прокрутки */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.title-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cover-container {
    position: relative;
    aspect-ratio: 2/3;
    width: 100%;
    overflow: hidden;
    background-color: #e5e7eb;
}

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

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

/* Lazy loading оптимизации - убираем мерцание */
.cover-image.lazy-loading {
    opacity: 1;
    filter: none;
    transition: transform 0.3s ease;
}

.cover-image.lazy-loaded {
    opacity: 1;
    filter: none;
}

/* ========== НОВЫЕ СТИЛИ ДЛЯ СТАТУС-БЕЙДЖЕЙ ========== */

/* Badges Container */
.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
    flex-direction: column;
}

/* Status Badge (left side) */
.status-badge-overlay {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

/* Цвета статусов с градиентами и тенями */
.status-frozen {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.status-completed {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.status-announcement {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.status-ongoing {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Rating Badge (right side) */
.rating-badge {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.star-icon {
    width: 12px;
    height: 12px;
    fill: #ffd700;
}

/* Hover эффекты для бейджей */
.title-card:hover .status-badge-overlay,
.title-card:hover .rating-badge {
    transform: scale(1.05);
}

/* ========== КОНЕЦ НОВЫХ СТИЛЕЙ ========== */

.donation-progress {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-top: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #ff7043);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.card-info {
    padding: 12px;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

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

.card-type {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.card-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    display: none;
}

.genre-tag {
    background: var(--bg-color);
    color: var(--secondary-color);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
}

/* No results */
.no-results {
    text-align: center;
    padding: 64px 16px;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.clear-filters-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-filters-btn:hover {
    background-color: var(--primary-hover);
}

/* Filters Sidebar */
.filters-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 30;
    display: none;
}

.filters-backdrop.show {
    display: block;
}

.filters-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 400px;
    background-color: var(--card-bg);
    border-left: 1px solid var(--border-color);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.filters-sidebar.show {
    transform: translateX(0);
}

/* Filter groups styles */
.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.1);
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

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

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.checkbox-group::-webkit-scrollbar {
    width: 4px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.filter-checkbox:hover {
    background: rgba(255, 138, 80, 0.05);
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--card-bg);
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: all 0.2s ease;
}

.filter-checkbox input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.filter-checkbox span {
    flex: 1;
    color: var(--text-color);
    line-height: 1.4;
}

.filter-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-actions-fixed {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.filter-list-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
}

.apply-filters-btn,
.clear-filters-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apply-filters-btn {
    background: linear-gradient(135deg, var(--primary-color), #ff7043);
    color: white;
}

.apply-filters-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 138, 80, 0.3);
}

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

.clear-filters-btn:hover {
    background: #e0e0e0;
    color: var(--text-color);
}

[data-theme="dark"] .clear-filters-btn {
    background: #444;
    color: #aaa;
}

[data-theme="dark"] .clear-filters-btn:hover {
    background: #555;
    color: #fff;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.filters-header h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-color);
}

.close-button {
    padding: 8px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-color);
}

.close-button:hover {
    background-color: var(--bg-color);
}

.filters-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.filter-clear-all-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.clear-all-filters-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: #f87171;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-all-filters-btn:hover {
    background-color: #ef4444;
}

.clear-all-filters-btn:active {
    background-color: #dc2626;
}

.filter-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-category-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
}

.filter-category-button:hover {
    border-color: var(--primary-color);
    background-color: rgba(255, 138, 80, 0.05);
}

.filter-count {
    color: var(--primary-color);
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: normal;
    background: rgba(255, 138, 80, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
}

/* Filter page */
.filter-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
}

.back-button:hover {
    border-color: var(--primary-color);
    background-color: rgba(255, 138, 80, 0.05);
}

.search-input-container {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

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

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
}

.filter-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-color);
}

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

.checkbox {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-input.checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark {
    width: 12px;
    height: 12px;
    color: white;
    fill: currentColor;
}

/* Desktop Styles */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .header {
        display: flex;
    }

    .sticky-header {
        top: var(--header-height);
        margin-top: 0;
    }

    .bottom-nav {
        display: none;
    }

    .mobile-theme-toggle,
    .mobile-lang-select {
        display: none;
    }

    .side-menu {
        padding-top: var(--header-height);
    }
}

@media (max-width: 767px) {
    .mobile-theme-toggle,
    .mobile-lang-select {
        display: flex;
    }

    .side-menu {
        padding-top: 0;
    }
}

/* Loading state */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--secondary-color);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

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

/* Auth Required Styles */
.auth-required-catalog {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.auth-message-catalog {
    max-width: 400px;
    margin: 0 auto;
}

.auth-message-catalog .auth-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.auth-message-catalog h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.auth-message-catalog p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.auth-catalog-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-catalog-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    padding: 20px;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 138, 80, 0.3);
    min-width: 200px;
    justify-content: center;
}

.load-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 138, 80, 0.4);
}

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

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-icon {
    font-size: 1.2em;
    animation: bounce 2s infinite;
}

.load-more-text {
    font-weight: 600;
}

.load-more-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

@media (max-width: 768px) {
    .load-more-container {
        margin: 30px 0;
        padding: 15px;
    }
    
    .load-more-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
        min-width: 180px;
    }
}