/* ============================================================
   小蓝视频 - 高清短视频在线播放_小蓝影视社区平台
   meijiatuan.cn | 深空蓝紫 · 毛玻璃 · 暗色模式
   ============================================================ */

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

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(145deg, #0a0a18 0%, #14142a 100%);
    color: #e0e0f0;
    line-height: 1.6;
    min-height: 100vh;
    padding: 0 20px;
    overflow-x: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #0a0a18;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #4c1d95);
    border-radius: 20px;
    border: 2px solid #0a0a18;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}

/* 选中文字样式 */
::selection {
    background: #7c3aed;
    color: #ffffff;
}

/* ---------- 链接与通用 ---------- */
a {
    color: #a78bfa;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s, transform 0.2s;
}
a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- 布局容器 ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    background: transparent;
    position: relative;
}

/* 顶部光晕装饰 */
.container::before {
    content: '';
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- 头部导航 ---------- */
.site-header {
    background: rgba(13, 13, 32, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 24px 24px;
    padding: 20px 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(45, 45, 85, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f0f0ff;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #c4b5fd, #7c3aed, #c4b5fd);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShimmer 3s ease infinite;
    cursor: default;
}

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

.nav-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    list-style: none;
}

.nav-links a {
    color: #d0d0e8;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    position: relative;
    transition: color 0.3s, border-color 0.3s;
}

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

.nav-links a:hover {
    color: #a78bfa;
    border-bottom-color: transparent;
    text-decoration: none;
}

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

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

.nav-links .active::after {
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
}

/* ---------- 主体网格 ---------- */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin: 30px 0;
    position: relative;
    z-index: 1;
}

/* ---------- 内容区 ---------- */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ---------- 卡片通用 ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.manga-card {
    background: rgba(26, 26, 53, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 45, 85, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    padding-bottom: 12px;
    position: relative;
    animation: fadeInUp 0.5s ease both;
}

.manga-card:nth-child(1) { animation-delay: 0.05s; }
.manga-card:nth-child(2) { animation-delay: 0.1s; }
.manga-card:nth-child(3) { animation-delay: 0.15s; }
.manga-card:nth-child(4) { animation-delay: 0.2s; }
.manga-card:nth-child(5) { animation-delay: 0.25s; }
.manga-card:nth-child(6) { animation-delay: 0.3s; }
.manga-card:nth-child(7) { animation-delay: 0.35s; }
.manga-card:nth-child(8) { animation-delay: 0.4s; }
.manga-card:nth-child(9) { animation-delay: 0.45s; }
.manga-card:nth-child(10) { animation-delay: 0.5s; }
.manga-card:nth-child(11) { animation-delay: 0.55s; }
.manga-card:nth-child(12) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.manga-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
}

.manga-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 220/310;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1c1c3e, #2d2d55);
    transition: transform 0.4s ease, filter 0.3s ease;
}

.manga-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.manga-card h3 {
    color: #f0f0ff;
    font-size: 1.2rem;
    padding: 10px 12px 4px;
    font-weight: 600;
    transition: color 0.3s;
}

.manga-card:hover h3 {
    color: #c4b5fd;
}

.manga-card p {
    color: #b0b0d0;
    font-size: 0.9rem;
    padding: 0 12px;
    margin: 2px 0;
}

.tag {
    display: inline-block;
    background: rgba(45, 45, 85, 0.8);
    color: #c4b5fd;
    border-radius: 30px;
    padding: 2px 12px;
    font-size: 0.75rem;
    margin: 6px 6px 0 12px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    transition: background 0.3s, transform 0.2s;
}

.tag:hover {
    background: rgba(124, 58, 237, 0.3);
    transform: scale(1.05);
}

/* ---------- 区块标题 ---------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f0f0ff;
    margin-bottom: 20px;
    border-left: 6px solid #8b5cf6;
    padding-left: 18px;
    position: relative;
    text-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    animation: slideInRight 0.5s ease both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-sub {
    font-size: 1.4rem;
    color: #e0e0f0;
    margin-bottom: 15px;
    font-weight: 600;
}

/* ---------- 详细介绍区域 ---------- */
.detail-box, .platform-box {
    background: rgba(22, 22, 48, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(45, 45, 85, 0.6);
    position: relative;
    overflow: hidden;
}

.detail-box::before, .platform-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    opacity: 0.5;
}

