/* ============================================
   鉴黄师app - 星河动漫 ucstatic.cn
   暗色二次元主题 · 响应式 · 毛玻璃 · 动画
   ============================================ */

/* ---------- 基础重置与字体 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: radial-gradient(ellipse at 20% 0%, #1b1b3a 0%, #0a0a18 60%, #06060f 100%);
    color: #e0e0f0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

/* ---------- 链接 ---------- */
a {
    color: #a78bfa;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: #c4b5fd;
    text-decoration: none;
    opacity: 0.9;
}

/* ---------- 图片 ---------- */
img {
    max-width: 100%;
    display: block;
    border-radius: 10px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

/* ---------- 容器 ---------- */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 导航栏 ---------- */
.navbar {
    background: rgba(13, 13, 32, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 16px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.logo {
    font-size: 1.7rem;
    font-weight: 800;
    color: #f0f0ff;
    margin-right: auto;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #a78bfa, #e879f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.3);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-links a {
    color: #d0d0e8;
    font-weight: 500;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #e879f9);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: #a78bfa;
}

.nav-links a.active {
    color: #8b5cf6;
}

/* ---------- 标题 ---------- */
h1, h2, h3 {
    color: #f0f0ff;
    font-weight: 700;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    margin: 50px 0 26px;
    border-left: 6px solid #8b5cf6;
    padding-left: 18px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), transparent);
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 0 12px 12px 0;
    animation: fadeInUp 0.6s ease both;
}

h3 {
    font-size: 1.4rem;
    margin: 20px 0 12px;
}

/* ---------- 卡片网格 ---------- */
.grid {
    display: grid;
    gap: 22px;
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ---------- 卡片 ---------- */
.card {
    background: rgba(26, 26, 53, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 16px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    animation: fadeInUp 0.5s ease both;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: #8b5cf6;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card img {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-title {
    color: #f0f0ff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 14px;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: #a78bfa;
}

.card-meta {
    color: #b0b0d0;
    font-size: 0.88rem;
    margin: 6px 0;
    line-height: 1.5;
}

.card-text {
    color: #d0d0e8;
    font-size: 0.93rem;
    line-height: 1.6;
}

/* ---------- 徽章 ---------- */
.badge {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* ---------- 区块 ---------- */
.section {
    margin-bottom: 40px;
}

/* ---------- 侧边栏布局 ---------- */
.layout-with-aside {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.sidebar {
    background: rgba(20, 20, 46, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 24px 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.widget {
    margin-bottom: 30px;
}

.widget h3 {
    font-size: 1.25rem;
    border-bottom: 2px solid #8b5cf6;
    padding-bottom: 10px;
    margin-bottom: 16px;
    color: #f0f0ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(45, 45, 85, 0.8);
    transition: padding 0.3s ease, background 0.3s ease;
    border-radius: 8px;
}

.rank-item:hover {
    padding-left: 10px;
    background: rgba(139, 92, 246, 0.05);
}

.rank-item span:first-child {
    color: #a78bfa;
    font-weight: 600;
}

.rank-item span:last-child {
    color: #d0d0e8;
}

.widget p {
    color: #d0d0e8;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(45, 45, 85, 0.5);
}

/* ---------- 评论区 ---------- */
.comment-block {
    background: rgba(26, 26, 53, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.12);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 14px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    animation: fadeInUp 0.5s ease both;
}

.comment-block:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.4);
}

.comment-user {
    color: #a78bfa;
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-time {
    color: #8888aa;
    font-size: 0.78rem;
    margin-left: 12px;
}

.comment-content {
    color: #e0e0f0;
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ---------- 按钮 ---------- */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 24px;
}

.btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: none;
    transition: all 0.25s ease;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ---------- 页脚 ---------- */
.footer {
    background: rgba(10, 10, 24, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.footer a {
    color: #a78bfa;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #c4b5fd;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    margin-bottom: 24px;
}

.footer-links a {
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.05);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    color: #b0b0d0;
    font-size: 0.9rem;
    line-height: 1.8;
}

.legal {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
    color: #b0b0d0;
}

.legal a {
    font-size: 0.88rem;
    opacity: 0.8;
}

.legal a:hover {
    opacity: 1;
}

/* ---------- 介绍盒 ---------- */
.intro-box {
    background: rgba(22, 22, 48, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.intro-box:hover {
    transform: translateY(-4px);
}

.intro-box p {
    margin-bottom: 14px;
    color: #d0d0e8;
    line-height: 1.8;
}

.intro-box strong {
    color: #a78bfa;
}

/* ---------- 角色头像 ---------- */
.char-avatar {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    transition: all 0.4s ease;
}

.char-avatar:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: #e879f9;
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.4);
}

.role-name {
    color: #f0f0ff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 14px;
    text-align: center;
    background: linear-gradient(135deg, #a78bfa, #e879f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-desc {
    color: #d0d0e8;
    font-size: 0.93rem;
    text-align: center;
    margin-top: 6px;
}

/* ---------- 下载区 ---------- */
#download {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(232, 121, 249, 0.05));
    border-radius: 24px;
    padding: 40px 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

#download::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

#download h2 {
    border-left: none;
    text-align: center;
    padding-left: 0;
    background: none;
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(20px, -20px) rotate(5deg);
    }
}

/* 滚动进入动画 */
.card:nth-child(odd) {
    animation-delay: 0.1s;
}

.card:nth-child(even) {
    animation-delay: 0.2s;
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a18;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-radius: 10px;
    border: 2px solid #0a0a18;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

/* ---------- 选中文本 ---------- */
::selection {
    background: rgba(139, 92, 246, 0.4);
    color: #ffffff;
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 1024px) {
    .layout-with-aside {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        width: 100%;
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    h2 {
        font-size: 1.6rem;
        margin: 40px 0 20px;
    }

    h3 {
        font-size: 1.2rem;
    }

    .nav-wrap {
        gap: 16px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        gap: 14px;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links a {
        font-size: 0.88rem;
        white-space: nowrap;
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 12px;
    }

    .card-title {
        font-size: 1.05rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .comment-block {
        break-inside: auto !important;
    }

    #reviews > div {
        columns: 1 !important;
    }

    .intro-box {
        padding: 24px 18px;
    }

    .footer-links {
        gap: 14px;
    }

    .legal {
        gap: 16px;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card {
        padding: 10px;
    }

    .card-meta {
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    h2 {
        font-size: 1.4rem;
        padding-left: 14px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

/* ---------- 暗色模式增强 ---------- */
@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(ellipse at 20% 0%, #1b1b3a 0%, #0a0a18 60%, #06060f 100%);
    }
}

/* ---------- 性能优化 ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 无障碍支持 ---------- */
:focus-visible {
    outline: 3px solid #8b5cf6;
    outline-offset: 2px;
}

/* ---------- 渐变横幅效果 ---------- */
#hot {
    position: relative;
}

#hot::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    height: 300px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(232, 121, 249, 0.05), transparent);
    border-radius: 30px;
    z-index: -1;
    pointer-events: none;
}

/* ---------- 精选区块 ---------- */
#featured .card {
    background: linear-gradient(145deg, rgba(26, 26, 53, 0.8), rgba(20, 20, 46, 0.6));
}

#featured .card img {
    height: 200px;
    object-fit: cover;
}

/* ---------- 角色区块 ---------- */
#characters .card {
    text-align: center;
    background: rgba(26, 26, 53, 0.6);
}

#characters .card img {
    margin: 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
    transition: all 0.4s ease;
}

#characters .card img:hover {
    transform: scale(1.08) rotate(8deg);
    border-color: #e879f9;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

#characters .card-meta {
    font-size: 0.85rem;
    color: #b0b0d0;
}

/* ---------- 平台介绍 ---------- */
#platform {
    background: linear-gradient(135deg, rgba(20, 20, 46, 0.9), rgba(26, 26, 53, 0.7));
    border-color: rgba(139, 92, 246, 0.3);
}

#platform p {
    position: relative;
    padding-left: 16px;
    border-left: 2px solid rgba(139, 92, 246, 0.3);
}

/* ---------- 评论多列 ---------- */
#reviews > div {
    column-gap: 20px;
}

/* ---------- 侧边栏粘性 ---------- */
.sidebar .widget:last-child {
    margin-bottom: 0;
}

/* ---------- 版权区 ---------- */
.copyright p {
    margin-bottom: 6px;
}

/* ---------- 链接下划线动画 ---------- */
.footer a,
.legal a {
    position: relative;
}

.footer a::after,
.legal a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #a78bfa;
    transition: width 0.3s ease;
}

.footer a:hover::after,
.legal a:hover::after {
    width: 100%;
}

/* ---------- 加载动画 ---------- */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ---------- 空状态 ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8888aa;
}

/* ---------- 工具类 ---------- */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- 渐变文字 ---------- */
.gradient-text {
    background: linear-gradient(135deg, #a78bfa, #e879f9, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ---------- 卡片悬浮光效 ---------- */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(139, 92, 246, 0.05) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.card:hover::after {
    opacity: 1;
}

/* ---------- 响应式图片 ---------- */
.card img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
}

#featured .card img {
    aspect-ratio: 3/2;
}

#characters .card img {
    aspect-ratio: 1/1;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

/* ---------- 移动端导航优化 ---------- */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex-shrink: 0;
        padding: 6px 12px;
        background: rgba(139, 92, 246, 0.08);
        border-radius: 20px;
        border: 1px solid rgba(139, 92, 246, 0.1);
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(139, 92, 246, 0.15);
        border-color: #8b5cf6;
    }
}

/* ---------- 打印样式 ---------- */
@media print {
    .navbar,
    .footer,
    .btn-group {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        break-inside: avoid;
    }
}