/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击的高亮背景 */
    outline: none !important; /* 移除点击时可能出现的虚线外边框 */
    
    /* 禁用文本选择和拖拽（防复制） */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

/* 在线人数样式 */
.online-users {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    animation: fadeInDown 0.5s ease;
}

.online-users i {
    color: #4a90e2;
}

.online-users strong {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
}

/* 右上角时间样式 */
.top-right-time {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    animation: fadeInDown 0.5s ease;
}

.top-right-time i {
    color: #4a90e2;
    font-size: 1.2rem;
}

.time-text {
    letter-spacing: 1px;
}

body {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #c3cfe2;
    color: #333;
    overflow: hidden; /* 恢复为默认不滚动，将滚动控制权交给媒体查询 */
    z-index: 1;
}

/* 模糊背景层 */
body::before {
    content: '';
    position: fixed;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background: url('../images/1.jpg') center/cover no-repeat;
    filter: blur(8px);
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 900px;
    padding: 2.5rem;
    text-align: center;
}

/* 头部样式 */
header {
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.5s ease;
}

/* 头像框架样式 */
.avatar-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
    cursor: pointer;
    background-color: transparent; /* 去除默认背景色 */
}

.avatar:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.site-title {
    font-size: 1.2rem;
    color: #fff;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    background: linear-gradient(135deg, #4facfe, #8e54e9);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.28);
}

header h1 {
    font-size: 3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 导航链接卡片样式 */
.nav-section {
    animation: fadeInUp 0.6s ease;
}

/* 分类切换按钮样式 */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* 标签内容区域样式 */
.tab-content {
    display: none; /* 默认隐藏所有分类 */
}

.tab-content.active {
    display: flex; /* 激活的分类显示为 flex */
    flex-wrap: wrap; /* 允许换行 */
    justify-content: center; /* 核心：整体居中 */
    gap: 2rem 2.5rem; /* 间距 */
    padding: 1rem 0;
    animation: none;
}
.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 0.5rem;
    height: auto; /* 将固定高度改为 auto，让内容自动撑开 */
    min-height: 120px; /* 设置最小高度保持原有比例 */
    width: 140px; /* 固定宽度，确保 flex 布局下统一大小 */
    border-radius: 16px;
    text-decoration: none;
    color: #444;
    transition: all 0.15s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: visible; /* 允许内容完整显示 */
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
    background: #fff;
    color: #4a90e2;
}

.nav-card i {
    font-size: 2.2rem;
    margin-bottom: 1rem; /* 增加图标和文字之间的间距 */
    transition: color 0.3s ease;
    display: block; /* 确保图标占据独立空间 */
}

.nav-card span {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    /* 取消强制单行显示，允许文字换行 */
    white-space: normal; 
    overflow: visible;
    text-overflow: clip; /* 确保不再有省略号截断 */
    word-break: break-word; /* 如果单词太长则强制换行 */
    padding: 0 5px; /* 给两边留点空隙，避免紧贴边缘 */
    line-height: 1.3; /* 增加行高让多行文字看起来更舒服 */
    display: block; /* 改为 block 确保容器高度能被撑开 */
}

