/* ACG 二次元风格模板 - 紫粉青配色、圆角、柔和阴影 */
:root {
    --acg-bg: #1a1625;
    --acg-bg-card: #252035;
    --acg-bg-elevated: #2d2842;
    --acg-text: #f0eef5;
    --acg-text-muted: #a89ec9;
    --acg-accent: #b565d8;
    --acg-accent-pink: #ff9ecb;
    --acg-accent-soft: rgba(181, 101, 216, 0.25);
    --acg-border: #3d3552;
    --acg-radius: 14px;
    --acg-radius-sm: 10px;
    --acg-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --acg-font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.acg-body {
    font-family: var(--acg-font);
    background: var(--acg-bg);
    color: var(--acg-text);
    line-height: 1.5;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
}

.acg-wrap {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
.acg-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 22, 37, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--acg-border);
}

.acg-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.acg-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--acg-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acg-logo-icon { color: var(--acg-accent-pink); font-size: 1rem; }

.acg-nav { display: flex; align-items: center; gap: 4px; }

.acg-nav-link {
    padding: 8px 14px;
    color: var(--acg-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--acg-radius-sm);
    transition: color 0.2s, background 0.2s;
}

.acg-nav-link:hover { color: var(--acg-accent-pink); background: var(--acg-accent-soft); }
.acg-nav-link.is-active { color: var(--acg-accent); background: var(--acg-accent-soft); }

.acg-search {
    display: flex;
    align-items: center;
    background: var(--acg-bg-card);
    border: 1px solid var(--acg-border);
    border-radius: 20px;
    overflow: hidden;
    padding: 0 4px 0 14px;
}

.acg-search-input {
    width: 140px;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: var(--acg-text);
    font-size: 13px;
    font-family: var(--acg-font);
}

.acg-search-input::placeholder { color: var(--acg-text-muted); }
.acg-search-btn {
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--acg-text-muted);
    cursor: pointer;
    font-size: 14px;
}

.acg-menu-btn {
    display: none;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--acg-text);
    font-size: 1.2rem;
    cursor: pointer;
}

.acg-main { flex: 1; padding-top: 56px; }

/* Page */
.acg-page {
    padding-bottom: 48px;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.acg-home { max-width: 100%; padding-left: 0; padding-right: 0; }
.acg-home .acg-section { padding-left: 20px; padding-right: 20px; }

/* Hero */
.acg-hero {
    position: relative;
    height: 72vh;
    min-height: 400px;
    padding: 0 20px 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: var(--acg-bg) var(--acg-hero-bg) center/cover no-repeat;
}

.acg-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--acg-bg) 0%, transparent 50%, rgba(0,0,0,0.5) 100%);
}

.acg-hero-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; text-align: center; }
.acg-hero .acg-hero-actions { justify-content: center; }

.acg-hero-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--acg-accent), var(--acg-accent-pink));
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
    box-shadow: var(--acg-shadow);
}

.acg-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.acg-hero-meta { color: var(--acg-text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.acg-hero-actions { display: flex; gap: 12px; }

/* Buttons */
.acg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--acg-font);
    border-radius: var(--acg-radius-sm);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.acg-btn-primary {
    background: linear-gradient(135deg, var(--acg-accent), #9b4dbb);
    color: #fff;
    box-shadow: 0 4px 14px rgba(181, 101, 216, 0.4);
}
.acg-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(181, 101, 216, 0.5); }

.acg-btn-ghost {
    background: rgba(255,255,255,0.08);
    color: var(--acg-text);
    border: 1px solid var(--acg-border);
}
.acg-btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* Section + Ribbon */
.acg-section { padding: 28px 0; }

.acg-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acg-section-ribbon {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--acg-accent), var(--acg-accent-pink));
    color: #fff;
    font-size: 0.85rem;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.acg-section-more { margin-top: 12px; font-size: 0.9rem; }
.acg-section-more a { color: var(--acg-accent); text-decoration: none; }
.acg-section-more a:hover { text-decoration: underline; }

/* Grid 卡片 */
.acg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.acg-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.acg-card:hover { transform: translateY(-4px); }

