/* ========== 全局重置 & 基础样式 ========== */
* {
    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-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.page-container {
    margin-top: 30px;
}
.main-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 20px;
}

/* ========== 标题区域样式 ========== */
.tool-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.tool-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
}
.tool-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ========== 表单区域样式 ========== */
.query-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.form-group {
    flex: 1;
    min-width: 280px;
    margin: 0;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e9f0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    height: 44px;
    box-sizing: border-box;
    vertical-align: middle;
}
.form-control:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}
.btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
}
.submit-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 44px;
    box-sizing: border-box;
}
.primary-btn {
    background-color: #28a745;
    color: #fff;
}
.primary-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}
.secondary-btn {
    background-color: #6c757d;
    color: #fff;
}
.secondary-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}
.submit-btn:active {
    transform: translateY(0);
}

/* ========== 提示信息样式 ========== */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-error { 
    background: #FEF2F2; 
    color: #DC2626; 
    border: 1px solid #FEE2E2;
}

/* ========== 使用说明样式 ========== */
.use-desc-container {
    background: #f0f8fb;
    border-left: 4px solid #10b981;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
    line-height: 1.8;
    color: #333;
}
.use-desc-container h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}
.use-desc-container p {
    margin: 5px 0;
    font-size: 14px;
}

/* ========== 加载 & 进度条样式 ========== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    font-size: 15px;
    color: #28a745;
    background: rgba(40, 167, 69, 0.05);
    border-radius: 8px;
    margin: 10px 0;
}
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #28a745;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loading-rotate 0.8s linear infinite;
}
@keyframes loading-rotate {
    to { transform: rotate(360deg); }
}
.progress-bar-container {
    width: 80%;
    margin:15px auto; 
    height: 10px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    overflow: hidden;
    position: relative;
}
.progress-bar {
    width: 0%; 
    height: 100%; 
    background-color: #4CAF50; 
    transition: width 0.3s ease;
}
.progress-text {
    text-align:center; 
    margin-top: 10px; 
    font-size: 14px;
    color: #333;
}
.progress-percent {
    text-align: center;
    font-size: 14px;
    color: #333;
    margin: 5px 0 0 0;
}

/* ========== 工具导航卡片样式 ========== */
.tool-nav-card {
    margin: 20px auto;
    padding: 15px;
    width: 100%;
    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;
}

/* ========== 子域名结果美化样式 ========== */
.result-section {
    margin-top: 30px;
    display: none;
}
.result-header {
    font-size: 18px;
    color: #28a745;
    margin-bottom: 20px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f8f2;
}
.result-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}
.sub-result-title {
    font-size: 18px;
    color: #28a745;
    margin-bottom: 16px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f5e9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sub-result-title::before {
    content: "📋";
    font-size: 20px;
}
.sub-domain-list {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8f5e9;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.05);
    max-height:400px;
    overflow-y:auto;
    padding:0;
}
.sub-domain-item {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f9f6;
    font-size: 15px;
    color: #2c3e50;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sub-domain-item:last-child {
    border-bottom: none;
}
.sub-domain-item:hover {
    background-color: #f8fff9;
}
.sub-domain-item::before {
    content: "🔹";
    font-size: 12px;
    color: #28a745;
}
.sub-empty-tip {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-size: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}
.sub-empty-tip::before {
    content: "💡";
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* ========== 响应式适配 ========== */
@media only screen and (max-width: 768px) {
    body {
        min-width: unset;
        width: 100%;
        overflow-x: hidden;
    }
    .navbar {
        padding: 10px 15px;
    }
    .navbar-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .navbar-menu {
        gap: 15px;
        flex-wrap: wrap;
        width: 100%;
    }
    .navbar-menu a {
        font-size: 14px;
        padding: 2px 0;
    }
    .main-card {
        padding: 20px 15px;
    }
    .tool-title {
        font-size: 18px;
    }
    .query-form {
        flex-direction: column;
        gap: 15px;
    }
    .form-group {
        min-width: 100%;
    }
    .submit-btn {
        width: 100%;
    }
}