/**
 * 线上版本：V4.1.03190911
 * 版本日期：2025-3-19
 * 更新日志：添加分支显示
 */
:root {
    --primary: #2c7be5;
    --secondary: #6e84a3;
    --success: #38a169;
    --background: #f9fbfd;
    --error: #dc3545;
    --card-shadow: 0 0.375rem 0.75rem rgba(15, 34, 58, .03);
    --radius-lg: 1rem;
    --radius-sm: 0.75rem;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background: var(--background);
    color: #2d3748;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主容器 */
.container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* 头部区域 */
.header {
    text-align: center;
    margin: 2rem 0;
}

.logo {
    width: min(220px, 60%);
    height: auto;
    margin-bottom: 1.5rem;
}

/* 搜索区域 */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#ipInput {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e3ebf6;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#ipInput:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, .1);
}

/* 查询按钮 */
#geetest {
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#geetest:hover {
    background: #255ab3;
}

#geetest:active {
    transform: scale(0.98);
}

/* 结果区域 */
#ipInfo {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin: 1.5rem auto;
    max-width: 600px;
    transform: translateY(20px);
    transition: all 0.4s ease;
    line-height: 1.6;
}

#ipInfo.show {
    opacity: 1;
    transform: translateY(0);
}

#ipInfo p {
    margin: 1rem 0;
    padding: 0.5rem 0;
    color: #2d3748;
    border-bottom: 1px solid #edf2f7;
}

#ipInfo p:first-child {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

#ipInfo p:last-child {
    border-bottom: none;
    color: var(--success);
    font-weight: 500;
}

#ipInfo a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

#ipInfo a:hover {
    color: #255ab3;
    text-decoration: underline;
}

#ipInfo img {
    vertical-align: middle;
    margin-left: 0.75rem;
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    max-width: 120px;
    height: auto;
}

/* 错误提示 */
.error-message {
    background: #fff5f5;
    color: var(--error);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #ffb8b8;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* 加载动画 */
.loader {
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 页脚 */
footer {
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #eaeff5;
    margin-top: auto;
    padding: 1.5rem 0;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.875rem;
    color: #5c6c80;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer-links a {
    color: #5c6c80;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.footer-links img {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.3em;
}

footer span.ml-50 {
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

footer span.text-nowrap {
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.svg-inline--fa.fa-code-branch {
    width: 1em !important;  /* 保持图标比例 */
    height: 1em !important;
    vertical-align: -0.15em;  /* 精细对齐调整 */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

/* 响应式设计 */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .search-box {
        padding: 1.5rem;
    }

    .input-group {
        flex-direction: column;
    }

    #geetest {
        width: 100%;
    }

    #ipInfo {
        margin: 1rem;
        padding: 1.25rem;
    }

    #ipInfo p {
        font-size: 0.875rem;
    }

    #ipInfo p:first-child {
        font-size: 1rem;
    }

    #ipInfo img {
        max-width: 80px;
        display: block;
        margin: 0.5rem 0;
    }

    .footer-links {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
        footer span.ml-50 {
        margin-left: 1.5rem;
        gap: 0.3rem;
    }
    .svg-inline--fa.fa-code-branch {
        width: 0.9em !important;
        height: 0.9em !important;
    }
}
/* 鼠标悬停效果 */
footer span.ml-50:hover {
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}