/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
}

/* 标题样式 */
h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

/* IPv4 和 IPv6 组，强制单行布局 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap; /* 关键点：不换行 */
    max-width: 1200px;
    margin: auto;
    overflow-x: auto; /* 让页面可滚动，防止挤压 */
    padding-bottom: 10px;
}

/* IP 信息卡片 */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    text-align: center;
    transition: transform 0.3s;
    flex-shrink: 0; /* 关键点：防止卡片被挤压 */
}

.card:hover {
    transform: translateY(-5px);
}

/* IP 地址显示 */
.ip {
    font-size: 22px;
    font-weight: bold;
    color: #007bff;
    margin: 10px 0;
    word-break: break-word; /* 让 IPv6 地址换行 */
}

/* 额外信息 */
.info {
    font-size: 14px;
    color: #666;
}

/* 页脚 */
footer {
    margin-top: 30px;
    font-size: 14px;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 适配小屏幕：自动换行 */
@media (max-width: 1000px) {
    .container {
        flex-wrap: wrap;
    }
}
