
:root {
    --color-coral: #ffaaa5;
    --color-coral-deep: #f59590;
    --color-coral-light: #ffc4c0;
    --color-apricot: #ffd3b6;
    --color-apricot-light: #ffe8d8;
    --color-light-green: #dcedc1;
    --color-light-green-deep: #c8dfa5;
    --color-mint: #a8e6cf;
    --color-mint-light: #c8f2e0;
    --color-mint-deep: #8dd4b8;
    --color-white: #ffffff;
    --color-dark: #2c3e50;
    --color-dark-light: #3d5266;
    --color-gray: #6b7280;
    --color-gray-light: #9ca3af;
    --color-bg: #fafbfc;
    --color-bg-warm: #fefdfb;
    --color-shadow-sm: rgba(0, 0, 0, 0.04);
    --color-shadow: rgba(0, 0, 0, 0.07);
    --color-shadow-lg: rgba(0, 0, 0, 0.12);
    --color-shadow-xl: rgba(0, 0, 0, 0.18);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-heading: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: #f8f7f5;
    background-image:
        radial-gradient(ellipse at 15% 10%, rgba(255, 211, 182, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 78% 25%, rgba(168, 230, 207, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 60%, rgba(220, 237, 193, 0.08) 0%, transparent 50%);
    color: var(--color-dark);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.top-nav {
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1.5px solid transparent;
    border-image: linear-gradient(90deg, var(--color-mint), var(--color-coral-light), var(--color-mint)) 1;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05), 0 4px 30px rgba(168, 230, 207, 0.1);
    padding: 0 24px;
}

.top-nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-brand {
    flex-shrink: 0;
}
.nav-brand h1 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    white-space: nowrap;
    margin: 0;
    background: linear-gradient(135deg, #e87873 0%, #f59590 40%, #e87873 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: var(--transition);
    animation: brandShimmer 4s ease-in-out infinite;
}
@keyframes brandShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.nav-brand h1:hover {
    transform: scale(1.04);
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links li a {
    display: inline-block;
    padding: 9px 15px;
    text-decoration: none;
    color: #4a5568;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 22px;
    transition: var(--transition-fast);
    white-space: nowrap;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2.5px;
    background: var(--color-coral);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links li a:hover,
.nav-links li a:focus {
    background: var(--color-apricot-light);
    color: #c0392b;
    transform: translateY(-1px);
}
.nav-links li a:hover::after,
.nav-links li a:focus::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--color-coral) 0%, #f59590 100%);
    color: #fff;
    border: none;
    border-radius: 26px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(255, 170, 165, 0.4), 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}
.btn-login::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.btn-login:hover::before { opacity: 1; }
.btn-login:hover {
    background: linear-gradient(135deg, #f59590 0%, #e87873 100%);
    box-shadow: 0 8px 28px rgba(255, 170, 165, 0.55), 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    color: #fff;
    text-decoration: none;
}

.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 24px 44px;
    display: flex;
    gap: 30px;
    flex: 1;
    align-items: flex-start;
}
.content-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.sidebar-right {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 750;
    color: #3d3d3d;
    margin-bottom: 20px;
    padding-left: 18px;
    border-left: 4px solid var(--color-coral);
    letter-spacing: 0.6px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    left: -2px;
    bottom: -6px;
    width: 40px;
    height: 2px;
    background: var(--color-apricot);
    border-radius: 2px;
}
.section-title span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-gray-light);
    letter-spacing: 0;
    margin-left: 4px;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.comic-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--color-shadow-sm), 0 4px 16px var(--color-shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    position: relative;
}
.comic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: border-color 0.4s ease;
    pointer-events: none;
    z-index: 2;
}
.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px var(--color-shadow-lg), 0 4px 12px var(--color-shadow);
}
.comic-card:hover::before { border-color: var(--color-mint); }
.comic-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    flex-shrink: 0;
    position: relative;
}
.comic-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.comic-card:hover .comic-card-img img { transform: scale(1.08); }
.comic-card-body {
    padding: 15px 13px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    background: var(--color-white);
}
.comic-card-body h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.35;
}
.comic-card-body .meta-line {
    font-size: 0.73rem;
    color: #7b8a8b;
    display: flex;
    flex-wrap: wrap;
    gap: 3px 7px;
    align-items: center;
}
.comic-type-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-coral) 0%, #f59590 100%) !important;
    color: #fff !important;
    font-size: 0.66rem !important;
    padding: 4px 12px !important;
    border-radius: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(255, 170, 165, 0.3);
}
.site-name-tag {
    background: #ffd3b6 !important;
    color: #8b5e3c !important;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.66rem;
    font-weight: 600;
    margin-left: 4px;
}