.acg-card-pic {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--acg-radius);
    overflow: hidden;
    background: var(--acg-bg-card);
    box-shadow: var(--acg-shadow);
}

.acg-card-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acg-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
    font-size: 2rem;
}

.acg-card:hover .acg-card-play { opacity: 1; }

.acg-card-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--acg-accent), var(--acg-accent-pink));
    font-size: 11px;
    border-radius: 6px;
}

.acg-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acg-card-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--acg-text-muted);
}

.acg-card-stat { display: inline-flex; align-items: center; gap: 2px; }
.acg-card-stat:empty { display: none; }

.acg-card-meta {
    font-size: 0.8rem;
    color: var(--acg-text-muted);
    margin-top: 2px;
}

/* Home */
.acg-home__main { max-width: 1280px; margin: 0 auto; }

/* List 页 */
.acg-list-page { padding: 20px 0 48px; }

.acg-list-head {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--acg-border);
}

.acg-list-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.acg-list-sub { font-size: 0.9rem; color: var(--acg-text-muted); }

.acg-list-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--acg-border);
}

.acg-list-cat {
    display: inline-block;
    padding: 8px 16px;
    background: var(--acg-bg-card);
    border: 1px solid var(--acg-border);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--acg-text-muted);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.acg-list-cat:hover {
    border-color: var(--acg-accent);
    color: var(--acg-accent);
    background: var(--acg-accent-soft);
}

.acg-list-cat.is-active {
    border-color: var(--acg-accent);
    background: linear-gradient(135deg, var(--acg-accent), var(--acg-accent-pink));
    color: #fff;
}

.acg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.acg-pag-prev, .acg-pag-next {
    padding: 8px 16px;
    background: var(--acg-bg-card);
    color: var(--acg-text);
    text-decoration: none;
    border-radius: var(--acg-radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--acg-border);
}
.acg-pag-prev:hover, .acg-pag-next:hover { border-color: var(--acg-accent); color: var(--acg-accent); }
.acg-pag-num { color: var(--acg-text-muted); font-size: 0.9rem; }

/* Detail 页 */
.acg-detail-page { padding: 0 0 48px; }

.acg-detail-player-wrap {
    width: 100%;
    margin-bottom: 24px;
    background: var(--acg-bg-card);
    border-radius: var(--acg-radius);
    overflow: hidden;
    box-shadow: var(--acg-shadow);
}

.acg-detail-player-inner {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #000;
}

.acg-detail-player-inner .acg-player-wrap { width: 100%; height: 100%; }
.acg-detail-player-inner .acg-player-box { width: 100%; height: 100%; }

.acg-detail-player-cta {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--acg-border);
}

.acg-detail-player-cta .acg-btn-play { font-size: 1rem; padding: 12px 24px; }

.acg-detail-body { padding: 0; }

.acg-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.acg-detail-poster-wrap { position: sticky; top: 80px; height: fit-content; align-self: start; }

.acg-detail-poster {
    display: block;
    position: relative;
    border-radius: var(--acg-radius);
    overflow: hidden;
    background: var(--acg-bg-card);
    aspect-ratio: 2/3;
    box-shadow: var(--acg-shadow);
}

.acg-detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acg-detail-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
    font-size: 3rem;
}

.acg-detail-poster:hover .acg-detail-play { opacity: 1; }

.acg-detail-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--acg-accent), var(--acg-accent-pink));
    font-size: 12px;
    border-radius: 6px;
}

