/* --- Search Box Styles --- */
.container {
    max-width: auto;
    margin-top: 60px;
    margin-left: 30px;
    margin-right: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 45px;
    align-items: center;
}
.section-search {
  width: 80%;
  margin: 0 auto 50px;
  position: relative;
}
.search-box {
  width: 100%;
  margin: 0 auto 50px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 14px 50px 14px 50px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  transition: all 0.3s;
  outline: none;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: white;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.search-btn {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
}
.search-btn:hover { background: #cbd5e1; }
.search-btn.visible { display: flex; }


.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
}


.clear-btn:hover { background: #cbd5e1; }
.clear-btn.visible { display: flex; }

.search-results-count {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
  min-height: 20px;
}

h2.category-title {
  color: var(--primary); 
  font-size: 20px; 
  margin: 25px 0 15px 0; 
  cursor: pointer; 
  padding-left: 16px; 
  border-left: 4px solid var(--primary);
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  transition: background-color 0.2s;
}
h2.category-title:hover { background-color: #f1f5f9; }
h2.category-title::after { content: "▼"; font-size: 12px; color: var(--primary); transition: transform 0.3s ease; margin-left: auto; padding-right: 4px; }

.qa-content { overflow: hidden; transition: max-height 0.4s ease-out, opacity 0.4s ease; opacity: 1; }
.category.collapsed .qa-content { max-height: 0 !important; opacity: 0; }
.category.collapsed h2.category-title::after { transform: rotate(-90deg); }

.qa-wrapper { margin-bottom: 15px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: white; transition: all 0.3s; }
.qa-wrapper.highlighted { border-color: var(--primary-light); box-shadow: 0 2px 8px rgba(37,99,235,0.1); }

.q-label { padding: 14px 20px; font-weight: 600; cursor: pointer; display: flex; align-items: center; color: var(--qa-dark); border-bottom: 1px solid transparent; transition: all 0.2s; }
.q-label:hover { background-color: #f8fafc; color: var(--primary); border-bottom: 1px solid var(--primary-light); }
.q-label::before { content: "Q"; background: var(--primary); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 12px; font-size: 13px; }
.q-label::after { content: "▼"; font-size: 10px; color: #94a3b8; margin-left: auto; transition: transform 0.3s; }

/* Key fix: default state is max-height: 0 */
.a-container { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background-color: white; }

.qa-wrapper.expanded .q-label::after { transform: rotate(180deg); color: var(--primary); }
.qa-wrapper.expanded .q-label { border-bottom: 1px solid var(--border); background-color: #eff6ff; }


.v-label { padding: 14px 20px; font-weight: 600; cursor: pointer; display: flex; align-items: center; color: var(--version-dark); border-bottom: 1px solid transparent; transition: all 0.2s; }
.v-label:hover { background-color: #f8fafc; color: var(--primary); border-bottom: 1px solid var(--primary-light); }
.v-label::before { content: "V"; background: var(--primary); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 12px; font-size: 13px; }
.v-label::after { content: "▼"; font-size: 10px; color: #94a3b8; margin-left: auto; transition: transform 0.3s; }

.qa-wrapper.expanded .v-label::after { transform: rotate(180deg); color: var(--primary); }
.qa-wrapper.expanded .v-label { border-bottom: 1px solid var(--border); background-color: #eff6ff; }


.a-label { padding: 15px 20px 15px 56px; line-height: 1.7; color: #475569; margin: 0; }
.note { display: block; margin-top: 8px; font-size: 13px; background: #fef2f2; color: #b91c1c; padding: 8px 12px; border-radius: 6px; }

/* Highlight Styles */
mark { background-color: var(--highlight-bg); padding: 0 2px; border-radius: 3px; font-weight: inherit; }

@media (max-width: 600px) { 
  .container { padding: 20px; } 
  .a-label { padding-left: 24px; } 
  h2.category-title { font-size: 18px; margin-top: 15px; }
}

/* ============ 下载服务器节点选择器 ============ */
.server-selector {
    margin-bottom: 22px;
    padding: 16px 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid #eaedf0;
    animation: fadeInUp 0.6s ease-out 0.25s both;
}
.server-label {
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.1px;
}
.server-label svg {
    color: var(--accent);
    flex-shrink: 0;
}
.server-android {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.server-android.visible { display: flex; }
.server-node {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid #e2e5e9;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-height: 34px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.server-node:hover {
    border-color: #b8d9cc;
    background: #f4fbf8;
    color: var(--accent);
    transform: translateY(-1px);
}
.server-node.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 138, 106, 0.25);
}
.server-node.active:hover {
    background: #167a5e;
    border-color: #167a5e;
    color: #fff;
    transform: translateY(-1px);
}
/* 节点信号小圆点 */
.node-ping {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c7cdd4;
    flex-shrink: 0;
    transition: background 0.22s;
    position: relative;
}
.server-node.active .node-ping {
    background: #a7f0d4;
}
.server-node.active .node-ping::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(167, 240, 212, 0.6);
    animation: pingPulse 1.8s ease-out infinite;
}
@keyframes pingPulse {
    0% {
        transform: scale(0.7);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}
/* 节点提示文案 */
.server-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e6eaee;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}
/* 下载反馈提示 */
.download-feedback {
    margin-top: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    min-height: 20px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.download-feedback.show {
    opacity: 1;
    transform: translateY(0);
}
.download-feedback::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    animation: pulse 1.6s ease-in-out infinite;
}

/* ============ 响应式适配（服务器节点） ============ */
@media (max-width: 768px) {
    .server-selector {
        padding: 14px 14px;
        margin-bottom: 18px;
        text-align: left;
    }
    .server-label {
        font-size: 0.78rem;
        margin-bottom: 10px;
        justify-content: flex-start;
    }
    .server-android {
        gap: 6px;
        justify-content: flex-start;
    }
    .server-node {
        padding: 7px 12px;
        font-size: 0.72rem;
        min-height: 32px;
        gap: 5px;
    }
    .node-ping {
        width: 6px;
        height: 6px;
    }
    .server-hint {
        font-size: 0.68rem;
    }
    .download-feedback {
        font-size: 0.74rem;
        justify-content: center;
        text-align: center;
    }
}
@media (max-width: 420px) {
    .server-selector {
        padding: 12px 12px;
    }
    .server-label {
        font-size: 0.74rem;
    }
    .server-android {
        gap: 5px;
    }
    .server-node {
        padding: 6px 10px;
        font-size: 0.68rem;
        min-height: 30px;
        gap: 4px;
    }
    .node-ping {
        width: 5px;
        height: 5px;
    }
    .server-hint {
        font-size: 0.64rem;
    }
    .download-feedback {
        font-size: 0.7rem;
    }
}