* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

.marquee-bar {
  background: #1e40af;
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 25s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.8);
}
.logo { font-size: 1.3rem; font-weight: bold; color: #38bdf8; }

.main-center {
  max-width: 900px;
  margin: 60px auto 40px;
  text-align: center;
  padding: 0 16px;
}
.main-center h1 { font-size: 1.8rem; margin-bottom: 12px; }
.tip { color: #94a3b8; margin-bottom: 24px; }

.parse-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.parse-box input {
  flex: 1;
  min-width: 260px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: #1e293b;
  color: #fff;
  outline: none;
}
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #334155;
  color: #e2e8f0;
  font-size: 0.95rem;
}
.btn:hover { background: #475569; }
.btn-primary { background: #0ea5e9; color: #fff; }
.btn-primary:hover { background: #0284c7; }

.status {
  margin-top: 12px;
  min-height: 24px;
  color: #fbbf24;
}

.faq-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 16px;
}
.faq-section h2 { margin-bottom: 16px; text-align: center; }
.faq-item {
  background: rgba(30, 41, 59, 0.7);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq-item .q { font-weight: bold; color: #38bdf8; margin-bottom: 6px; }

.footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: #64748b;
  font-size: 0.9rem;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
  background: #1e293b;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-content.wide { max-width: 720px; }
.modal-content h3 { margin-bottom: 16px; }
.modal-content input, .modal-content select {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #fff;
}
.modal-content .btn { margin: 4px 4px 4px 0; }

.sites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.site-card {
  background: #0f172a;
  padding: 12px;
  border-radius: 8px;
  text-align: left;
}
.site-card a { color: #38bdf8; text-decoration: none; }
.site-card p { font-size: 0.85rem; color: #94a3b8; margin-top: 4px; }

#qrCarousel img {
  max-width: 220px;
  border-radius: 8px;
  margin: 10px 0;
}

/* 鼠标跟随文字 */
.follow-text {
  position: fixed;
  pointer-events: none;
  color: rgba(56, 189, 248, 0.7);
  font-size: 13px;
  z-index: 50;
  transition: opacity 0.6s;
  white-space: nowrap;
}

/* ========== 本次新增样式 ========== */

/* 弹窗内容定位上下文（把原 .modal-content 规则补充 position: relative） */
.modal-content {
  position: relative;
}

/* 需求3：右上角橘红色关闭按钮 */
.btn-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #ff5722;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 10;
}
.btn-close:hover { background: #e64a19; }

/* 需求4：橘红色退出登录按钮 */
.btn-danger { background: #ff5722; color: #fff; }
.btn-danger:hover { background: #e64a19; }

/* 需求4：用户中心弹窗高度与间距微调（底部按钮移除后整体更紧凑） */
#userModal .modal-content { max-height: 82vh; }
#userModal h4 { margin: 16px 0 10px; }
#userModal hr { border-color: #334155; margin: 14px 0; }

/* 需求5：生成充值备注旁的提示文字 */
.warn-tip { color: #fbbf24; font-size: 0.85rem; margin-top: 8px; }

/* 需求6：充值备注 4 位数字醒目黄色 */
.remark-code {
  color: #facc15;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 4px;
}

/* 需求7：公告标题可点击样式 */
.ann-item { cursor: pointer; color: #ffd166; }
.ann-item:hover { color: #fff; text-decoration: underline; }

/* 需求7（建议）：鼠标悬停跑马灯时暂停滚动，方便点击 */
.marquee-bar:hover .marquee-content { animation-play-state: paused; }
/* ========== 需求1：三种时间段主题（只改观感，不改布局/功能） ========== */

/* —— 青少年风格（05:00-10:00）：活力粉色 —— */
body.theme-teen {
  background: linear-gradient(135deg, #ffeef5 0%, #ffd6e7 50%, #fff5fa 100%);
  color: #8a2b52;
  font-size: 17px;
}
body.theme-teen .marquee-bar { background: #f06595; }
body.theme-teen .top-bar { background: rgba(255, 240, 246, 0.9); }
body.theme-teen .logo { color: #d6336c; }
body.theme-teen .tip { color: #b05a7d; }
body.theme-teen .parse-box input { background: #fff; color: #8a2b52; border: 2px solid #ffc2d6; }
body.theme-teen .btn { background: #ffd6e7; color: #c2255c; }
body.theme-teen .btn:hover { background: #fcc2d7; }
body.theme-teen .btn-primary { background: #f06595; color: #fff; }
body.theme-teen .btn-primary:hover { background: #d6336c; }
body.theme-teen .status { color: #e8590c; }
body.theme-teen .faq-section h2 { color: #d6336c; }
body.theme-teen .faq-item { background: rgba(255, 214, 231, 0.8); color: #8a2b52; }
body.theme-teen .faq-item .q { color: #d6336c; }
body.theme-teen .footer { color: #b05a7d; }
body.theme-teen .modal-content { background: #fff0f6; color: #8a2b52; }
body.theme-teen .modal-content input,
body.theme-teen .modal-content select { background: #fff; color: #8a2b52; border: 1px solid #ffc2d6; }
body.theme-teen .site-card { background: #fff; }
body.theme-teen .site-card a { color: #d6336c; }
body.theme-teen .site-card p { color: #b05a7d; }
body.theme-teen .btn-close { background: #e8590c; }
body.theme-teen .btn-danger { background: #e8590c; }
body.theme-teen .warn-tip { color: #e8590c; }
body.theme-teen .remark-code { color: #f76707; }
body.theme-teen .ann-item { color: #c2255c; }
body.theme-teen .follow-text { color: rgba(214, 51, 108, 0.7); }

/* —— 青年风格（10:00-18:00）：即现有深色科技蓝，无需覆盖 —— */

/* —— 中年风格（18:00-次日05:00）：沉稳棕金、字号加大 —— */
body.theme-middle {
  background: linear-gradient(135deg, #2b2118 0%, #3e2f23 100%);
  color: #f3e9d8;
  font-size: 18px;
}
body.theme-middle .main-center h1 { font-size: 2rem; }
body.theme-middle .marquee-bar { background: #6d4c2f; }
body.theme-middle .top-bar { background: rgba(43, 33, 24, 0.9); }
body.theme-middle .logo { color: #e0a458; font-size: 1.5rem; }
body.theme-middle .tip { color: #cbb59a; }
body.theme-middle .parse-box input { background: #4a3826; color: #f3e9d8; border: 1px solid #6d4c2f; }
body.theme-middle .btn { background: #5b4630; color: #f3e9d8; }
body.theme-middle .btn:hover { background: #6d5638; }
body.theme-middle .btn-primary { background: #c98a3d; color: #2b2118; }
body.theme-middle .btn-primary:hover { background: #e0a458; }
body.theme-middle .status { color: #ffd166; }
body.theme-middle .faq-section h2 { color: #e0a458; }
body.theme-middle .faq-item { background: rgba(74, 56, 38, 0.85); color: #f3e9d8; }
body.theme-middle .faq-item .q { color: #e0a458; }
body.theme-middle .footer { color: #cbb59a; }
body.theme-middle .modal-content { background: #3e2f23; color: #f3e9d8; }
body.theme-middle .modal-content input,
body.theme-middle .modal-content select { background: #2b2118; color: #f3e9d8; border: 1px solid #6d4c2f; }
body.theme-middle .site-card { background: #2b2118; }
body.theme-middle .site-card a { color: #e0a458; }
body.theme-middle .site-card p { color: #cbb59a; }
body.theme-middle .btn-close { background: #b3410f; }
body.theme-middle .btn-danger { background: #b3410f; }
body.theme-middle .warn-tip { color: #ffd166; }
body.theme-middle .remark-code { color: #ffd166; }
body.theme-middle .ann-item { color: #ffd166; }
body.theme-middle .follow-text { color: rgba(224, 164, 88, 0.7); }

/* ========== 需求2：使用教程弹窗 ========== */
.modal-content.tutorial-content { max-width: 1060px; }
.tutorial-title { text-align: center; margin-bottom: 20px; }
.tutorial-img {
  width: 1000px; max-width: 100%;
  display: block; margin: 16px auto 8px;
  border-radius: 8px;
}
.tutorial-desc { text-align: center; line-height: 1.7; margin: 4px 0 20px; }

/* ========== 需求3：排名榜推荐者小字 ========== */
.rank-referrer { font-size: 0.75rem; margin-top: 2px; color: #94a3b8; }
body.theme-teen .rank-referrer { color: #d6336c; }
body.theme-middle .rank-referrer { color: #e0a458; }
#resultBox { margin-top: 4px; }