.acg-detail-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.acg-detail-meta, .acg-detail-cast { color: var(--acg-text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.acg-detail-actions { margin: 16px 0 20px; }

.acg-detail-ep { margin: 20px 0; }
.acg-detail-ep-head { font-size: 0.95rem; font-weight: 600; margin-bottom: 12px; color: var(--acg-text); }
.acg-detail-ep-group { margin-bottom: 16px; }
.acg-detail-ep-line {
    display: block;
    font-size: 0.8rem;
    color: var(--acg-text-muted);
    margin-bottom: 8px;
}

.acg-detail-ep-items { display: flex; flex-wrap: wrap; gap: 8px; }

.acg-detail-ep-item {
    padding: 6px 12px;
    background: var(--acg-bg-card);
    border: 1px solid var(--acg-border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--acg-text);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.acg-detail-ep-item:hover { border-color: var(--acg-accent); background: var(--acg-accent-soft); }

.acg-detail-plot { margin-top: 24px; }
.acg-detail-plot-title { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.acg-detail-plot-body { font-size: 0.9rem; color: var(--acg-text-muted); line-height: 1.7; }
.acg-detail-plot-text-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--acg-text);
    margin: 14px 0 6px;
}
.acg-detail-plot-text-title:first-child { margin-top: 0; }
.acg-detail-plot-text-content { margin-bottom: 8px; }
.acg-detail-plot-content { font-size: 0.9rem; color: var(--acg-text-muted); line-height: 1.7; }

/* Play 页 */
.acg-play-page { padding: 0 0 48px; }

.acg-play-area {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 0 0 var(--acg-radius) var(--acg-radius);
    overflow: hidden;
}

.acg-player-box { width: 100%; height: 100%; }
.acg-player-wrap { width: 100%; position: relative; }

.acg-play-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--acg-border);
}

.acg-play-title { font-size: 1.15rem; font-weight: 600; margin-right: 12px; }
.acg-play-ep { font-size: 0.9rem; color: var(--acg-accent); margin-right: auto; }
.acg-play-nav { display: flex; gap: 8px; }

.acg-play-lines {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
}

.acg-play-line {
    padding: 6px 14px;
    background: var(--acg-bg-card);
    border: 1px solid var(--acg-border);
    border-radius: var(--acg-radius-sm);
    font-size: 0.85rem;
    color: var(--acg-text-muted);
    text-decoration: none;
}

.acg-play-line.is-active { border-color: var(--acg-accent); color: var(--acg-accent); background: var(--acg-accent-soft); }

.acg-play-ep-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.acg-play-ep-line-label {
    width: 100%;
    font-size: 0.8rem;
    color: var(--acg-text-muted);
    margin-bottom: 4px;
}

.acg-play-ep-item {
    padding: 6px 12px;
    background: var(--acg-bg-card);
    border: 1px solid var(--acg-border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--acg-text);
    text-decoration: none;
}

.acg-play-ep-item.is-active { border-color: var(--acg-accent); background: var(--acg-accent-soft); color: var(--acg-accent); }

.acg-play-plot {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.acg-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--acg-text-muted);
}

.acg-footer {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid var(--acg-border);
    text-align: center;
    background: var(--acg-bg-card);
}

.acg-footer-text { font-size: 0.85rem; color: var(--acg-text-muted); }

/* ========== 响应式：平板 ========== */
@media (max-width: 900px) {
    .acg-header-inner { padding: 0 12px; gap: 12px; }
    .acg-logo { font-size: 1.1rem; }
    .acg-search-input { width: 100px; }
    .acg-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--acg-bg-elevated);
        flex-direction: column;
        padding: 12px;
        border-bottom: 1px solid var(--acg-border);
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .acg-nav.is-open { display: flex; }
    .acg-nav-link { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; }
    .acg-menu-btn { display: block; min-width: 44px; min-height: 44px; }
    .acg-detail-layout { grid-template-columns: 1fr; gap: 24px; }
    .acg-detail-poster-wrap { position: static; max-width: 260px; margin: 0 auto 24px; }
    .acg-detail-player-wrap { margin-left: -12px; margin-right: -12px; width: calc(100% + 24px); border-radius: 0; }
    .acg-detail-player-inner { max-width: 100%; }
    .acg-detail-player-cta { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
    .acg-detail-player-cta .acg-btn { padding: 10px 16px; font-size: 0.9rem; }
    .acg-play-bar { padding: 12px 16px; }
    .acg-play-lines { padding: 10px 16px; }
    .acg-play-ep-list { padding: 12px 16px; }
    .acg-play-plot { padding: 16px; }
}

