/* 全局样式重置：清除默认边距和内边距，统一盒模型 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 页面主体样式：设置背景渐变和基本布局 */
body {
    background: linear-gradient(135deg, #d282ff 0%, #009d77 70%, #7b36ff 100%);
    color: #333;
    min-height: 100vh; /* 确保页面至少占满整个视口高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    padding-top: 80px; /* 为顶部导航栏留出空间 */
}

/* 顶部导航栏样式 */
.navbar {
    position: fixed; /* 固定在页面顶部 */
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.2); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    padding: 12px 20px;
    display: flex;
    gap: 25px; /* 图标之间的间距 */
    z-index: 1000; /* 确保导航栏在其他内容上方 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 轻微阴影效果 */
}

/* 社交平台图标样式 */
.social-icon {
    position: relative; /* 为弹出的ID弹窗提供定位参考 */
    color: white;
    font-size: 1.5rem;
    cursor: pointer; /* 鼠标悬停时显示手型光标 */
    transition: transform 0.3s; /* 平滑变换效果 */
}

/* 图标悬停效果 */
.social-icon:hover {
    transform: scale(1.1); /* 轻微放大效果 */
}

/* 平台ID弹窗样式 */
.id-popup {
    position: absolute; /* 相对于社交图标定位 */
    top: 100%; /* 位于图标正下方 */
    left: 0;
    background-color: white;
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    white-space: nowrap; /* 防止文本换行 */
    margin-top: 8px;
    opacity: 0; /* 默认隐藏 */
    visibility: hidden; /* 默认不可见 */
    transition: opacity 0.3s, visibility 0.3s; /* 平滑显示/隐藏效果 */
    z-index: 1001; /* 确保弹窗在导航栏上方 */
}

/* 弹窗小箭头样式 */
.id-popup::after {
    content: '';
    position: absolute;
    bottom: 100%; /* 位于弹窗顶部 */
    left: 20px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent white transparent; /* 形成三角形箭头 */
}

/* 显示ID弹窗的样式 */
.id-popup.show {
    opacity: 1;
    visibility: visible;
}

/* 提示弹窗样式 */
.notification-popup {
    position: fixed; /* 固定在屏幕上 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 居中显示 */
    background-color: white;
    width: 90%;
    max-width: 500px; /* 最大宽度限制 */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    z-index: 1002; /* 确保弹窗在其他元素上方 */
    overflow: hidden; /* 隐藏超出边界的内容 */
    display: none; /* 默认隐藏 */
}

/* 弹窗显示时的样式 */
.notification-popup.show {
    display: block;
    animation: popup 0.3s ease-out; /* 显示动画 */
}

/* 弹窗显示动画 */
@keyframes popup {
    from {
        transform: translate(-50%, -50%) scale(0.8); /* 从较小尺寸开始 */
        opacity: 0; /* 初始透明 */
    }
    to {
        transform: translate(-50%, -50%) scale(1); /* 恢复正常尺寸 */
        opacity: 1; /* 完全不透明 */
    }
}

/* 弹窗头部样式 */
.popup-header {
    background-color: #7b36ff;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between; /* 标题和关闭按钮两端对齐 */
    align-items: center;
}

/* 弹窗标题样式 */
.popup-header h3 {
    margin: 0;
}

/* 弹窗关闭按钮样式 */
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s; /* 变换效果 */
}

/* 关闭按钮悬停效果 */
.close-btn:hover {
    transform: scale(1.2); /* 轻微放大 */
}

/* 弹窗内容区域样式 */
.popup-content {
    padding: 20px;
    line-height: 1.6; /* 行高，提高可读性 */
}

/* 弹窗底部样式 */
.popup-footer {
    padding: 15px 20px;
    background-color: #f5f5f5;
    text-align: right; /* 按钮右对齐 */
}

/* 确认按钮样式 */
.confirm-btn {
    background-color: #7b36ff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s; /* 背景色过渡效果 */
}

/* 确认按钮悬停效果 */
.confirm-btn:hover {
    background-color: #3a00b0; /* 深色版本 */
}

/* 悬浮图标样式 */
.floating-icon {
    position: fixed; /* 固定在屏幕上 */
    bottom: 30px; /* 距离底部30px */
    right: 30px; /* 距离右侧30px */
    width: 60px;
    height: 60px;
    background-color: #7b36ff;
    color: white;
    border-radius: 50%; /* 圆形 */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s; /* 过渡效果 */
    z-index: 1001; /* 确保在遮罩层上方，但在弹窗下方 */
    display: none; /* 默认隐藏 */
}

/* 显示悬浮图标 */
.floating-icon.show {
    display: flex;
}

/* 悬浮图标悬停效果 */
.floating-icon:hover {
    transform: scale(1.1); /* 轻微放大 */
    background-color: #3a00b0; /* 深色版本 */
}

/* 遮罩层样式：弹窗显示时覆盖页面 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色 */
    z-index: 1000; /* 确保在内容上方，但在弹窗下方 */
    display: none; /* 默认隐藏 */
}

