:root {
    --color-bg: #f6f8f9;
    --color-content-bg: #ffffff;
    --color-text: #32343d;
    --color-primary: #007ccf;
    --color-text-secondary: #6b7280;
    --color-border: #e5e7eb;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-tag-age: #ff9800;
    --color-tag-status: #4caf50;
    --color-rating: #ff6f00;
    --nav-height: 56px;
    --max-width: 1200px;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: var(--color-content-bg);
    box-shadow: 0 1px 3px var(--color-shadow);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 36px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 15px;
    color: var(--color-text);
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover {
    color: var(--color-primary);
    background-color: rgba(0, 124, 207, 0.06);
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 500;
}

.main-content {
    min-height: calc(100vh - var(--nav-height) - 170px);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .anime-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.anime-card {
    display: block;
    background: var(--color-content-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px var(--color-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.anime-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.anime-card-cover {
    width: 214px;
    height: 285px;
    overflow: hidden;
    background: #e5e7eb;
    position: relative;
    margin: 0 auto;
}

.anime-card-cover img {
    width: 214px;
    height: 285px;
    object-fit: fill;
}

.anime-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-tag-status);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.5;
}

.anime-card-info {
    padding: 12px 14px 16px;
}

.anime-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.anime-card-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
}

.detail-header {
    display: flex;
    gap: 32px;
    background: var(--color-content-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 3px var(--color-shadow);
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .detail-header {
        flex-direction: column;
        gap: 16px;
    }
}

.detail-cover {
    width: 214px;
    flex-shrink: 0;
}

.detail-cover img {
    width: 214px;
    height: 285px;
    object-fit: fill;
    border-radius: 6px;
    background: #e5e7eb;
}

.detail-info {
    flex: 1;
    position: relative;
}

.detail-info-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.detail-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}

.detail-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 4px;
    line-height: 1.6;
    white-space: nowrap;
}

.detail-tag-age {
    background: rgba(255, 152, 0, 0.1);
    color: var(--color-tag-age);
}

.detail-tag-status {
    background: rgba(76, 175, 80, 0.1);
    color: var(--color-tag-status);
}

.detail-rating {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-rating);
    line-height: 1;
}

.detail-meta-row {
    display: flex;
    gap: 32px;
    margin-top: 12px;
}

.detail-meta-col {
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
}

.detail-meta-author {
    display: flex;
    align-items: flex-start;
}

.detail-meta-author .detail-meta-value {
    flex: 1;
}

.detail-meta-label {
    color: var(--color-text-secondary);
}

.detail-meta-value {
    color: var(--color-text);
}

.detail-desc {
    margin-top: 16px;
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
}

.detail-desc .detail-meta-label {
    flex-shrink: 0;
}

.detail-desc-text {
    flex: 1;
}

.episode-list {
    background: var(--color-content-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.episode-items {
    list-style: none;
}

.episode-item {
    border-bottom: 1px solid var(--color-border);
}

.episode-item:last-child {
    border-bottom: none;
}

.episode-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    transition: background-color 0.15s;
    border-radius: 4px;
}

.episode-link:hover {
    background-color: rgba(0, 124, 207, 0.04);
}

.episode-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    min-width: 60px;
}

.episode-title {
    font-size: 15px;
    color: var(--color-text);
}

.episode-link:hover .episode-title {
    color: var(--color-primary);
}

.reader-section .reader-fullwidth {
    padding: 0;
}

.reader-fullwidth {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.reader-content {
    background: var(--color-content-bg);
    overflow: hidden;
}

.reader-iframe {
    width: 100%;
    height: calc(100vh - var(--nav-height) - 80px);
    min-height: 600px;
    border: none;
    display: block;
}

.reader-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.reader-back {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: var(--color-primary);
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.reader-back:hover {
    opacity: 0.8;
}

.reader-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    padding: 0 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-next {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: var(--color-primary);
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.reader-next:hover {
    opacity: 0.8;
}

.reader-next-placeholder {
    flex-shrink: 0;
    width: 60px;
}

.content-section .section-inner {
    max-width: 1200px;
}

.content-body {
    background: var(--color-content-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.content-body h2 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--color-text);
}

.content-body h2:first-child {
    margin-top: 0;
}

.content-body p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 12px;
}

.content-body ul,
.content-body ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.content-body li {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 4px;
}

.content-body ol.list-paren {
    list-style: none;
    padding-left: 0;
    counter-reset: paren-counter;
    margin-bottom: 12px;
}

.content-body ol.list-paren > li {
    counter-increment: paren-counter;
    padding-left: 2.5em;
    text-indent: -2.5em;
    margin-bottom: 8px;
}

.content-body ol.list-paren > li::before {
    content: "（" counter(paren-counter) "）";
}

.about-intro {
    margin-bottom: 24px;
}

.about-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #e5e7eb;
}

.about-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 16px;
}

.site-footer {
    background: var(--color-content-bg);
    border-top: 1px solid var(--color-border);
    /* margin-top: 40px; */
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 24px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.footer-left {
    flex: 1;
}

.footer-right {
    width: 577px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-right-row {
    display: flex;
    gap: 24px;
    /* justify-content: flex-end; */
}

.footer-left p {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 22px;
}

.footer-link {
    color: var(--color-text-secondary);
    transition: color 0.2s;
    line-height: 22px;
}

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

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

.footer-copyright {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-legal {
    font-size: 13px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-sep {
    color: var(--color-border);
}

@media (max-width: 640px) {
    .footer-top {
        flex-direction: column;
        gap: 16px;
    }

    .footer-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right-row {
        justify-content: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .detail-meta-row {
        flex-direction: column;
        gap: 8px;
    }

    .detail-rating {
        position: static;
        margin-top: 8px;
    }
}