/* ====================== 全局样式 ====================== */
body {
    background-color: #1b1b1f;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: white;
    padding-top: 55px; /* 为顶部导航预留空间 */
}

/* ====================== 全局大按钮 ====================== */
.main-btn {
    font-size: 22px;
    font-weight: 700;
    border: 2px solid #404040;
    border-radius: 4px;
    display: block;
    margin: 20px auto;
    width: 200px; /* PC端宽度 */
    padding: 10px;
    cursor: pointer;
    text-decoration: none;
    background: #CFB53B;
    box-shadow: 0 5px 0 #888888;
}

.main-btn:hover {
    color: #CFB53B;
    font-size: 22px;
    background: #161616;
    border: 2px solid #fff;
    box-shadow: 0 5px 0 #ccc;
}

/* ====================== 回到顶部按钮 ====================== */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 8px 12px;
    font-size: 18px;
    background: rgba(20,20,20,0.6);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: sans-serif;
}
#scrollToTopBtn:hover {
    background: rgba(20,20,20,0.8);
    transform: translateY(-2px);
}
#scrollToTopBtn.show {
    display: inline-block;
}

/* ====================== 刷新按钮 ====================== */
#refreshBtn {
    position: fixed;
    bottom: 20px;
    right: 18px;
    padding: 8px 12px;
    font-size: 20px;
    background: rgba(20,20,20,0.6);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: sans-serif;
}
#refreshBtn:hover {
    background: rgba(20,20,20,0.8);
    transform: translateY(-2px);
}
#refreshBtn.show {
    display: inline-block;
}

/* ====================== 标题样式 ====================== */
h1 {
    font-size: 46px;
    color: #CFB53B;
    text-align: center;
    position: relative;
    width: 100%;
    word-wrap: break-word;
    margin-top: 0;
}
h1 span { display: inline-block; position: relative; }
h1 span span {
    position: absolute;
    top: -15px;
    right: 0px;
    font-size: 16px;
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    transform: rotate(10deg);
}

h2 {
    font-size: 20px;
    font-weight: bold;
    color: #CFB53B;
    text-align: center;
}

hr {
    border: 0;
    border-top: 0.5px solid #404040;
    height: 1px;
    background-color: #404040;
}

a { text-decoration: none; }

/* ====================== banner ====================== */
.banner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto; /* 去掉上边距，紧贴导航栏下方 */
}
.banner img {
    width: 100%;
    height: auto;
    display: block; /* 消除 img 底部间隙 */
    margin: 0 auto;
}

/* ====================== 内容区域 ====================== */
.content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: system-ui;
    font-size: 16px;
	color: #e0e0e0;
}

/* ====================== 弹层样式 ====================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content { max-width: 90%; max-height: 90%; position: relative; }
.modal-image { max-width: 100%; max-height: 80vh; display: block; }

/* ====================== 加载动画 ====================== */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #CFB53B;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ====================== 遮罩 ====================== */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);/*临时调整邀请码遮罩透明度*/
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    display: none;
}

/* ====================== 底部浮动条 ====================== */
.footer-bar {
    position: fixed;
    display: none;
    bottom: 0; left: 0;
    width: 100%;
    background-color: #CFB53B;
    padding: 15px 0;               /* 使用 padding 控制高度，自适应 */
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.footer-bar a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
}

.footer-bar a:hover {
    text-decoration: none;
    color: rgba(0,0,0,0.8);
}

/* ====================== 导航栏 ====================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px;
    background: rgba(20,20,20,0.6);
    backdrop-filter: blur(8px);
    z-index: 999;
    padding: 0 16px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.3s ease;
    -webkit-backface-visibility: hidden; /* 修复 iOS 键盘弹出导致 fixed 偏移 */
    backface-visibility: hidden;
}

.navbar:hover {
    background: rgba(20,20,20,0.9);   /* 悬停稍加深，更有层次感 */
}

.navbar-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 55px;
}

.navbar-left {
    font-size: 26px;
    font-weight: bold;
    color: white;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 搜索输入框容器 */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* 搜索输入框 */
#searchInput {
    height: 32px;                 /* 与按钮一致 */
	max-width: 160px; 
    padding: 0 28px 0 10px;       /* 给右边留清除按钮空间 */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    background: rgba(30,30,30,0.5);
    color: #e0e0e0;
    font-size: 16px;
    box-sizing: border-box;
    caret-color: white;
    outline: none;
    transition: background 0.3s ease, border 0.3s ease;
}

