* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* 新增：全局加载遮罩 */
.global-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-size: 16px;
    color: #666;
}
.global-loading .loading-spinner::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #165DFF;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 修改原有.auth-mask：默认隐藏，不再默认flex */
.auth-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* 核心修改！默认不显示 */
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.auth-box {
    background-color: white;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.auth-box h2 {
    color: #333;
    margin-bottom: 15px;
}

.auth-tip {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.auth-tip span {
    color: #165DFF;
    font-weight: bold;
}

.auth-notice {
    color: #ff4d4f;
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-box input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
}

.auth-box input:focus {
    border-color: #165DFF;
}

.auth-box button {
    width: 100%;
    height: 44px;
    background-color: #165DFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-box button:hover {
    background-color: #0E4CD1;
}

.error-msg {
    color: #ff4d4f;
    font-size: 13px;
    margin-top: 10px;
    min-height: 18px;
}

/* 资源页面 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.notice {
    background-color: #fff2e8;
    color: #fa541c;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    outline: none;
}

.search-box input:focus {
    border-color: #165DFF;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-btn {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn.active {
    background-color: #165DFF;
    color: white;
    border-color: #165DFF;
}

.resource-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.resource-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.resource-category {
    display: inline-block;
    background-color: #e8f3ff;
    color: #165DFF;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.resource-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.resource-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.pwd-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwd-label {
    font-size: 13px;
    color: #999;
}

.pwd-value {
    font-size: 13px;
    color: #ff4d4f;
    font-weight: bold;
}

.copy-pwd {
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.copy-pwd:hover {
    background-color: #e8e8e8;
}

.resource-btns {
    display: flex;
    gap: 10px;
}

.open-link {
    background-color: #165DFF;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.open-link:hover {
    background-color: #0E4CD1;
}

.feedback-btn {
    background-color: #fff2e8;
    color: #fa541c;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.feedback-btn:hover {
    background-color: #ffd8bf;
}

.update-time {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    text-align: right;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .resource-list {
        grid-template-columns: 1fr;
    }
    .resource-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .resource-btns {
        width: 100%;
        justify-content: space-between;
    }
    .open-link, .feedback-btn {
        flex: 1;
        text-align: center;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1677ff;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.back-to-top:hover {
    background-color: #0958d9;
    transform: translateY(-2px);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
/* 加载状态样式 */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}
/* 微信号弹窗样式 */
.wechat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1002;
}
.wechat-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  padding: 24px;
  text-align: center;
}
.wechat-modal-content h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 18px;
}
.wechat-modal-content p {
  color: #666;
  font-size: 14px;
  margin: 8px 0;
}
.wechat-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  background: #f5f7fa;
  border-radius: 8px;
}
.wechat-num {
  font-size: 22px;
  color: #165DFF;
  font-weight: 600;
  letter-spacing: 1px;
}
.copy-wechat-btn {
  padding: 10px 18px;
  background: #165DFF;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}
.copy-wechat-btn:hover {
  background: #0E4CD1;
}
.copy-tip {
  font-size: 13px;
  color: #999;
  margin: 12px 0 20px 0;
  min-height: 20px;
}
.wechat-close-btn {
  width: 100%;
  padding: 12px;
  background: #f5f5f5;
  color: #666;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}
.wechat-close-btn:hover {
  background: #eee;
}