/* ========== 完全复用DNS说明书的全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body {
    background-color: #f5f7fa;
    padding: 0;
    min-width: 1200px;
}

/* ========== 导航栏 ========== */
.navbar {
    background-color: #28a745;
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}
.navbar-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar-logo {
    font-size: 20px;
    font-weight: 700;
}
.navbar-menu {
    display: flex;
    gap: 30px;
}
.navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}
.navbar-menu a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ========== 页脚 ========== */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 20px 15px;
    margin-top: 40px;
}
.footer-container {
    max-width: 1920px;
    margin: 0 auto;
}
.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

/* ========== 页面容器 ========== */
.page-container {
    width: 98%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 15px;
}
.tab-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* ========== 标题区域 ========== */
.title-btn-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e9f0;
}
.title-btn-container h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    padding-left: 10px;
    border-left: 4px solid #28a745;
}
.card-link-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}
.card-link-btn:hover {
    background: #218838;
}

/* ========== 选项卡 ========== */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e9f0;
}
.tab-btn, .tab-item {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active, .tab-item.active {
    background: #fff;
    border-bottom: 2px solid #28a745;
    color: #28a745;
    font-weight: 600;
}
.tab-btn:hover, .tab-item:hover {
    background: #f0f8f4;
    color: #28a745;
}

/* ========== 卡片 ========== */
.calculator-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.calculator-card h2,
.calculator-card h3,
.calculator-card h4 {
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 600;
}
.calculator-card h2 { font-size: 20px; }
.calculator-card h3 { font-size: 18px; }
.calculator-card h4 { font-size: 16px; }

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 24px; /* 增大间距，更清爽 */
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e5e9f0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* ========== 按钮 ========== */
.calculate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 42px;
}
.calculate-btn:hover {
    background-color: #218838;
}
.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.calculate-btn.bg-secondary {
    background-color: #6c757d;
}
.calculate-btn.bg-secondary:hover {
    background-color: #5c636a;
}
.calculate-btn.bg-success {
    background-color: #28a745;
}

/* 按钮组间距优化 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* ========== 结果预览框 ========== */
.result-area {
    margin-top: 25px;
}
#preview, #result-content {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    border: 1px solid #e5e9f0 !important;
    padding: 15px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    min-height: 220px !important; /* 固定高度，排版更稳 */
    white-space: pre-wrap;
    word-break: break-all;
}

/* ========== 搜索引擎选择样式（从JS移过来 + 优化） ========== */
.engine-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.engine-item {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    transition: all 0.2s;
}
.engine-item.selected {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
}

/* ========== 选项卡切换 ========== */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.sub-tab-content {
    display: none;
}
.sub-tab-content.active {
    display: block;
}

/* ========== 子选项卡 ========== */
.sub-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e9f0;
}
.sub-tab-item {
    padding: 8px 15px;
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}
.sub-tab-item.active {
    background: #fff;
    border-bottom: 2px solid #28a745;
    color: #28a745;
    font-weight: 600;
}

/* ========== 副导航 ========== */
.sub-navbar {
    background-color: #208838;
    color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}
.sub-navbar-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}
.sub-navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}
.sub-navbar-menu a:hover,
.sub-navbar-menu a.active {
    background-color: rgba(255,255,255,0.2);
}

/* ========== 工具导航 ========== */
.tool-nav-card {
    margin: 20px auto;
    padding: 15px;
    width: 96%;
    max-width: 1920px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    box-sizing: border-box;
}
.tool-nav-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* ========== 响应式 ========== */
@media only screen and (max-width: 767px) {
    body {
        min-width: unset;
        width: 100%;
        overflow-x: hidden;
    }
    .page-container {
        width: 100%;
        padding: 0 10px;
    }
    .tab-container {
        padding: 15px;
        margin: 10px auto;
    }
    .navbar {
        padding: 10px 15px;
    }
    .navbar-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .navbar-menu {
        gap: 10px;
        flex-wrap: wrap;
        width: 100%;
    }
    .title-btn-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .card-link-btn {
        width: 100%;
        text-align: center;
    }
    .tabs {
        flex-direction: column;
    }
    .tab-btn, .tab-item {
        width: 100%;
        text-align: left;
    }
    .calculator-card {
        padding: 15px;
    }
    .calculate-btn {
        width: 100%;
        margin-bottom: 6px;
    }
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    .sub-navbar {
        padding: 8px 15px;
    }
    .sub-navbar-container {
        gap: 10px;
        justify-content: flex-start;
    }
}
/* robots语法高亮 */
.robots-highlight {
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.robots-agent { color: #007bff; font-weight: bold; }
.robots-allow { color: #28a745; }
.robots-disallow { color: #dc3545; }
.robots-sitemap { color: #ffc107; }
.robots-comment { color: #6c757d; }
.robots-other { color: #212529; }