* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    font-size: 18px;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #fb923c, #f97316);
}

.logo {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.logo-text {
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 4px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.search-box {
    display: flex;
    max-width: 900px;
    width: 95%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    padding: 18px 24px;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #ffffff;
    color: #1e293b;
    transition: all 0.3s ease;
}

.search-input:focus {
    background-color: #f8fafc;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    padding: 18px 45px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(0);
}

.main {
    flex: 1;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.result-container {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
}

.result-header {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    padding: 16px 20px;
    text-align: center;
    position: relative;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #3b82f6, #f97316);
}

.result-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 3px;
}

.result-content {
    padding: 0;
    max-height: none;
    overflow-y: visible;
}

.result-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    padding: 20px 32px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background-color 0.2s ease;
}

.result-row:hover {
    background-color: #f8fafc;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row:nth-child(even) {
    background-color: #fafbfc;
}

.result-row:nth-child(even):hover {
    background-color: #f1f5f9;
}

.result-label {
    color: #64748b;
    font-size: 19px;
    font-weight: 500;
    text-align: left;
}

.result-value {
    color: #1e293b;
    font-size: 19px;
    font-weight: 500;
    text-align: center;
    word-break: break-all;
}

#ipAddress {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 1px;
}

.result-value.badge {
    display: inline-block;
    padding: 7px 20px;
    border-radius: 24px;
    font-size: 17px;
    font-weight: 600;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-value.badge.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
}

.result-value.badge.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.result-value.badge.orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
}

.result-value.badge.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.result-value.line-badge {
    background: transparent;
    color: #2563eb;
    border: none;
    box-shadow: none;
    padding: 4px 0;
    border-bottom: 2px solid #2563eb;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
}

.result-value.circle-badge {
    background: #fff7ed;
    color: #ea580c;
    border: 2px solid #ea580c;
    box-shadow: none;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.result-value.badge.light-green {
    background: linear-gradient(135deg, #86efac 0%, #4ade80 100%);
    color: #166534;
}

.result-value.badge.yellow {
    background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
    color: #854d0e;
}

.result-link {
    color: #3b82f6;
    font-size: 19px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.result-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

#coordinates {
    font-family: 'Courier New', monospace;
    color: #2563eb;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-text {
    color: #94a3b8;
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #64748b;
    font-size: 15px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    margin-top: 0;
}

.footer p {
    margin-bottom: 5px;
}

.footer p:last-child {
    margin-bottom: 0;
}

.ad-banner-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.ad-banner {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.ad-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ad-img {
    width: 100%;
    height: auto;
    display: block;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .header {
        padding: 20px 15px;
    }

    .logo {
        margin-bottom: 15px;
    }

    .logo-text {
        font-size: 26px;
        letter-spacing: 2px;
    }

    .search-box {
        width: 100%;
        flex-direction: column;
        border-radius: 10px;
    }

    .search-input {
        padding: 15px 18px;
        font-size: 16px;
    }

    .search-btn {
        padding: 15px;
        font-size: 16px;
    }

    .main {
        padding: 15px;
    }

    .result-container {
        border-radius: 12px;
    }

    .result-row {
        grid-template-columns: 100px 1fr;
        padding: 14px 16px;
        gap: 8px;
    }

    .result-label {
        font-size: 14px;
    }

    .result-value {
        font-size: 14px;
        text-align: left;
    }

    .result-value.badge {
        margin: 0;
    }

    .result-link {
        font-size: 14px;
    }

    .ad-banner-container {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }

    /* 移动端悬浮客服调整 */
    .cs-float {
        right: 14px;
        bottom: 14px;
    }

    .cs-btn {
        width: 48px;
        height: 48px;
    }

    .cs-btn svg {
        width: 24px;
        height: 24px;
    }

    .cs-panel {
        width: 260px;
    }
}

/* ============ 悬浮客服 ============ */
.cs-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.cs-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
}

.cs-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(30, 64, 175, 0.45);
}

.cs-btn.active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.cs-btn-text {
    font-size: 11px;
    line-height: 1;
    margin-top: 2px;
    letter-spacing: 1px;
}

.cs-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 300px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.cs-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cs-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.cs-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.cs-close:hover {
    opacity: 1;
}

.cs-panel-body {
    padding: 16px;
}

.cs-tip {
    margin: 0 0 12px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}

.cs-tip-small {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 12px;
    color: #94a3b8;
}

.cs-item {
    display: flex;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #334155;
    word-break: break-word;
    overflow-wrap: break-word;
}

.cs-item-label {
    flex-shrink: 0;
    color: #64748b;
    font-weight: 500;
}

.cs-item-value {
    color: #1e40af;
    word-break: break-all;
    overflow-wrap: break-word;
    min-width: 0;
    flex: 1;
}

.cs-item-value.cs-link,
a.cs-item-value {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.2s ease;
}

a.cs-item-value:hover {
    color: #ea580c;
    text-decoration: underline;
}
