/* =========================================
   TeamSpeak 使用教程 - 专属样式
   /ts-guide/css/style.css
   ========================================= */

/* ------- 重置主站全局样式（避免布局污染） ------- */
html,
body {
    min-height: 100vh;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    font-family: "HarmonyOS Sans", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, sans-serif;
}

/* 主站把 section 设为 position:fixed + opacity:0，本页完全重置 */
section {
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    display: block !important;
}

/* 主站把 .container 设为 display:flex，本页覆盖为正常块级 */
.tsg-container {
    display: block !important;
}

/* 主站把 main 设为 display:flex，本页不使用 main 标签，防御性重置 */
main {
    display: block !important;
    height: auto !important;
    background: none !important;
}

/* 背景图在本页不模糊，直接展示 */
.bg-all #bg {
    filter: none !important;
    transform: scale(1) !important;
}

/* ------- 导航栏 ------- */
.navbar-tsg {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.85rem 0;
    z-index: 100;
}

.navbar-tsg .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.25s, transform 0.25s;
}

.back-link:hover {
    color: #fff;
    transform: translateX(-3px);
}

.nav-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ------- 主容器 ------- */
.tsg-container {
    padding-top: 2rem !important;
    padding-bottom: 4rem !important;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ------- Hero ------- */
.tsg-hero {
    padding: 2.5rem 1rem 1rem;
    margin-bottom: 0.5rem;
}

.hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.9rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* ------- 毛玻璃卡片 ------- */
.glass-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s, border-color 0.3s;
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
}

/* 卡片章节标题 */
.card-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.card-section-title i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.93rem;
    line-height: 1.75;
    margin-bottom: 1.1rem;
}

.card-text strong {
    color: rgba(255, 255, 255, 0.95);
}

.card-text-tip {
    margin-top: 0.8rem;
    margin-bottom: 0;
}

/* ------- 模块一：特性图标行 ------- */
.feature-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.feature-item i {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ------- 模块二：下载按钮 ------- */
.dl-grid {
    display: grid;
    /* 自动适应按鈕数量，注释再多也不会弃展 */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.dl-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
    cursor: pointer;
}

.dl-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.dl-btn-block {
    margin-bottom: 1rem;
}

.dl-btn > i:first-child {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.85);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.dl-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.dl-platform {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.dl-hint {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

.dl-arrow {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}

.dl-btn:hover .dl-arrow {
    transform: translateX(3px);
    color: rgba(255, 255, 255, 0.6);
}

/* ------- 模块三：步骤列表 ------- */
.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-item {
    display: flex;
    gap: 1.2rem;
    position: relative;
}

/* 左侧连线：用 CSS :last-child 自动识别最后一项，无需手写 class="last" */
.step-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 42px;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.12);
}

.step-num {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.15rem;
    position: relative;
    z-index: 1;
}

.step-num.done {
    background: rgba(80, 200, 120, 0.2);
    border-color: rgba(80, 200, 120, 0.5);
    color: #7be8a0;
}

.step-content {
    padding-bottom: 1.6rem;
    flex: 1;
}

.step-item.last .step-content {
    padding-bottom: 0.25rem;
}

.step-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.step-content p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin: 0;
}

.step-content code {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
}

.guide-image-box {
    margin-top: 0.75rem;
    padding: 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.guide-image-tip {
    margin: 0 0 0.65rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.guide-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

kbd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82em;
    font-family: 'Courier New', monospace;
}

/* ------- 模块四：服务器信息 ------- */
.server-info-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.server-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    gap: 1rem;
}

/* 相邻兄弟选择器：任何时候注释、删除、新增行都不会影响分隔线 */
.server-row + .server-row {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.server-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.server-val-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.server-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.server-val.muted {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    font-family: inherit;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* ------- 模块五：FAQ ------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.9rem 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-q:hover {
    background: rgba(255, 255, 255, 0.06);
}

.faq-q span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.faq-icon {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.faq-chevron {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-a {
    display: none;
    padding: 0 1.1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.faq-item.open .faq-a {
    display: block;
}

.faq-a ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    line-height: 1.85;
}

.faq-a ul li {
    margin-bottom: 0.2rem;
}

.faq-a code {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
}

/* ------- 页脚 ------- */
.tsg-footer {
    text-align: center;
    padding: 1.5rem 1rem 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.88rem;
}

.tsg-footer p {
    margin-bottom: 1rem;
}

.footer-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s, color 0.25s, transform 0.2s;
}

.footer-back-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-2px);
}

/* ------- 响应式 ------- */
@media (max-width: 600px) {
    .tsg-hero {
        padding-top: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .dl-grid {
        grid-template-columns: 1fr;
    }

    .feature-row {
        gap: 0.5rem;
    }

    .glass-card {
        padding: 18px;
        border-radius: 12px;
    }

    .nav-title {
        display: none;
    }

    .server-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .guide-image-box {
        padding: 0.7rem;
    }
}
