:root {
    --primary-color: #5a6f90;
    --secondary-color: #4a5a77;
    --light-color: #f8f9fa;
    --dark-color: #2d3748;
    --native-color: #2e7d32;
    --non-native-color: #f57c00;
    --success-color: #4caf50;
    --error-color: #f44336;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.header h1 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    background-color: white;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 500;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 10px;
}

.card-body {
    padding: 25px;
}

.ip-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.info-label {
    font-weight: 600;
    color: #5a6f90;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-value {
    font-size: 1rem;
    word-break: break-word;
}

.ip-native {
    color: var(--native-color);
    font-weight: 500;
}

.copyable {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
    transition: all 0.2s;
}

.copyable::after {
    content: "⎘";
    position: absolute;
    right: 0;
    top: 0;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.copyable:hover::after {
    opacity: 1;
    background-color: #f0f7ff;
}

.search-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.search-input {
    border-radius: 8px;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 111, 144, 0.2);
}

.search-btn {
    border-radius: 8px;
    padding: 12px 25px;
    background-color: var(--primary-color);
    border: none;
    font-weight: 500;
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.2em;
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    background-color: #fde8e8;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 10px;
}

.no-result {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
}

@media (max-width: 768px) {
    .ip-info-grid {
        grid-template-columns: 1fr;
    }
}

.ip-broadcast {
    color: var(--non-native-color);
    font-weight: 500;
}

.unknown-value {
    color: #9e9e9e;
    font-style: italic;
}

#search-btn {
    transition: all 0.3s ease;
    position: relative;
    /* 添加相对定位 */
}

#search-btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    /* 默认隐藏 */
}

#search-btn-loader .spinner-border {
    color: white;
    width: 1.5rem;
    height: 1.5rem;
}

#search-btn.loading #search-btn-content {
    visibility: hidden;
}

#search-btn.loading #search-btn-loader {
    display: block;
    /* 加载状态时显示 */
}

/* 返回顶部按钮基础样式 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    display: none;
    z-index: 999;
    background-color: var(--primary-color);
    border: none;
    opacity: 0.8;
    transition: all 0.3s;
}

/* 大屏（≥769px）：按百分比定位 */
@media (min-width: 769px) {
    #back-to-top {
        right: 10%;
        /* 距离右侧10%的宽度 */
    }
}

/* 小屏（≤768px）：固定右侧 */
@media (max-width: 768px) {
    #back-to-top {
        right: 20px;
        /* 固定距离右侧20px */
    }
}

/* 悬停效果 */
#back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    background-color: var(--secondary-color);
}

/* 移动端专属样式 (≤768px) */
@media (max-width: 768px) {

    /* 搜索框样式 */
    .search-input {
        padding: 12px 15px;
        border-radius: 8px !important;
        margin-bottom: 8px;
        /* 添加底部间距 */
    }

    /* 按钮样式 */
    #search-btn {
        padding: 12px;
        border-radius: 8px !important;
    }

    /* 加载动画位置调整 */
    #search-btn-loader {
        transform: translate(-50%, -50%) !important;
    }

    /* 容器内边距调整 */
    .search-container {
        padding: 15px !important;
    }
}

.search-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 30px;
    /* 移动端保持全宽 */
    width: 100%;
}

@media (min-width: 768px) {
    .search-container {
        max-width: 600px;
        /* 桌面端限制宽度 */
        margin-left: auto;
        margin-right: auto;
        padding: 25px 40px;
        /* 增加左右内边距 */
    }

    /* 输入框在桌面端适当加宽 */
    .search-input {
        padding: 12px 30px;
    }
}

/* 文字居中 */
.search-input {
    text-align: center;
}

.search-input::placeholder {
    text-align: center;
}

/* 按钮样式微调 */
.search-btn {
    min-width: 100px;
    /* 保持按钮最小宽度 */
}

/* 只针对我的网络信息卡片 */
.card.my-network-info .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 我的网络信息卡片的截图按钮 */
.card.my-network-info #screenshot-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transition: all 0.2s;
}

.card.my-network-info #screenshot-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

button#screenshot-btn {
    font-size: 16px;
}


/* 查询结果截图按钮样式 */
#result-screenshot-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transition: all 0.2s;
}

#result-screenshot-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #result-title {
        max-width: 200px;
        display: inline-block;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #result-screenshot-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

button#result-screenshot-btn {
    font-size: 16px;
}

.notification-center {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
}

.notification {
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid #4CAF50;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    display: flex;
    align-items: center;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    border-left-color: #f44336;
}

.notification-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.notification-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}