@charset "UTF-8";

/* 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面主体样式 */
body {
    color: #ffffff;
    background-color: #0a1628;
    min-height: 100vh;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 70px !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 首页特殊背景 - 神农架卡通版 */
body.home-page {
    background: linear-gradient(135deg, #1a3a2f 0%, #0d2818 50%, #0a1628 100%);
    background-size: cover;
    background-attachment: fixed;
}

/* 首页背景图片层 */
.home-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -20;
    background-image: url('images/shennongjia_cartoon.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.35;
    filter: blur(2px);
}

/* 主内容区域 */
.main-content {
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* 内容卡片包装 */
.content-card-wrapper {
    position: relative;
    z-index: 10;
}

/* 标题卡片 */
.title-card {
    background: rgba(10, 22, 40, 0.85);
    border-radius: 20px;
    margin: 20px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 0 60px rgba(84, 212, 255, 0.1);
    border: 1px solid rgba(84, 212, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(20, 60, 80, 0.9) 0%, rgba(10, 30, 50, 0.95) 100%);
    border-radius: 20px 20px 0 0;
    border-bottom: 2px solid rgba(84, 212, 255, 0.3);
}

.nav-card, .logo {
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(90deg, #54d4ff, #7ec8e3, #a8e6cf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(84, 212, 255, 0.5);
}

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

.nav-links a {
    color: #7ec8e3 !important;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: #54d4ff !important;
    background: rgba(84, 212, 255, 0.15);
    text-shadow: 0 0 10px rgba(84, 212, 255, 0.5);
}

/* 头部横幅 */
.hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 48px;
    background: linear-gradient(90deg, #ff6b9d, #ffa07a, #ffd700, #7ec8e3);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 4s ease infinite;
    text-shadow: 0 0 40px rgba(255, 107, 157, 0.3);
}

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

.hero-content p {
    font-size: 16px;
    color: #a8d8ea;
    margin-top: 15px;
    letter-spacing: 2px;
}

/* 滚动提示 */
.scroll-down {
    position: absolute;
    bottom: 30px;
    animation: bounce 2s infinite;
}

.scroll-down span {
    font-size: 30px;
    color: #54d4ff;
    text-shadow: 0 0 20px rgba(84, 212, 255, 0.8);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* 主内容区 */
main {
    padding: 20px 30px;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    color: #54d4ff;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(84, 212, 255, 0.5);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #54d4ff, transparent);
    margin: 10px auto 0;
}

/* 卡片容器 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px;
}

/* 传送门卡片 */
.portal-card {
    background: linear-gradient(145deg, rgba(30, 60, 80, 0.8) 0%, rgba(20, 40, 60, 0.9) 100%);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(84, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(84, 212, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portal-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(84, 212, 255, 0.2),
                0 0 60px rgba(84, 212, 255, 0.1);
    border-color: rgba(84, 212, 255, 0.5);
}

.portal-content h3 {
    font-size: 22px;
    color: #54d4ff;
    margin-bottom: 10px;
}

.portal-content p {
    color: #a8d8ea;
    font-size: 14px;
}

/* 角色卡片网格 */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 10px;
}

/* 角色卡片 */
.character-card {
    background: linear-gradient(145deg, rgba(25, 50, 70, 0.9) 0%, rgba(15, 35, 55, 0.95) 100%);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid rgba(84, 212, 255, 0.2);
    position: relative;
}

.character-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(84, 212, 255, 0.25);
    border-color: rgba(84, 212, 255, 0.5);
}

.character-img-box {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.character-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.character-card:hover .character-img-box img {
    transform: scale(1.1);
}

.character-info {
    padding: 20px;
}

.character-info h3 {
    font-size: 20px;
    color: #54d4ff;
    margin-bottom: 8px;
}

.year-badge {
    display: inline-block;
    background: linear-gradient(90deg, #ff6b9d, #ffa07a);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
}

.character-info p {
    color: #b8d4e3;
    font-size: 14px;
    line-height: 1.6;
}

/* 回忆卡片 */
.memory-card {
    background: linear-gradient(145deg, rgba(30, 55, 75, 0.9) 0%, rgba(20, 45, 65, 0.95) 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(84, 212, 255, 0.2);
    transition: all 0.4s ease;
}

.memory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(84, 212, 255, 0.2);
}

.card-image-box {
    height: 200px;
    overflow: hidden;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.memory-card:hover .card-image-box img {
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    color: #54d4ff;
    margin-bottom: 10px;
    font-size: 20px;
}

.card-content p {
    color: #b8d4e3;
    font-size: 14px;
    line-height: 1.6;
}

/* 底部备案栏样式 */
#footer-info, footer, #record-info {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #000000 !important;
    font-weight: bold !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 8px 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

/* 海外经典页面 - 手机端图片超小适配（<=768px） */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .card-container,
    .character-grid {
        grid-template-columns: 1fr;
    }
    
    .foreign-img-wrapper {
        max-width: 85% !important;
        margin: 20px auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        border: 2px solid rgba(84, 212, 255, 0.4) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
    }
    
    .foreign-img-wrapper img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .foreign-img-desc {
        text-align: center !important;
        color: #eee !important;
        font-size: 14px !important;
        padding: 10px 0 !important;
        margin: 0 10px !important;
    }
}

/* PC端（>1024px）优化 */
@media (min-width: 1024px) {
    .content-wrapper {
        max-width: 1200px !important;
        padding: 20px !important;
    }
    
    #live2d-widget {
        width: 550px !important;
        height: 720px !important;
    }
}

/* 高分辨率屏幕适配 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    img {
        image-rendering: -webkit-optimize-contrast !important;
    }
    #live2d-widget {
        transform: translateZ(0);
    }
}

/* 低分辨率安卓机适配 */
@media (-webkit-min-device-pixel-ratio: 1), (min-resolution: 1dppx) {
    body {
        font-size: 13px !important;
    }
}

/* 落叶动画层 */
#leafCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* 星空背景层 */
#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -5;
}

/* 特效层 */
#effectCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}