.detail-box h3, .platform-box h3 {
    color: #f0f0ff;
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.detail-box p, .platform-box p {
    color: #e0e0f0;
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

.detail-box p strong {
    color: #c4b5fd;
    font-weight: 600;
}

/* ---------- 角色列表 ---------- */
.char-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.char-card {
    background: rgba(26, 26, 53, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 45, 85, 0.6);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.char-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
}

.char-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #8b5cf6;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.char-card:hover img {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.5);
}

.char-card h4 {
    color: #f0f0ff;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.char-card .identity {
    color: #a78bfa;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.char-card p {
    color: #d0d0e8;
    font-size: 0.85rem;
    margin-top: 8px;
    line-height: 1.5;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    background: rgba(20, 20, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(45, 45, 85, 0.6);
    border-radius: 24px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 90px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sidebar h3 {
    color: #f0f0ff;
    font-size: 1.4rem;
    border-bottom: 2px solid rgba(45, 45, 85, 0.6);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 700;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    color: #d0d0e8;
    padding: 10px 0;
    border-bottom: 1px solid rgba(28, 28, 62, 0.6);
    transition: transform 0.2s, color 0.2s, padding-left 0.2s;
    cursor: default;
}

.rank-item:hover {
    transform: translateX(4px);
    color: #c4b5fd;
    padding-left: 4px;
}

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

.stats {
    background: rgba(26, 26, 53, 0.8);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid rgba(45, 45, 85, 0.4);
}

.stats p {
    color: #e0e0f0;
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    transition: color 0.2s;
}

.stats p:hover {
    color: #c4b5fd;
}

.stats p span:last-child {
    color: #8b5cf6;
    font-weight: 600;
}

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

.btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.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;
}

.btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    text-decoration: none;
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

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

.btn:active {
    transform: scale(0.98);
}

/* ---------- 评论 ---------- */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background: rgba(26, 26, 53, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 45, 85, 0.6);
    border-radius: 16px;
    padding: 16px 20px;
    transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
    animation: fadeIn 0.5s ease both;
}

.comment-item:nth-child(1) { animation-delay: 0.05s; }
.comment-item:nth-child(2) { animation-delay: 0.1s; }
.comment-item:nth-child(3) { animation-delay: 0.15s; }
.comment-item:nth-child(4) { animation-delay: 0.2s; }
.comment-item:nth-child(5) { animation-delay: 0.25s; }
.comment-item:nth-child(6) { animation-delay: 0.3s; }
.comment-item:nth-child(7) { animation-delay: 0.35s; }
.comment-item:nth-child(8) { animation-delay: 0.4s; }
.comment-item:nth-child(9) { animation-delay: 0.45s; }
.comment-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item:hover {
    transform: translateX(4px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

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

.comment-item .content {
    color: #e0e0f0;
    margin-top: 8px;
    line-height: 1.6;
}

/* ---------- 底部 ---------- */
.site-footer {
    background: rgba(10, 10, 24, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px 24px 0 0;
    padding: 30px 30px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(45, 45, 85, 0.6);
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #a78bfa;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #8b5cf6;
    transition: width 0.3s;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-copy {
    color: #8888aa;
    font-size: 0.85rem;
    border-top: 1px solid rgba(28, 28, 62, 0.6);
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy a {
    color: #8888aa;
    transition: color 0.3s;
}

.footer-copy a:hover {
    color: #a78bfa;
}

/* ---------- 滚动动画 ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        position: relative;
        top: auto;
    }
    .nav-links {
        gap: 14px;
        width: 100%;
        justify-content: flex-start;
    }
    .sidebar {
        position: static;
        top: auto;
        margin-top: 20px;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .detail-box, .platform-box {
        padding: 20px;
    }
}

@media (max-width: 500px) {
    body {
        padding: 0 12px;
    }
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .manga-card h3 {
        font-size: 1rem;
        padding: 8px 8px 2px;
    }
    .manga-card p {
        font-size: 0.8rem;
        padding: 0 8px;
    }
    .site-header {
        padding: 15px 15px;
    }
    .logo h1 {
        font-size: 1.8rem;
    }
    .nav-links {
        gap: 10px;
    }
    .nav-links a {
        font-size: 0.9rem;
        padding: 6px 0;
    }
    .section-title {
        font-size: 1.4rem;
        padding-left: 12px;
        border-left-width: 4px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    .char-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .char-card img {
        width: 100px;
        height: 100px;
    }
    .detail-box, .platform-box {
        padding: 16px;
        border-radius: 16px;
    }
    .detail-box h3, .platform-box h3 {
        font-size: 1.3rem;
    }
    .footer-links {
        gap: 14px;
    }
    .footer-copy {
        flex-direction: column;
        gap: 6px;
    }
    .comment-item {
        padding: 12px 14px;
    }
    .comment-item .time {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
    .stats {
        padding: 12px;
    }
    .rank-item {
        font-size: 0.9rem;
    }
}

/* ---------- 暗色模式支持 ---------- */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(145deg, #070712 0%, #0f0f22 100%);
    }
    body.light-mode {
        background: linear-gradient(145deg, #f0f0f5 0%, #e0e0ea 100%);
    }
}

/* ---------- 无障碍与减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 焦点样式 ---------- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- 图片占位背景 ---------- */
.manga-card img, .char-card img {
    background: linear-gradient(135deg, #1a1a35 0%, #2d2d55 50%, #1a1a35 100%);
    background-size: 200% 200%;
    animation: imgSkeleton 1.5s ease infinite;
}

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

/* ---------- 渐变边框效果 ---------- */
.manga-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

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

/* ---------- 侧边栏装饰线 ---------- */
.sidebar h3:not(:first-of-type) {
    margin-top: 30px;
}

/* ---------- 统计数字动画 ---------- */
.stats p span:last-child {
    font-variant-numeric: tabular-nums;
}

/* ---------- 移动端触摸优化 ---------- */
@media (hover: none) {
    .manga-card:hover {
        transform: none;
    }
    .btn:hover {
        transform: none;
    }
    .char-card:hover {
        transform: none;
    }
}