* {
    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;
}

.container {
    width: 98%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 15px;
}
.container-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.module {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}
.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 h2 {
    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;
}

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    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;
}
.form-control:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 10;
}
.btn:hover {
    background-color: #218838;
}

.result-area {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e9f0;
}
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
.result-table th, .result-table td {
    padding: 12px 15px;
    border: 1px solid #e5e9f0;
    text-align: left;
}
.result-table th {
    background-color: #f0f8f4;
    color: #28a745;
    font-weight: 600;
}
.result-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.delay-low { color: #28a745; font-weight: 500; }
.delay-mid { color: #f59e0b; font-weight: 500; }
.delay-high { color: #ef4444; font-weight: 500; }
.error-msg { color: #ef4444; margin-bottom: 10px; padding: 8px; background: #fff1f0; border-radius: 4px; }

.history-display-area {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e9f0;
}
.history-display-area h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}
.history-item {
    text-decoration: none;
    color: #333;
    cursor: pointer;
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
    margin: 0;
}
.history-item:hover {
    background: #e8f4f8;
    border-color: #28a745;
    color: #28a745;
}

.mod-article {
    margin-top: 20px;
}
.mod-article .hd {
    margin-bottom: 15px;
}
.mod-article .title {
    color: #28a745;
    font-size: 18px;
    font-weight: 600;
}
.mod-article .bd {
    line-height: 1.8;
    color: #555;
}
.mod-article .bd p {
    margin-bottom: 10px;
}

.result-loading {
    text-align: center;
    color: #28a745;
    font-size: 14px;
    padding: 20px;
}

/* 移动端自适应样式 (768px以下) - 核心必要 */
@media only screen and (max-width: 767px) {
    body {
        min-width: unset;
        width: 100%;
        overflow-x: hidden;
    }
    .container {
        width: 100%;
        padding: 0 10px;
    }
    .container-inner {
        padding: 15px;
        margin: 10px auto;
        border-radius: 8px;
    }
    .navbar {
        padding: 10px 15px;
    }
    .navbar-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .navbar-menu {
        gap: 10px;
        flex-wrap: wrap;
        width: 100%;
    }
    .navbar-menu a {
        font-size: 12px;
    }
    .title-btn-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .card-link-btn {
        width: 100%;
        text-align: center;
    }
    .module {
        padding: 15px;
        margin-bottom: 15px;
    }
    .btn {
        width: 100%;
    }
    
    .history-items {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        max-height: 150px;
        overflow-y: auto;
        padding-right: 5px;
        flex-direction: row;
    }
    .history-item {
        padding: 6px 12px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 13px;
        color: #333;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
        text-decoration: none;
        width: auto;
        margin: 0;
        text-align: left;
    }
    
    .result-table {
        font-size: 12px;
    }
    .result-table th, .result-table td {
        padding: 8px 10px;
    }
    .ping-form-section {
        padding: 12px;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 12px;
    }
    .form-group {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .form-group label {
        min-width: 70px;
        font-size: 13px;
    }
    .target-input {
        width: 100%;
        font-size: 13px;
        padding: 8px 12px;
    }
    .select-control {
        flex: 1;
        min-width: unset;
    }
    .operator-checkboxes {
        width: 100%;
        padding-left: 70px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .checkbox-item {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        font-size: 13px;
    }
    .detect-btn {
        width: 100%;
        padding: 12px 30px;
        margin-top: 10px;
    }
    .info-section {
        padding: 12px 15px;
    }
    .info-section p {
        font-size: 13px;
    }
    #resultTitle {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    .map-rank-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    .map-container {
        height: 300px !important;
        min-width: unset;
        width: 100% !important;
    }
    .rank-container {
        height: 300px;
        min-width: unset;
        width: 100%;
    }
    .map-legend {
        padding: 10px 12px;
        font-size: 11px;
        bottom: 15px;
        left: 15px;
    }
    .legend-item {
        gap: 6px;
        margin: 4px 0;
    }
    .legend-color {
        width: 16px;
        height: 16px;
    }
    .rank-tabs {
        overflow-x: auto;
    }
    .rank-tab {
        padding: 12px 15px;
        font-size: 13px;
    }
    .rank-content {
        padding: 12px;
    }
    .rank-table th, .rank-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    .ping-table th, .ping-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    .operator-tag {
        padding: 2px 6px;
        font-size: 11px;
    }
    .advanced-options-content {
        gap: 12px;
    }
    .advanced-form-group {
        width: 100%;
        min-width: unset;
    }
    .advanced-form-group label {
        min-width: 70px;
        font-size: 12px;
    }
    .advanced-input {
        font-size: 12px;
    }
    #infoModal {
        padding: 15px;
    }
    #modalInner {
        width: 100%;
        padding: 15px;
    }
    #closeModal {
        top: 10px;
        right: 10px;
        font-size: 18px;
        width: 25px;
        height: 25px;
        line-height: 25px;
    }
    #modalContent {
        font-size: 12px;
    }
    .loading {
        padding: 30px;
        font-size: 14px;
    }
}

/* 新增：证书链大气样式 */
.cert-chain-container {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f2f5;
}
.cert-chain-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cert-chain-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #2563eb;
    border-radius: 2px;
}
.cert-chain-item {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
}
.cert-chain-item:last-child {
    margin-bottom: 0;
}
.cert-chain-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e5e7eb;
}
.cert-chain-item:first-child::before {
    background: #2563eb;
}
.cert-chain-item h5 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}
.cert-chain-item .cert-meta {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 4px 0;
}
.cert-chain-item .cert-meta strong {
    color: #1f2937;
    font-weight: 500;
}
.cert-chain-status {
    margin-top: 12px;
    font-size: 14px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cert-chain-status.warning {
    color: #f59e0b;
}
.cert-empty-tip {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 20px;
}
/* 新增：检测结果提示样式（匹配截图） */
.ssl-result-tip {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
}
.ssl-tip-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.ssl-tip-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.ssl-tip-expire {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}