.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.featured-card {
    background: linear-gradient(180deg, #fffefb 0%, #fffdf8 40%, #ffffff 100%);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--color-shadow), 0 1px 3px var(--color-shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #f0e8d8;
}
.featured-card:hover { transform: translateY(-6px); box-shadow: 0 14px 34px var(--color-shadow-lg); }
.featured-card-img { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #f5f5f5; }
.featured-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.featured-card:hover .featured-card-img img { transform: scale(1.06); }
.featured-card-body { padding: 14px 16px 16px; }
.featured-card-body h3 { font-size: 0.9rem; font-weight: 700; color: #3d3d3d; }
.feat-meta { font-size: 0.72rem; color: #888; margin-top: 5px; }

.detail-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: 0 2px 10px var(--color-shadow);
    border-left: 5px solid var(--color-mint);
}
.detail-section h3 { font-size: 1.25rem; font-weight: 750; margin-bottom: 16px; }
.detail-section p { font-size: 0.93rem; color: #555; line-height: 1.85; margin-bottom: 12px; }
.detail-img-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 18px 0; }
.detail-img-row img {
    width: 160px; height: 220px; object-fit: cover;
    border-radius: var(--radius-sm); box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: var(--transition); cursor: pointer; border: 2px solid transparent;
}
.detail-img-row img:hover { transform: scale(1.05); border-color: var(--color-mint); }

.character-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.character-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 2px 8px var(--color-shadow-sm); text-align: center;
    transition: var(--transition); cursor: pointer; border: 1px solid transparent;
}
.character-card:hover { transform: translateY(-6px); box-shadow: 0 14px 36px var(--color-shadow-lg); }
.character-card-img { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #fafafa; }
.character-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s; }
.character-card:hover .character-card-img img { transform: scale(1.09); }
.character-card-body { padding: 12px 10px 16px; }
.character-card-body h4 { font-size: 0.9rem; font-weight: 700; }
.role-tag {
    display: inline-block; font-size: 0.7rem; background: var(--color-light-green);
    color: #4a7c59; padding: 3px 12px; border-radius: 12px; margin-top: 6px;
}

.comment-list { display: flex; flex-direction: column; gap: 15px; }
.comment-item {
    background: #fff; border-radius: var(--radius-sm); padding: 18px 22px;
    box-shadow: 0 1px 6px var(--color-shadow-sm); border-left: 4px solid var(--color-light-green);
    transition: var(--transition);
}
.comment-item:hover { box-shadow: 0 6px 22px var(--color-shadow-lg); transform: translateX(3px); }
.comment-user { font-weight: 700; font-size: 0.88rem; color: #3d3d3d; margin-bottom: 8px; }
.comment-text { font-size: 0.85rem; color: #555; line-height: 1.75; }
.comment-time { font-size: 0.7rem; color: #b0b0b0; margin-top: 8px; }

.sidebar-card {
    background: #fff; border-radius: var(--radius); padding: 20px 18px;
    box-shadow: 0 2px 10px var(--color-shadow); border: 1px solid #f0f0f0;
    transition: var(--transition); word-break: break-word;
}
.sidebar-card h3 {
    font-size: 1.02rem; font-weight: 750; margin-bottom: 14px;
    padding-bottom: 11px; border-bottom: 2px dashed var(--color-apricot);
}
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 0; }
.rank-list li {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: 20px; cursor: pointer; font-size: 0.85rem; color: #4a5568;
    white-space: normal; word-break: break-word;
}
.rank-list li:hover { background: #fef9f4; transform: translateX(4px); }
.rank-num {
    width: 30px; height: 30px; border-radius: 50%; background: var(--color-apricot);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
    font-size: 0.8rem; color: #8b5e3c; flex-shrink: 0;
}
.rank-list li:nth-child(1) .rank-num { background: linear-gradient(135deg, #ff6b6b, #ff8787); color: #fff; }
.rank-list li:nth-child(2) .rank-num { background: linear-gradient(135deg, #ff8e7a, #ffa599); color: #fff; }
.rank-list li:nth-child(3) .rank-num { background: linear-gradient(135deg, #ffb09c, #ffc4b5); color: #fff; }
.rank-info { flex: 1; min-width: 0; }
.rank-info .rank-name { font-weight: 600; line-height: 1.4; }
.rank-info .rank-count { font-size: 0.7rem; color: #999; }
.rise-badge {
    display: inline-block; background: #ffe0e0; color: #d63031; font-size: 0.68rem;
    padding: 3px 9px; border-radius: 10px; font-weight: 700; margin-left: 5px;
}
.stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px dotted #eee; font-size: 0.85rem; color: #555;
    flex-wrap: wrap; gap: 6px;
}
.stat-value { font-weight: 750; color: #e87873; font-size: 0.92rem; white-space: nowrap; }
.update-time { font-size: 0.7rem; color: #b0b0b0; text-align: right; margin-top: 10px; }
.total-reading-big {
    font-size: 2rem; font-weight: 850; text-align: center; padding: 10px 0;
    background: linear-gradient(135deg, #e87873, #f59590, #e87873);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; animation: brandShimmer 4s ease-in-out infinite;
}

.platform-intro {
    background: linear-gradient(145deg, #fefefe 0%, #fdf9f4 60%, #fefdfb 100%);
    border-radius: var(--radius); padding: 30px 34px; box-shadow: 0 2px 10px var(--color-shadow);
}
.app-download-section {
    background: linear-gradient(135deg, #fff 0%, #f6fdf9 100%);
    border-radius: var(--radius); padding: 30px 34px; display: flex; align-items: center;
    gap: 26px; flex-wrap: wrap; box-shadow: 0 2px 10px var(--color-shadow);
}
.app-icon {
    width: 84px; height: 84px; border-radius: 20px;
    background: linear-gradient(135deg, var(--color-mint), var(--color-mint-deep));
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.app-icon img { width: 50px; height: 50px; object-fit: contain; }
.btn-download-app {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px;
    background: linear-gradient(135deg, #2c3e50, #3d5266); color: #fff;
    border-radius: 26px; text-decoration: none; font-weight: 600; transition: var(--transition);
}
.btn-download-app:hover { background: #1a2a38; transform: translateY(-3px); }

.bottom-nav {
    width: 100%; background: linear-gradient(180deg, #2c3e50, #1a2a38);
    color: #ccc; padding: 32px 24px; margin-top: auto;
}
.bottom-nav-inner {
    max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 18px;
}
.footer-links { display: flex; gap: 20px; list-style: none; padding: 0; }
.footer-links a { color: #bbb; text-decoration: none; font-size: 0.84rem; }
.footer-links a:hover { color: #fff; }
.footer-brand { font-weight: 750; color: #fff; font-size: 1rem; }
.footer-mobile-link a {
    color: var(--color-mint-light); text-decoration: underline;
    font-weight: 600; font-size: 0.9rem; padding: 6px 14px; border-radius: 18px;
    border: 1px solid rgba(168,230,207,0.3);
}
.footer-mobile-link a:hover { background: rgba(168,230,207,0.15); color: #fff; }
.footer-copyright { font-size: 0.72rem; color: #888; width: 100%; text-align: center; margin-top: 10px; }

@media (max-width: 1280px) {
    .comic-grid { grid-template-columns: repeat(4, 1fr); }
    .character-grid { grid-template-columns: repeat(4, 1fr); }
    .featured-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar-right { width: 300px; }
}
@media (max-width: 1024px) {
    .comic-grid { grid-template-columns: repeat(3, 1fr); }
    .character-grid { grid-template-columns: repeat(3, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar-right { width: 280px; }
}
@media (max-width: 860px) {
    .main-container { flex-direction: column; }
    .sidebar-right {
        width: 100%; position: static; flex-direction: row; flex-wrap: wrap;
        gap: 16px; max-height: none; overflow-y: visible;
    }
    .sidebar-right .sidebar-card { flex: 1 1 calc(50% - 10px); min-width: 250px; }
    .comic-grid { grid-template-columns: repeat(3, 1fr); }
    .character-grid { grid-template-columns: repeat(3, 1fr); }
    .top-nav-inner { height: auto; padding: 10px 0; justify-content: center; }
    .nav-links li a { padding: 7px 11px; font-size: 0.78rem; }
}
@media (max-width: 560px) {
    .comic-grid { grid-template-columns: repeat(2, 1fr); }
    .character-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: 1fr 1fr; }
    .sidebar-right .sidebar-card { flex: 1 1 100%; min-width: auto; }
    .top-nav-inner { flex-direction: column; }
    .bottom-nav-inner { flex-direction: column; text-align: center; }
}