/* ========== 响应式：手机 ========== */
@media (max-width: 600px) {
    .acg-header-inner { padding: 0 10px; height: 52px; }
    .acg-main { padding-top: 52px; }
    .acg-logo { font-size: 1rem; }
    .acg-logo-icon { font-size: 0.9rem; }
    .acg-search { flex: 1; min-width: 0; max-width: 120px; }
    .acg-search-input { width: 100%; min-width: 0; font-size: 12px; }
    .acg-page { padding-left: 10px; padding-right: 10px; padding-bottom: 24px; }
    .acg-home .acg-section { padding-left: 10px; padding-right: 10px; padding-top: 16px; padding-bottom: 20px; }
    .acg-hero {
        height: 50vh;
        min-height: 260px;
        padding: 0 10px 24px;
    }
    .acg-hero .acg-hero-title { font-size: 1.25rem; }
    .acg-hero .acg-hero-meta { font-size: 0.8rem; }
    .acg-hero .acg-hero-actions { flex-wrap: wrap; gap: 8px; }
    .acg-hero .acg-btn { padding: 10px 16px; font-size: 0.85rem; }
    .acg-section-title { font-size: 1rem; margin-bottom: 12px; }
    .acg-section-ribbon { font-size: 0.8rem; padding: 3px 10px; }
    .acg-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .acg-card-title { font-size: 0.8rem; margin-top: 6px; }
    .acg-card-stats { margin-top: 4px; gap: 6px; font-size: 0.7rem; }
    .acg-card-meta { font-size: 0.75rem; }
    .acg-card-badge { font-size: 10px; padding: 2px 6px; bottom: 6px; left: 6px; }
    .acg-list-head { margin-bottom: 16px; padding-bottom: 12px; }
    .acg-list-title { font-size: 1.2rem; }
    .acg-list-sub { font-size: 0.85rem; }
    .acg-list-cats {
        margin-bottom: 14px;
        margin-left: -10px;
        margin-right: -10px;
        padding: 0 10px 12px;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    .acg-list-cats::-webkit-scrollbar { display: none; }
    .acg-list-cat { flex-shrink: 0; padding: 6px 12px; font-size: 0.85rem; white-space: nowrap; }
    .acg-detail-body { padding: 0; }
    .acg-detail-player-wrap { margin-left: -10px; margin-right: -10px; width: calc(100% + 20px); }
    .acg-detail-layout { gap: 20px; }
    .acg-detail-title { font-size: 1.25rem; }
    .acg-detail-meta, .acg-detail-cast { font-size: 0.85rem; }
    .acg-detail-actions .acg-btn { padding: 10px 18px; min-height: 44px; }
    .acg-detail-ep-items { gap: 6px; }
    .acg-detail-ep-item { padding: 6px 10px; font-size: 0.8rem; }
    .acg-detail-plot-content { font-size: 0.85rem; }
    .acg-play-bar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
    .acg-play-title { font-size: 1rem; }
    .acg-play-ep { font-size: 0.85rem; }
    .acg-play-nav .acg-btn { padding: 8px 14px; min-height: 40px; }
    .acg-play-lines { padding: 8px 12px; flex-wrap: wrap; }
    .acg-play-line { padding: 6px 10px; font-size: 0.8rem; }
    .acg-play-ep-list { padding: 10px 12px; gap: 6px; }
    .acg-play-ep-item { padding: 5px 10px; font-size: 0.8rem; }
    .acg-play-plot { padding: 12px; }
    .acg-play-plot .acg-detail-plot-content { font-size: 0.85rem; }
    .acg-pagination { margin-top: 24px; gap: 12px; flex-wrap: wrap; justify-content: center; }
    .acg-pag-prev, .acg-pag-next { padding: 10px 14px; min-height: 44px; }
    .acg-footer { padding: 14px 10px; }
    .acg-empty { padding: 40px 16px; font-size: 0.9rem; }
}

/* ========== 响应式：小屏手机 ========== */
@media (max-width: 380px) {
    .acg-page { padding-left: 8px; padding-right: 8px; }
    .acg-home .acg-section { padding-left: 8px; padding-right: 8px; }
    .acg-grid { gap: 8px; }
    .acg-card-title { font-size: 0.75rem; }
    .acg-card-stats { font-size: 0.65rem; gap: 4px; }
    .acg-hero .acg-hero-title { font-size: 1.1rem; }
}
