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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 20px;
    line-height: 1.6;
    color: #2d3748;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 顶部导航样式 */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    margin-bottom: 16px;
    padding: 8px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.top-nav li {
    margin: 0;
}

.top-nav a {
    display: block;
    padding: 12px 28px;
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.5px;
}

.top-nav a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: scale(1.05);
}

.top-nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.top-nav a.active::after {
    display: none;
}

/* 语言切换器样式 */
.lang-switcher {
    margin-left: 10px;
}

.lang-switcher select {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.lang-switcher select:hover {
    border-color: #667eea;
    color: #667eea;
}

.lang-switcher select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 头部样式 */
header {
    text-align: center;
    background: white;
    padding: 32px 32px;
    margin-bottom: 16px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.05em;
    color: #718096;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

/* 搜索区域 */
.search-section {
    background: white;
    border-radius: 30px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    position: relative;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

#ipInput {
    flex: 1;
    padding: 18px 24px;
    font-size: 16px;
    border: 3px solid #e2e8f0;
    border-radius: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f7fafc;
    color: #2d3748;
    font-weight: 500;
}

#ipInput:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

#ipInput::placeholder {
    color: #a0aec0;
}

button {
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icon {
    font-size: 1em;
}

.quick-actions {
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.4);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* 加载动画 */
.loading {
    background: white;
    border-radius: 30px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.loading p {
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
}

.spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示 */
.error {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: none;
    color: #c53030;
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(252, 182, 159, 0.3);
}

/* IP信息显示 */
.ip-info {
    background: white;
    border-radius: 30px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f7fafc;
}

.info-header h2 {
    color: #2d3748;
    font-size: 1.9em;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ip-type {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.info-item {
    padding: 18px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: none;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.info-item:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 15px 40px rgba(195, 207, 226, 0.4);
}

.info-label {
    font-size: 0.8em;
    color: #4a5568;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.info-value {
    font-size: 1.15em;
    color: #2d3748;
    font-weight: 700;
    word-break: break-all;
}

/* 地图容器 */
.map-container {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 3px solid #f7fafc;
}

.map-container h3 {
    color: #2d3748;
    margin-bottom: 14px;
    font-size: 1.4em;
    font-weight: 700;
}

.map-link {
    padding: 24px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: none;
    border-radius: 20px;
    font-size: 1em;
    box-shadow: 0 10px 30px rgba(252, 182, 159, 0.2);
}

.map-link p {
    color: #744210;
    margin-bottom: 16px;
    font-weight: 600;
}

.map-link a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.map-link a:hover {
    transform: translateX(8px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

/* 使用说明 */
.instructions {
    background: white;
    border-radius: 30px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.instructions h3 {
    color: #2d3748;
    margin-bottom: 18px;
    font-size: 1.5em;
    font-weight: 800;
}

.instructions ul {
    list-style-position: inside;
    margin-bottom: 18px;
    color: #4a5568;
    font-size: 0.95em;
    line-height: 2;
}

.instructions li {
    padding: 6px 0;
    color: #2d3748;
    font-weight: 500;
}

.api-notice {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 0.95em;
    color: #2d3748;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(168, 237, 234, 0.3);
}

.api-notice strong {
    color: #2d3748;
}

.api-notice a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
}

.api-notice a:hover {
    text-decoration: underline;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 28px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    font-weight: 500;
}

footer p {
    margin: 6px 0;
}

footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 8px;
}

footer a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 内容页面样式 (关于页面和隐私政策页面) */
.content-section {
    background: white;
    border-radius: 30px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.content-section p {
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.8;
    font-weight: 500;
}

.content-section h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 24px 0 16px 0;
    font-size: 1.6em;
    font-weight: 800;
}

.content-section h3 {
    color: #2d3748;
    margin: 20px 0 14px 0;
    font-size: 1.2em;
    font-weight: 700;
}

.content-section h4 {
    color: #2d3748;
    margin: 14px 0 10px 0;
    font-size: 1.05em;
    font-weight: 700;
}

.content-section ul {
    margin: 12px 0 16px 28px;
    line-height: 1.9;
}

.content-section li {
    color: #2d3748;
    margin: 8px 0;
    font-weight: 500;
}

.content-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.content-section a:hover {
    color: #764ba2;
}

.policy-section,
.about-section {
    margin-bottom: 24px;
}

.last-updated {
    color: #4a5568;
    font-size: 0.9em;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: none;
    border-radius: 16px;
    font-weight: 600;
}

.policy-notice,
.disclaimer {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: none;
    padding: 16px 20px;
    border-radius: 16px;
    margin: 16px 0;
    box-shadow: 0 10px 30px rgba(252, 182, 159, 0.2);
}

.policy-notice p,
.disclaimer ul {
    color: #744210;
    margin: 0;
    font-weight: 600;
}

.policy-notice strong {
    color: #744210;
}

.back-link {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 3px solid #f7fafc;
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.back-link a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* 功能网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 18px 0;
}

.feature-item {
    padding: 22px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.feature-item:nth-child(2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.feature-item:nth-child(3) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 10px 30px rgba(67, 233, 123, 0.3);
}

.feature-item:hover {
    transform: translateY(-12px) rotate(3deg) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.feature-item h3 {
    color: #fff;
    font-size: 1.2em;
    margin: 12px 0 10px 0;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-item p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9em;
    margin: 0;
    font-weight: 600;
}

/* 使用场景列表 */
.use-cases {
    list-style: none;
    margin: 16px 0;
    padding: 0;
}

.use-cases li {
    padding: 14px 18px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    border-radius: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(168, 237, 234, 0.3);
    transition: all 0.3s ease;
}

.use-cases li:hover {
    transform: translateX(8px);
}

.use-cases strong {
    color: #2d3748;
}

/* 更新日志 */
.changelog {
    margin: 16px 0;
}

.changelog-item {
    padding: 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: none;
    border-radius: 20px;
    margin-bottom: 16px;
    border-left: 6px solid #f5576c;
    box-shadow: 0 10px 30px rgba(252, 182, 159, 0.2);
    transition: all 0.3s ease;
}

.changelog-item:hover {
    transform: translateX(8px);
}

.changelog-item h4 {
    color: #2d3748;
    margin-top: 0;
    font-weight: 800;
    font-size: 1.2em;
}

.changelog-item ul {
    margin: 12px 0 0 24px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 20px 12px;
    }

    /* 导航移动端适配 */
    .top-nav {
        padding: 10px 16px;
        border-radius: 40px;
    }

    .top-nav ul {
        gap: 8px;
    }

    .top-nav a {
        padding: 10px 20px;
        font-size: 13px;
    }

    .lang-switcher {
        margin-left: 6px;
    }

    .lang-switcher select {
        padding: 6px 12px;
        font-size: 12px;
        padding-right: 28px;
    }

    header {
        padding: 40px 24px;
        border-radius: 24px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .search-section {
        padding: 24px;
        border-radius: 24px;
    }

    .search-box {
        flex-direction: column;
    }

    #ipInput {
        padding: 16px 20px;
    }

    button {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .info-header h2 {
        font-size: 1.8em;
    }

    .ip-info,
    .instructions {
        padding: 24px;
        border-radius: 24px;
    }

    /* 内容页面移动端优化 */
    .content-section {
        padding: 24px;
        border-radius: 24px;
    }

    .content-section h2 {
        font-size: 1.5em;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    /* 小屏幕导航优化 */
    .top-nav {
        padding: 8px 12px;
        border-radius: 30px;
    }

    .top-nav ul {
        gap: 6px;
        flex-wrap: wrap;
    }

    .top-nav a {
        padding: 8px 16px;
        font-size: 12px;
    }

    .lang-switcher {
        margin-left: 4px;
    }

    .lang-switcher select {
        padding: 6px 10px;
        font-size: 11px;
        padding-right: 24px;
    }

    header {
        padding: 32px 20px;
        border-radius: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .info-header h2 {
        font-size: 1.5em;
    }

    /* 小屏幕内容页面优化 */
    .content-section {
        padding: 20px;
        border-radius: 20px;
    }

    .content-section h2 {
        font-size: 1.3em;
    }

    .content-section ul {
        margin-left: 20px;
    }

    .back-link a {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
    }
}
