/* 
 * 访问故障排查指南站 - 全局样式
 * 风格: IT运维/帮助中心风格 (白/灰底色，黄色或红色警示图标，大量使用代码块样式)
 */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Oswald:wght@500;700&display=swap');

:root {
    --bg-primary: #F4F6F9;      /* 干净的浅灰底色 */
    --bg-secondary: #E9ECEF;    /* 稍微深一点的浅灰底色 */
    --bg-card: #FFFFFF;         /* 纯白卡片底色 */
    --text-primary: #1A1D20;    /* 深黑主文字 */
    --text-secondary: #495057;  /* 灰黑辅助文字 */
    --text-muted: #6C757D;     /* 浅灰说明文字 */
    
    --accent-yellow: #F1C40F;   /* 警示黄色 */
    --accent-yellow-hover: #D4AF37;
    --accent-green: #28A745;    /* 安全绿色 */
    --accent-green-hover: #218838;
    --accent-red: #DC3545;      /* 警示红色 */
    --border-color: #CED4DA;    /* 工业灰色边框 */
    --border-width: 2px;
    --shadow-industrial: 4px 4px 0px #212529; /* 工业风直角黑色扁平投影 */
    --font-mono: 'Fira Code', monospace;
    --font-display: 'Oswald', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans CJK SC", sans-serif;
    line-height: 1.6;
    padding-bottom: 0;
}

/* 工业斜纹警示条 */
.hazard-stripe {
    background: repeating-linear-gradient(
        -45deg,
        var(--accent-yellow),
        var(--accent-yellow) 10px,
        #212529 10px,
        #212529 20px
    );
    height: 12px;
    width: 100%;
    border-bottom: 1px solid #212529;
}

.hazard-stripe-vertical {
    background: repeating-linear-gradient(
        -45deg,
        var(--accent-yellow),
        var(--accent-yellow) 10px,
        #212529 10px,
        #212529 20px
    );
    width: 12px;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 - 非sticky */
header {
    background-color: var(--bg-card);
    border-bottom: var(--border-width) solid #212529;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #212529;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: var(--accent-yellow);
    color: #000;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    border-radius: 4px;
    border: 2px solid #212529;
    box-shadow: 2px 2px 0 #212529;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    padding: 6px 12px;
    border: var(--border-width) solid transparent;
    transition: all 0.2s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #212529;
    border-color: #212529;
    background-color: var(--bg-secondary);
    box-shadow: 3px 3px 0px #212529;
    transform: translate(-2px, -2px);
}

/* 面包屑导航 */
.breadcrumb-section {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #000;
    text-decoration: underline;
}

.breadcrumb li::after {
    content: "/";
    margin-left: 8px;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb li:last-child {
    color: #000;
    font-weight: bold;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border: var(--border-width) solid #212529;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-industrial);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #212529;
}

.btn-yellow {
    background-color: var(--accent-yellow);
    color: #000000;
}

.btn-yellow:hover {
    background-color: var(--accent-yellow-hover);
}

.btn-green {
    background-color: var(--accent-green);
    color: #FFFFFF;
}

.btn-green:hover {
    background-color: var(--accent-green-hover);
}

.btn-outline {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: #212529;
}

.btn-outline:hover {
    background-color: var(--bg-secondary);
}

/* 工业卡片样式 */
.card {
    background-color: var(--bg-card);
    border: var(--border-width) solid #212529;
    border-radius: 6px;
    padding: 24px;
    box-shadow: var(--shadow-industrial);
    position: relative;
    overflow: hidden;
}

.card-header-stripe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-yellow);
}

.card-title {
    font-family: var(--font-sans);
    font-size: 20px;
    color: #212529;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    font-weight: bold;
}

/* 代码块/终端样式 */
.terminal-block {
    background-color: #1E1E24;
    border: 2px solid #212529;
    border-radius: 4px;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #2ECC71;
    overflow-x: auto;
    margin: 15px 0;
    box-shadow: var(--shadow-industrial);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #495057;
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #ADB5BD;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background-color: #ff5f56; }
.terminal-dot.yellow { background-color: #ffbd2e; }
.terminal-dot.green { background-color: #27c93f; }

/* 警示框 */
.alert-box {
    background-color: #FFF3CD;
    border-left: 4px solid var(--accent-yellow);
    border-top: 1px solid #FFEBAA;
    border-right: 1px solid #FFEBAA;
    border-bottom: 1px solid #FFEBAA;
    padding: 15px;
    border-radius: 0 4px 4px 0;
    margin: 20px 0;
}

.alert-box-title {
    color: #856404;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 页脚样式 */
footer {
    background-color: var(--bg-secondary);
    border-top: var(--border-width) solid #212529;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 15px;
}

.footer-links h4 {
    font-family: var(--font-sans);
    color: #212529;
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: bold;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #000;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* 假客服悬浮球 */
.support-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.support-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-yellow);
    border: 3px solid #212529;
    box-shadow: var(--shadow-industrial);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.support-btn:hover {
    transform: scale(1.05) translate(-2px, -2px);
    box-shadow: 6px 6px 0px #212529;
}

.support-btn svg {
    width: 30px;
    height: 30px;
    fill: #000;
}

.support-popover {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background-color: var(--bg-card);
    border: 2px solid #212529;
    border-radius: 8px;
    box-shadow: var(--shadow-industrial);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.support-popover.active {
    display: flex;
}

.support-popover-header {
    background-color: var(--accent-yellow);
    color: #000;
    padding: 12px 15px;
    font-family: var(--font-sans);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #212529;
}

.support-popover-close {
    cursor: pointer;
    font-size: 18px;
}

.support-popover-body {
    padding: 15px;
}

.support-chat-msg {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
    margin-bottom: 15px;
}

.support-chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-chat-option {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.support-chat-option:hover {
    border-color: #212529;
    background-color: var(--accent-yellow);
    color: #000;
}

/* 栅格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
