/* =============================================================
   Latest Updates Page — Aqua Manga Child Theme
   ============================================================= */

/* ── Page layout ── */
.aqua-latest-page {
    background: #080808;
    min-height: 100vh;
    padding-top: 0;
}
.aqua-latest-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    overflow: hidden;
}

/* ── Page header ── */
.aqua-latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.aqua-latest-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.aqua-latest-header__icon {
    flex-shrink: 0;
    opacity: 0.7;
}
.aqua-latest-header__title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.aqua-latest-header__sub {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin: 2px 0 0;
}
.aqua-latest-header__sub strong {
    color: rgba(255,255,255,0.7);
}

/* ── View toggle buttons ── */
.aqua-latest-header__views {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.aqua-view-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.aqua-view-btn:hover {
    color: rgba(255,255,255,0.8);
}
.aqua-view-btn--active {
    background: #005F99;
    color: #48CAE4;
}

/* =============================================================
   ITEM WRAPPER — one per manga, fills grid cell
   ============================================================= */
.aqua-lu-item {
    min-width: 0;
    overflow: hidden;
}

/* Default: hide all card variants */
.aqua-lu-card { display: none; }

/* =============================================================
   DETAILED VIEW (default) — 3 columns
   ============================================================= */
.aqua-latest-content[data-view="detailed"],
.aqua-latest-content:not([data-view]) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* show detailed, hide others */
.aqua-latest-content[data-view="detailed"] .aqua-lu-card--detailed,
.aqua-latest-content:not([data-view]) .aqua-lu-card--detailed {
    display: flex !important;
}
.aqua-latest-content[data-view="detailed"] .aqua-lu-card--grid,
.aqua-latest-content[data-view="detailed"] .aqua-lu-card--list,
.aqua-latest-content:not([data-view]) .aqua-lu-card--grid,
.aqua-latest-content:not([data-view]) .aqua-lu-card--list {
    display: none !important;
}

.aqua-lu-card--detailed {
    display: flex;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px;
    overflow: hidden;
    min-width: 0;
    transition: border-color 0.2s;
}
.aqua-lu-card--detailed:hover {
    border-color: rgba(72,202,228,0.2);
}
.aqua-lu-card__thumb {
    flex-shrink: 0;
    width: 80px;
    display: block;
}
.aqua-lu-card__thumb img {
    width: 100%;
    border-radius: 6px;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}
.aqua-lu-card__info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.aqua-lu-card__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aqua-lu-card__title:hover { color: #48CAE4; }
.aqua-lu-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.aqua-lu-card__type {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}
.aqua-lu-card__rating {
    font-size: 12px;
    color: #f4d03f;
}

/* Chapter rows */
.aqua-lu-card__chapters {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
}
.aqua-lu-chapter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    transition: background 0.15s;
}
.aqua-lu-chapter:hover { background: rgba(255,255,255,0.03); }
.aqua-lu-chapter:last-child { border-bottom: none; }
.aqua-lu-chapter__name {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.aqua-lu-chapter__new {
    background: #005F99;
    color: #48CAE4;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}
.aqua-lu-chapter__time {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* =============================================================
   GRID VIEW — 6 columns
   ============================================================= */
.aqua-latest-content[data-view="grid"] {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 14px !important;
}
.aqua-latest-content[data-view="grid"] .aqua-lu-card--grid {
    display: block !important;
}
.aqua-latest-content[data-view="grid"] .aqua-lu-card--detailed,
.aqua-latest-content[data-view="grid"] .aqua-lu-card--list {
    display: none !important;
}
.aqua-lu-grid__cover {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}
.aqua-lu-grid__cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}
.aqua-lu-grid__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 20px 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.aqua-lu-grid__ch-name {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.aqua-lu-grid__ch-time {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
    margin-left: 6px;
}
.aqua-lu-grid__title {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aqua-lu-grid__title:hover { color: #48CAE4; }

/* =============================================================
   LIST VIEW — single column compact rows
   ============================================================= */
.aqua-latest-content[data-view="list"] {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.aqua-latest-content[data-view="list"] .aqua-lu-item {
    width: 100%;
}
.aqua-latest-content[data-view="list"] .aqua-lu-card--list {
    display: block !important;
}
.aqua-latest-content[data-view="list"] .aqua-lu-card--detailed,
.aqua-latest-content[data-view="list"] .aqua-lu-card--grid {
    display: none !important;
}
.aqua-lu-list__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: background 0.15s;
}
.aqua-lu-list__row:hover { background: rgba(255,255,255,0.04); }
.aqua-lu-list__avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.aqua-lu-list__title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aqua-lu-list__chapter {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}

/* ── Empty state ── */
.aqua-latest-empty {
    color: rgba(255,255,255,0.4);
    text-align: center;
    padding: 60px 0;
    font-size: 15px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1100px) {
    .aqua-latest-content[data-view="detailed"],
    .aqua-latest-content:not([data-view]) {
        grid-template-columns: repeat(2, 1fr);
    }
    .aqua-latest-content[data-view="grid"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
@media (max-width: 767px) {
    .aqua-latest-header__title { font-size: 22px; }
    .aqua-latest-content[data-view="detailed"],
    .aqua-latest-content:not([data-view]) {
        grid-template-columns: 1fr;
    }
    .aqua-latest-content[data-view="grid"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .aqua-lu-card__thumb { width: 65px; }
    .aqua-view-btn { padding: 6px 12px; font-size: 12px; }
}

/* =============================================================
   PAGINATION (reuses browse page style)
   ============================================================= */
.aqua-latest-page .aqua-archive-pagination {
    display: flex;
    justify-content: center;
    margin: 32px 0 24px;
}
.aqua-latest-page .aqua-archive-pagination ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.aqua-latest-page .aqua-archive-pagination ul li a,
.aqua-latest-page .aqua-archive-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 8px;
    background: #1a1a2e;
    border: 1px solid rgba(72,202,228,0.15);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.aqua-latest-page .aqua-archive-pagination ul li a:hover {
    background: #005F99;
    border-color: #48CAE4;
    color: #48CAE4;
}
.aqua-latest-page .aqua-archive-pagination ul li span.current {
    background: #005F99;
    border-color: #48CAE4;
    color: #48CAE4;
    box-shadow: 0 0 8px rgba(72,202,228,0.6),
                0 0 18px rgba(72,202,228,0.25);
}
