/* ==========================================================================
   KUSAIRA MANGA MODULE STYLES (Steam OLED Aesthetic)
   ========================================================================== */

/* Manga Grid & Cards */
.manga-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.manga-search-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.manga-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px 10px 38px;
    color: #fff;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}

.manga-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
}

.manga-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Manga Type Filter Pills */
.manga-type-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.manga-type-pills::-webkit-scrollbar { display: none; }
.manga-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.manga-type-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}
.manga-type-pill.active {
    background: #FFFFFF;
    color: #0b0e14;
    border-color: #FFFFFF;
    font-weight: 600;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
@media (min-width: 640px) {
    .manga-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
}

.manga-card {
    position: relative;
    background: rgba(18, 18, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
}
.manga-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
}
.manga-card-cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4.4;
    background: #0d0d12;
    overflow: hidden;
}
.manga-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.manga-card:hover .manga-card-cover { transform: scale(1.05); }

.manga-card-rating {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: flex; align-items: center; gap: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.manga-card-type {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
}
.manga-card-info { padding: 10px 10px 12px; display: flex; flex-direction: column; flex: 1; }
.manga-card-title {
    font-size: 0.88rem; font-weight: 600; color: #fff; line-height: 1.25; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.manga-card-status { font-size: 0.72rem; color: rgba(255, 255, 255, 0.5); margin-top: auto; }

/* Manga Details Modal */
.manga-modal {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(14px);
    z-index: 100050;
    display: none; align-items: center; justify-content: center;
    padding: 16px; opacity: 0; transition: opacity 0.25s ease;
}
.manga-modal.active { display: flex; opacity: 1; }
.manga-detail-sheet {
    position: relative; width: 100%; max-width: 780px; max-height: 90vh;
    background: #101016; border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}
.manga-detail-scroll { overflow-y: auto; padding: 20px; flex: 1; }
.manga-detail-header { display: flex; gap: 20px; margin-bottom: 20px; align-items: flex-start; }
@media (max-width: 580px) {
    .manga-detail-header { flex-direction: column; align-items: center; text-align: center; }
}
.manga-detail-cover {
    width: 140px; aspect-ratio: 3 / 4.4; border-radius: 10px; object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6); flex-shrink: 0;
}
.manga-detail-meta { flex: 1; min-width: 0; }
.manga-detail-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 4px; line-height: 1.25; }
.manga-detail-eng { font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); margin-bottom: 12px; }
.manga-detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.manga-detail-desc {
    font-size: 0.88rem; line-height: 1.5; color: rgba(255, 255, 255, 0.75); margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03); padding: 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05);
}
.manga-chapters-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.manga-chapter-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.manga-chapter-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px; padding: 10px 14px; cursor: pointer; transition: all 0.15s ease;
}
.manga-chapter-item:hover { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.35); }

