/* =========================================
   1. 字体与全局设置
   ========================================= */
@font-face {
    font-family: 'LocalFont';
    src: url('fonts/myfont.ttf') format('truetype'); 
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-gradient: linear-gradient(135deg, #fff1eb 0%, #ace0f9 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.8);
    
    --text-primary: #4a4a4a;
    --text-secondary: #888888;
    
    --btn-bg: #ffffff;
    --btn-shadow: 0 4px 12px rgba(163, 177, 198, 0.2);
    --btn-hover-shadow: 0 12px 30px rgba(255, 117, 140, 0.3);
    
    --primary-accent: #ff758c; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 仅在支持鼠标的设备上隐藏默认光标，在CSS中我们用媒体查询处理 */
    cursor: default;
}

/* 电脑端隐藏鼠标，使用自定义光标 */
@media (pointer: fine) {
    * { cursor: none !important; }
}

body {
    font-family: 'LocalFont', "PingFang SC", "Microsoft YaHei", sans-serif;
    /* 关键：使用 min-height 确保内容多时也能撑开，且 flex 居中 */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    overflow-x: hidden; /* 防止横向滚动条 */
    color: var(--text-primary);
}

/* =========================================
   2. 自定义鼠标光标样式
   ========================================= */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(255, 117, 140, 0.5);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 117, 140, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 9998;
    pointer-events: none;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-outline.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 117, 140, 0.1);
    border-color: transparent;
}

.cursor-dot.hovered { opacity: 0; }

/* =========================================
   3. 布局容器 (1.2倍 适中尺寸)
   ========================================= */
.container {
    position: relative;
    width: 90%;
    /* 1.2倍宽度调整：从 400px -> 500px */
    max-width: 500px; 
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid var(--card-border);
    border-radius: 35px;
    padding: 50px 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.05);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 确保容器内文字居中 */
    text-align: center; 
}

/* =========================================
   4. 头部与底部
   ========================================= */
.nav-header {
    margin-bottom: 35px;
    width: 100%;
}

.nav-header h1 {
    /* 1.2倍字体调整 */
    font-size: 2.2rem; 
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.nav-header p {
    font-size: 1.1rem; 
    color: var(--text-secondary);
}

.footer-info {
    margin-top: 35px;
    font-size: 0.85rem;
    color: #aaa;
}

/* =========================================
   5. 导航按钮样式
   ========================================= */
.nav-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-item {
    position: relative;
    width: 100%;
    /* 1.2倍高度调整：从 60px -> 75px */
    height: 75px; 
    background: var(--btn-bg);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    
    /* 绝对居中布局 */
    display: flex;
    justify-content: center;
    align-items: center;
    
    box-shadow: var(--btn-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.6);
}

/* 图标 */
.nav-item .icon {
    font-size: 1.5rem; /* 适度放大 */
    margin-right: 12px;
    transition: transform 0.3s ease;
}

/* 文字 */
.nav-item .text {
    font-size: 1.25rem; /* 适度放大 */
    font-weight: 600;
    letter-spacing: 1px;
    transition: letter-spacing 0.3s ease, color 0.3s ease;
    z-index: 2;
}

/* 箭头 */
.nav-item .arrow {
    position: absolute;
    right: 25px;
    font-size: 1.4rem;
    color: var(--primary-accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 2;
}

/* =========================================
   6. 悬停交互
   ========================================= */
/* 仅在非触屏设备上启用Hover特效 */
@media (hover: hover) {
    .nav-item:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: var(--btn-hover-shadow);
        border-color: var(--primary-accent);
    }

    .nav-item:hover .text {
        letter-spacing: 2px;
        color: var(--primary-accent);
    }

    .nav-item:hover .icon {
        transform: scale(1.15) rotate(8deg);
    }

    .nav-item:hover .arrow {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0%;
        height: 100%;
        background: linear-gradient(90deg, rgba(255, 117, 140, 0.05) 0%, rgba(255, 117, 140, 0.2) 100%);
        transition: width 0.4s ease;
        z-index: 1;
    }
    
    .nav-item:hover::before { width: 100%; }
}

/* =========================================
   7. 背景装饰
   ========================================= */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.6;
    animation: floatShape 10s infinite alternate;
}