/* 特定图标悬停颜色 */
.nav-card:hover .fa-telegram { color: #2CA5E0; }
.nav-card:hover .fa-headset { color: #f39c12; }
.nav-card:hover .fa-shopping-cart { color: #e74c3c; }
.nav-card:hover .fa-store { color: #9b59b6; }
.nav-card:hover .fa-cloud-download-alt { color: #3498db; }
.nav-card:hover .fa-desktop { color: #2ecc71; }
.nav-card:hover .fa-qq { color: #12B7F5; } /* QQ蓝 */

/* 底部音乐播放器包装层 */
.music-player-wrapper {
    display: none !important; /* 隐藏音乐播放器 */
    position: fixed;
    bottom: -80px; /* 默认隐藏播放器主体，但露出顶部的展开按钮（大约需要负整个主体的高度） */
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    z-index: 100;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* JS 控制弹出的类 (全端通用) */
.music-player-wrapper.show-player {
    bottom: 20px; /* 点击按钮后向上弹出 */
}

/* 音乐播放器主体卡片 */
.music-player {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    width: 100%;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

/* 封面旋转效果 */
.album-cover {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: rotate 10s linear infinite;
    animation-play-state: paused; /* 默认暂停旋转 */
}

.album-cover.playing {
    animation-play-state: running; /* 播放时旋转 */
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 音乐文字信息 */
.music-info {
    flex-grow: 1;
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    overflow: hidden;
    padding: 0 10px;
}

.song-title {
    font-size: 1.05rem; /* 稍微放大一点点字体 */
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: center; /* 文本居中 */
}

/* 控制按钮 */
.controls {
    display: flex;
    align-items: center;
    gap: 8px; /* 增加按钮之间的间距 */
}

.control-btn {
    background: #4a90e2;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.control-btn.small-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    background: rgba(74, 144, 226, 0.8); /* 辅助按钮稍微透明一点 */
    box-shadow: none;
}

.control-btn:hover {
    background: #357abd;
    transform: scale(1.05);
}

/* 展开/收起按钮 (全端通用) */
.mobile-toggle-btn {
    background: rgba(0, 0, 0, 0.8); /* 黑色半透明背景 */
    border: none;
    width: 40px;
    height: 25px;
    border-radius: 20px 20px 0 0;
    margin-bottom: -5px; /* 与主体连接 */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff; /* 黑色背景下需要白色图标 */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 101;
    transition: background 0.3s ease;
}

.mobile-toggle-btn:hover {
    background: rgba(0, 0, 0, 1); /* 悬停时变纯黑 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 移除这里的 overflow-y: auto，让手机端也完全固定铺满不可滑动 */
    header h1 { font-size: 2.2rem; }
    .search-box { padding: 0.3rem 0.5rem; }
    
    /* 在移动端缩小卡片之间的间距和卡片本身大小，避免拥挤 */
    .tab-content.active {
        gap: 1rem 1rem; /* 缩小卡片间距 */
    }
    
    .nav-card { 
        padding: 1rem 0.3rem; 
        width: 110px; /* 在小屏下稍微缩小卡片宽度 */
        min-height: 100px;
    }
    .nav-card i { 
        font-size: 1.8rem; 
        margin-bottom: 0.5rem; /* 缩小图标和文字的间距 */
    }
    .nav-card span {
        font-size: 0.85rem; /* 缩小移动端文字大小 */
        white-space: normal; /* 取消强制不换行（使文字超出隐藏失效） */
        overflow: visible;
        word-break: break-word; /* 允许换行，适配不同设备长度 */
        line-height: 1.2;
    }
    
    /* 调整移动端的整体高度布局，避免被音乐播放器挡住，同时保持固定 */
    .container {
        padding-bottom: 0; /* 既然不滚动了，就不需要为了滑动留底部内边距了 */
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 95%; /* 让容器在小屏幕上利用更多横向空间 */
        padding: 1.5rem 1rem;
    }
}

/* 针对高度过小的横屏设备/小屏手机，如果你希望绝对不可滑动，我们将这里的 overflow-y: auto 也删除或注释掉 */
@media (max-height: 800px) {
    /* body { overflow-y: auto; } - 已被注释，全端强制固定 */
}

/* 动画定义 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* 页面整体上移约 1 厘米 */
.container {
    transform: translateY(-1cm);
}

/* ================= 彩色渐变导航 ================= */
/* 官网：蓝色 */
.tab-btn[data-target="tools"] {
    background: linear-gradient(135deg, #4facfe, #00c6ff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.25);
}

.tab-btn[data-target="tools"]:hover,
.tab-btn[data-target="tools"].active {
    background: linear-gradient(135deg, #2196f3, #00bcd4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(33, 150, 243, 0.35);
}

#tools .nav-card {
    background: linear-gradient(135deg, #4facfe, #00c6ff);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 160, 255, 0.18);
}

#tools .nav-card:hover {
    background: linear-gradient(135deg, #2196f3, #00bcd4);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 160, 255, 0.30);
}

#tools .nav-card i {
    color: #fff;
}

/* 商店：紫色 */
.tab-btn[data-target="media"] {
    background: linear-gradient(135deg, #8e54e9, #4776e6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(142, 84, 233, 0.25);
}

.tab-btn[data-target="media"]:hover,
.tab-btn[data-target="media"].active {
    background: linear-gradient(135deg, #7b2ff7, #4c6fff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(123, 47, 247, 0.35);
}

#media .nav-card {
    background: linear-gradient(135deg, #8e54e9, #4776e6);
    color: #fff;
    box-shadow: 0 6px 20px rgba(112, 76, 220, 0.18);
}

#media .nav-card:hover {
    background: linear-gradient(135deg, #7b2ff7, #4c6fff);
    color: #fff;
    box-shadow: 0 12px 28px rgba(112, 76, 220, 0.30);
}

#media .nav-card i {
    color: #fff;
}

/* 售后：粉色 */
.tab-btn[data-target="dev"] {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.25);
}

.tab-btn[data-target="dev"]:hover,
.tab-btn[data-target="dev"].active {
    background: linear-gradient(135deg, #f5576c, #ff7eb3);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(245, 87, 108, 0.35);
}

#dev .nav-card {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.18);
}

#dev .nav-card:hover {
    background: linear-gradient(135deg, #f5576c, #ff7eb3);
    color: #fff;
    box-shadow: 0 12px 28px rgba(245, 87, 108, 0.30);
}

#dev .nav-card i {
    color: #fff;
}

/* 售后卡片里的提示文字也改成浅色 */
#dev .nav-card small {
    color: rgba(255, 255, 255, 0.82) !important;
}