/* 悬停或聚焦 */
#searchInput:hover,
#searchInput:focus {
    background: rgba(30,30,30,0.65);
    border: 1px solid rgba(255,255,255,0.1);
}

/* 清除按钮 × */
#clearBtn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    width: 28px;
    display: none;               /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #e0e0e0;
    background: transparent;     /* 去掉圆形背景 */
    border: none;
    cursor: pointer;
    padding: 0;
}

/* 输入框有内容时显示清除按钮 */
.search-container input:not(:placeholder-shown) + #clearBtn {
    display: flex;
}

/* 悬停高亮 */
#clearBtn:hover {
    color: #CFB53B;
}



/* 导航栏右侧小按钮 △ ▽ */
.navbar-right button {
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    background: rgba(30,30,30,0.5);
    color: white;
    cursor: pointer;
    padding: 0;
    line-height: normal;
    box-shadow: none;
    appearance: none;
    transition: background 0.3s ease, border 0.3s ease;
}

.navbar-right button:hover {
    background: rgba(30,30,30,0.65);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ====================== 响应式 ====================== */
@media (max-width: 768px) {
    .main-btn { width: 180px; }
    h1 { font-size: 36px; }
    h2 { font-size: 18px; }
    .content { width: 95%; }
    .footer-bar { padding: 22px 0; font-size: 16px; }
    .navbar-left { font-size: 28px; }
    .navbar-right input,
    .navbar-right button,
    #clearBtn { height: 32px; font-size: 14px; }
    .navbar-right input { width: 120px; }
}

@media (max-width: 480px) {
    h1 { font-size: 30px; }
    h2 { font-size: 16px; }
    pre { font-size: 16px; }
    .main-btn { width: 100%; }
    .footer-bar { padding: 20px 0; font-size: 16px; }
}

/* ====================== 高亮标记 ====================== */
.highlight { background-color: yellow; color: black; }
.highlight.active { background-color: red; }

/* ====================== 自动填充覆盖 ====================== */
input#searchInput:-webkit-autofill,
input#searchInput:-webkit-autofill:hover,
input#searchInput:-webkit-autofill:focus,
input#searchInput:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #222 inset;
    -webkit-text-fill-color: white;
    transition: background-color 5000s ease-in-out;
}
input#searchInput:-moz-autofill {
    box-shadow: 0 0 0px 1000px #222 inset;
    -moz-text-fill-color: white;
}
/* ====================== icon row ====================== */
.icon-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;              
  gap: clamp(10px, 2.5vw, 28px);  /* ✅ 间距缩小，保持自适应 */
  margin: 40px auto -10px;
  width: 100%;
  max-width: 860px;               /* ✅ 稍微收紧总宽度 */
  box-sizing: border-box;
  overflow: hidden;
}

/* ====================== icon item ====================== */
.icon-item {
  flex: 1 1 0;                    
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
}

/* ====================== icon circle ====================== */
.icon-circle {
  width: clamp(60px, 9vw, 80px);  /* ✅ 稍大：PC上约80px，手机上约60px */
  height: clamp(60px, 9vw, 80px);
  background-color: #2a2a2f;
  border: 1px solid #555;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(26px, 3vw, 34px);
  color: white;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
  cursor: pointer;
}

/* ====================== hover 效果 ====================== */
/* .icon-item a:hover .icon-circle { */
  /* transform: scale(1.08); */
  /* border-color: #CFB53B; */
/* } */
/* .icon-item a:hover .icon-title { */
  /* color: #CFB53B; */
/* } */

/* ====================== icon title ====================== */
.icon-title {
  font-size: clamp(15px, 2vw, 16px);  /* ✅ 字体略大一点 */
  color: #e0e0e0;
  transition: color 0.2s;
  font-weight: bold;
}

/* ====================== SVG 样式 ====================== */
.icon-circle svg {
  width: clamp(40px, 4vw, 50px);      /* ✅ 图标略放大 */
  height: clamp(40px, 4vw, 50px);
  stroke: white;
}

/* ====================== 链接样式 ====================== */
.icon-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

/* ====================== 小红点 ====================== */
.red-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}
