.browse-filters {
    background: #2D3748;
    border: 2px solid #373F4B;
    padding: 20px;
    border-radius: 3px;
    margin-bottom: 30px;
}
.browse-filters h3 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}
.filter-group {
    flex: 1;
    min-width: 200px;
}
.filter-group.search-group {
    flex: 2;
    position: relative;
}
.filter-group label {
    display: block;
    color: #ecf0f1;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}
.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background: #34495e;
    color: #fff;
    font-size: 14px;
}
.filter-group select {
    cursor: pointer;
}
.filter-group input[type="text"]::placeholder {
    color: #95a5a6;
}
.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #FFFF00e3;
}
.search-icon {
    position: absolute;
    right: 12px;
    bottom: 5px;
    color: #95a5a6;
    pointer-events: none;
}
.ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
    display: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.ajax-search-results.active {
    display: block;
}
.ajax-search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #2c3e50;
    cursor: pointer;
    transition: background 0.2s;
}
.ajax-search-item:hover {
    background: #2c3e50;
}
.ajax-search-item:last-child {
    border-bottom: none;
}
.ajax-search-thumb {
    width: 50px;
    height: 70px;
    max-height: 600px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}
.ajax-search-info {
    flex: 1;
}
.ajax-search-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ajax-search-meta {
    color: #95a5a6;
    font-size: 12px;
    margin-top: 5px;
}

.ajax-search-stars {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.ajax-search-stars .mhq-star-row {
    display: inline-flex;
    gap: 2px;
}

.ajax-search-stars .mhq-star {
    width: 12px;
    height: 12px;
    fill: rgba(255, 255, 255, 0.25);
}

.ajax-search-stars .mhq-star.is-filled {
    fill: #F4B83C;
}

.ajax-search-stars .mhq-rating-num {
    color: #ecf0f1;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
}
.ajax-loading {
    padding: 15px;
    text-align: center;
    color: #ecf0f1;
}
.ajax-no-results {
    padding: 15px;
    text-align: center;
    color: #95a5a6;
}
.filter-buttons {
    display: flex;
    gap: 10px;
}
.filter-btn {
    padding: 5px 20px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .filter-btn {
        padding: 15px 14px;
        font-size: 13px;
        border-radius: 4px;
    }
}

.apply-filter {
    background: #03A9F4;
    color: #FFFFFF;
}
.apply-filter:hover {
    opacity: 0.9;
}
.reset-filter {
    text-align: center;
    background: #c14e59;
    color: #fff;
}
.reset-filter:hover {
    opacity: 0.8;
}
.results-count {
    color: #ecf0f1;
    margin: 20px 0;
    font-size: 16px;
}
.wp-pagenavi {
    text-align: center;
    float: none;
    width: 100%;
    margin-top: 41px;
    margin-bottom: 30px;
}
.wp-pagenavi a,
.wp-pagenavi span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #fff !important;
    background: #c14e59;
}
.wp-pagenavi a:hover {
    opacity: 0.8;
}
.wp-pagenavi span.current {
    color: #050505 !important;
    background: #fff !important;
    font-weight: bold;
}
.wp-pagenavi .page-dots {
    background: transparent !important;
    color: #fff !important;
    cursor: default;
    padding: 8px 4px;
}
.browse-grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .browse-grid-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .browse-grid-container {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.browse-updates-card-wrapper {
    width: 100%;
    position: relative;
}

.browse-updates-card {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    text-decoration: none;
}

.browse-updates-card-img {
    width: 100%;
    height: 100%;
    max-height: 600px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.browse-updates-flag {
    position: absolute;
    width: 26.33px;
    height: 20px;
    z-index: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.browse-updates-card .browse-rating-badge,
.followed-card .browse-rating-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 6;
    margin-bottom: 0;
}

.browse-updates-card-info {
    margin-top: 4px;
    padding: 2px 0;
}

.browse-updates-title-link {
    display: block;
    padding: 0;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.browse-updates-title-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.browse-updates-card-info .browse-updates-title-link.followed-chapter-link {
    padding: 0;
}

.browse-updates-card-info .followed-chapter,
.browse-updates-card-info .followed-time,
.browse-updates-card-info .followed-title {
    padding: 0;
}

.browse-updates-card-info .followed-chapter,
.browse-updates-card-info .followed-time {
    line-height: 1.2;
}

.browse-updates-card-info .followed-title {
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.browse-updates-title {
    font-size: 0.95rem;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ============================================
   BROWSE PAGE CARD STYLES
============================================ */

.browse-card-wrapper {
    width: 100%;
}

.browse-card {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    max-height: 600px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.browse-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}

.browse-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.browse-card-img {
    width: 100%;
    height: 100%;
    max-height: 600px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.browse-card:hover .browse-card-img {
    transform: scale(1.08);
}

/* Gradient overlay */
.browse-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Rating badge - top left */
/* Bottom content container */
.browse-bottom-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 12px;
}

/* Rating badge - bottom left, above title */
.browse-rating-badge {
    display: inline-flex;
    align-items: center;
    
    background: rgba(63 63 63 / 70%);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 5px 10px;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}
/* Bookmark badge - top right corner */
.browse-bookmark-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #22c55e;
}

.browse-bookmark-badge svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.browse-rating-badge .mhq-star-row {
    display: inline-flex;
    gap: 2px;
}

.browse-rating-badge .mhq-star {
    width: 14px;
    height: 14px;
    fill: rgba(255, 255, 255, 0.25);
}

.browse-rating-badge .mhq-star.is-filled {
    fill: #F4B83C;
}

.browse-rating-badge .mhq-rating-num {
    color: #FFF;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}

/* Title overlay - below rating */
.browse-title-overlay {
    width: 100%;
}

.browse-title-overlay h3 {
    color: #FFF;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .browse-filters {
        padding: 16px;
    }
    .filter-row {
        flex-direction: column;
    }
    .filter-group,
    .filter-group.search-group {
        width: 100%;
        min-width: 0;
    }
    .filter-buttons {
        width: 100%;
        flex-direction: column;
    }
    .filter-btn {
        width: 100%;
    }
    
.browse-rating-badge {
        padding: 4px 8px;
    }
    
    .browse-rating-badge svg {
        width: 16px;
        height: 16px;
    }
    
    .browse-rating-badge span {
        font-size: 11px;
    }
    
    .browse-title-overlay {
        padding: 10px;
    }
    
    .browse-title-overlay h3 {
        font-size: 12px;
    }
}