.shape-1 { width: 450px; height: 450px; background: #ff9a9e; top: -120px; left: -120px; }
.shape-2 { width: 350px; height: 350px; background: #a18cd1; bottom: -80px; right: -80px; animation-delay: -5s; }
.shape-3 { width: 220px; height: 220px; background: #fbc2eb; top: 40%; left: 70%; animation-delay: -2s; }

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

@keyframes floatShape {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 40px) rotate(10deg); }
}

/* =========================================
   8. 移动端移动端深度优化 (Mobile Optimization)
   ========================================= */
@media (max-width: 600px) {
    body {
        /* 确保背景也能适应长屏幕 */
        background-attachment: fixed;
        /* 恢复默认光标 */
        cursor: auto; 
    }

    .container {
        width: 90%; /* 占比 90%，留出左右边距 */
        max-width: none; /* 移除最大宽度限制，自适应 */
        padding: 40px 25px; /* 减小内边距 */
        /* 在小屏幕上稍微减弱毛玻璃，防止卡顿 */
        backdrop-filter: blur(15px); 
        -webkit-backdrop-filter: blur(15px);
        margin: 20px 0; /* 上下留白，防止贴顶 */
    }

    .nav-header h1 {
        font-size: 1.8rem; /* 标题适当缩小 */
    }

    .nav-item {
        height: 65px; /* 高度适当缩小，适合手指 */
    }

    .nav-item .text {
        font-size: 1.1rem; /* 字体适应手机 */
    }
    
    .nav-item .icon {
        font-size: 1.3rem;
    }

    /* 手机端点击时的反馈效果 (Active State) */
    .nav-item:active {
        transform: scale(0.98);
        background-color: #f0f0f0;
    }
    
    /* 隐藏装饰背景球过大遮挡视线 */
    .bg-shape { opacity: 0.4; }
}
/* =========================================
   加载页通用样式 (被 loading.html 调用)
   ========================================= */
#loader {
    /* 这里的样式主要用于 loading.html 内部布局 */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.loader-content {
    text-align: center;
    width: 300px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(255, 117, 140, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.loader-circle {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(255, 166, 158, 0.3);
    position: relative;
}

.loader-circle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ff758c;
    border-right-color: #ff758c;
    animation: spin 1.5s linear infinite;
}

.loader-icon {
    font-size: 2.5rem;
    animation: breathe 2s ease-in-out infinite;
}

.loader-title {
    font-size: 1.8rem;
    color: #4a4a4a;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff9a9e 0%, #ff758c 100%);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.loader-tip {
    font-size: 0.9rem;
    color: #888888;
    letter-spacing: 1px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.9); opacity: 0.8; } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
/* =========================================
   新增：顶部滚动公告栏样式
   ========================================= */
.top-notice-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px; /* 与下方容器宽度协调 */
    height: 44px;
    
    /* 风格统一：毛玻璃 + 边框 */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50px; /* 胶囊形状 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 900; /* 保证在背景之上，但在加载页之下 */
    overflow: hidden; /* 隐藏超出部分 */
}

/* 左侧喇叭图标 */
.notice-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    animation: shake 3s infinite; /* 增加一点动态吸引眼球 */
}

/* 滚动区域容器 */
.scrolling-wrapper {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); /* 两侧渐变消失效果 */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* 滚动的文字 */
.scrolling-text {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-accent); /* 使用主题粉色，显眼且协调 */
    padding-left: 100%; /* 初始位置在最右侧外部 */
    animation: scroll-left 15s linear infinite; /* 15秒滚动一圈 */
}

/* 动画定义 */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%); /* 向左完全滚出 */
    }
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-15deg); }
    20% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    40% { transform: rotate(0deg); }
}

/* 移动端适配：调整位置防止遮挡 */
@media (max-width: 600px) {
    .top-notice-bar {
        top: 15px;
        width: 92%;
        height: 40px;
    }
    /* 既然顶部加了条子，主容器稍微往下挪一点点，或者保持居中即可 */
    .container {
        margin-top: 60px; /* 给公告栏留出空间 */
    }
}