* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 禁止页面横向溢出，消除底部滚动条 */
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}
.site-header {
    text-align: center;
    margin-bottom: 40px;
}
.site-header h1 {
    font-size: 42px;
    color: #2563eb;
    margin-bottom: 8px;
}
.site-header p {
    color: #666;
    font-size: 16px;
}
.ip-check-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
#ip-input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}
#search-btn {
    padding: 0 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}
#search-btn:hover {
    background: #1d4ed8;
}
.my-ip-tip {
    color: #666;
}
#self-ip {
    color: #2563eb;
    font-weight: bold;
}
.result-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}
.hidden {
    display: none;
}
.result-content {
    margin-top: 15px;
    font-size: 17px;
    line-height: 2;
}
.api-desc {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}
.api-desc h4 {
    margin-bottom: 12px;
    color: #222;
}
.api-desc p {
    margin: 6px 0;
    color: #444;
}
code {
    display: block;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    color: #e11d48;
    overflow-x: auto;
    white-space: pre-wrap; /* 修复：禁止强制不换行，窄屏自动折行 */
}
.site-footer {
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* 应用场景卡片 */
.scene-wrap {
    margin: 40px 0;
}
.scene-title {
    font-size: 22px;
    margin-bottom: 24px;
    font-weight: 600;
    color: #222;
}
.scene-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.scene-card {
    background: #f7f8fa;
    border-radius: 12px;
    padding: 24px;
    word-break: break-all;
}
.scene-icon {
    font-size: 26px;
    margin-bottom: 12px;
}
.scene-card h5 {
    font-size: 17px;
    margin: 0 0 12px 0;
    color: #111;
}
.scene-card p {
    font-size: 14px;
    color: #444;
    line-height: 1.65;
    margin: 0;
}

/* 导航栏全局样式（同步nav.php样式，统一适配） */
.site-nav {
    background: #2563eb;
    width: 100%;
}
.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 30px;
    padding: 0 15px;
    width:100%;
}
.nav-logo a {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
}
.nav-menu {
    display: flex;
    gap: 24px;
}
.nav-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
    border-bottom: 3px solid #fff;
    padding-bottom: 18px;
}

/* 768px 手机基础适配 */
@media screen and (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }
    .site-header {
        margin-bottom: 22px;
    }
    .site-header h1 {
        font-size: 26px;
    }
    .ip-check-box,
    .result-box,
    .api-desc {
        padding: 16px 14px;
    }
    .input-group {
        flex-direction: column;
        gap: 12px;
    }
    #search-btn {
        padding: 12px;
    }
    .result-content {
        font-size: 15px;
        line-height: 1.7;
    }
    .scene-grid {
        grid-template-columns: 1fr;
    }
    /* 导航手机适配 */
    .nav-inner {
        height: auto;
        flex-direction: column;
        padding: 12px 15px;
        gap:12px;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap:16px;
        width:100%;
    }
    .nav-menu a:hover,
    .nav-menu a.active {
        padding-bottom:4px;
    }
}

/* 480px 超小屏/折叠屏二次优化 */
@media screen and (max-width: 480px) {
    .container {
        padding: 10px 8px;
    }
    .site-header h1 {
        font-size: 22px;
    }
    .scene-card {
        padding: 16px;
    }
    .scene-title {
        font-size: 18px;
    }
    .nav-logo a {
        font-size: 18px;
    }
}
/* 友情链接样式 */
.friend-link-box {
    margin: 50px 0 30px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 10px;
}
.fl-title {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 16px 0;
    border-left: 4px solid #2563eb;
    padding-left: 10px;
}
.fl-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-bottom: 12px;
}
.fl-list a {
    color: #2563eb;
    text-decoration: none;
    transition: 0.2s;
}
.fl-list a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.fl-tips {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
.fl-tips a {
    color: #2563eb;
}