/* 显示遮罩层 */
.overlay.show {
    display: block;
}

/* 容器样式：限制内容最大宽度 */
.container {
    max-width: 1200px;
    width: 100%;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    font-size: 2.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* 文字阴影 */
}

/* 描述文本样式 */
.description {
    text-align: center;
    color: rgba(255, 255, 255, 0.9); /* 半透明白色 */
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 50px; /* 居中显示并添加底部外边距 */
    line-height: 1.6; /* 行高，提高可读性 */
}

/* 卡片容器样式：使用弹性布局排列卡片 */
.cards-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 允许卡片换行 */
    gap: 30px; /* 卡片之间的间距 */
    margin-bottom: 50px;
}

/* 卡片基础样式 */
.benefit-card {
    background: white;
    width: 320px;
    border-radius: 16px;
    overflow: hidden; /* 隐藏超出边界的内容 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 阴影效果 */
    transition: transform 0.3s, box-shadow 0.3s; /* 过渡效果 */
    display: flex;
    flex-direction: column; /* 垂直排列内容 */
    position: relative; /* 为角标提供定位参考 */
}

/* 卡片角标样式 - 通用基础样式 */
.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px; /* 圆角 */
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    z-index: 10; /* 确保角标在卡片内容上方 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 阴影效果 */
}

/* 不同类型角标的颜色定义 */
.badge-new {
    background-color: #4CAF50; /* 绿色：最新 */
}

.badge-hot {
    background-color: #FF5252; /* 红色：热门 */
}

.badge-updated {
    background-color: #2196F3; /* 蓝色：已更新 */
}

.badge-coming {
    background-color: #9E9E9E; /* 灰色：制作中 */
}

/* 卡片悬停效果 */
.benefit-card:hover {
    transform: translateY(-10px); /* 向上移动 */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); /* 增强阴影 */
}

/* 卡片头部样式 */
.card-header {
    background: #7b36ff;
    color: white;
    padding: 25px;
    text-align: center;
}

/* 卡片头部图标样式 */
.card-header i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* 卡片头部标题样式 */
.card-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 卡片内容区域样式 */
.card-content {
    padding: 25px;
    flex-grow: 1; /* 占满剩余空间 */
    display: flex;
    flex-direction: column; /* 垂直排列内容 */
}

/* 卡片内容文本样式 */
.card-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6; /* 行高，提高可读性 */
    flex-grow: 1; /* 占满剩余空间，将按钮推到底部 */
}

/* 卡片链接样式 */
.card-link {
    display: block;
    background: #7b36ff;
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none; /* 去除下划线 */
    font-weight: 600;
    transition: background 0.3s; /* 背景色过渡效果 */
    margin-top: auto; /* 确保链接在卡片底部 */
}

/* 卡片链接 hover 效果 */
.card-link:hover {
    background: #3a00b0; /* 深色版本 */
}

/* 链接内图标样式 */
.card-link i {
    margin-left: 8px;
    font-size: 0.9em;
}

/* 底部链接区域样式 */
.bottom-footer {
    width: 100%;
    padding: 25px 0;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* 底部社交图标样式（最上方） */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.footer-social a {
    color: white;
    transition: transform 0.3s, color 0.3s;
}

.footer-social a:hover {
    color: #e0c9ff;
    transform: scale(1.1);
}

/* 底部链接样式（中间） */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e0c9ff;
    text-decoration: underline;
}

/* 版权信息样式（最下方） */
.copyright-info {
    color: white;
    margin-top: 5px;
    opacity: 0.8; /* 稍微透明 */
    font-size: 0.9rem;
}

/* 响应式设计 - 适配小屏幕设备（宽度小于768px） */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem; /* 减小标题字体 */
    }
    
    .description {
        font-size: 1rem; /* 减小描述文本字体 */
    }
    
    .cards-container {
        gap: 20px; /* 减小卡片间距 */
    }
    
    .benefit-card {
        width: 100%; /* 卡片宽度占满屏幕 */
        max-width: 350px; /* 最大宽度限制 */
    }

    .navbar {
        gap: 15px; /* 减小图标间距 */
        padding: 10px 15px; /* 减小内边距 */
    }

    .social-icon {
        font-size: 1.2rem; /* 减小图标大小 */
    }

    .footer-links {
        gap: 15px;
        padding: 0 10px;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .footer-social {
        font-size: 1.2rem;
        gap: 15px;
    }
    
    .copyright-info {
        font-size: 0.85rem;
        text-align: center;
        padding: 0 10px;
    }
}

/* 提示框样式：用于突出重要信息 */
.tip-box {
    background: #f0e6ff;
    border-left: 4px solid #7b36ff; /* 左侧彩色边框 */
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0; /* 右侧和底部圆角 */
}

.tip-box p {
    margin-bottom: 0;
    color: #3a00b0;
    font-weight: 500;
}
