* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    padding-bottom: 70px;
    position: relative;
    transition: margin-left 0.3s ease;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(-250px);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-icon {
    width: 24px;
    height: 24px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #777;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    padding: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: #f5f5f5;
    border-left-color: #4285f4;
}

.sidebar-menu a.active {
    background-color: #e8f0fe;
    border-left-color: #4285f4;
    color: #4285f4;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #3a7bc8;
    transform: scale(1.05);
}

/* 当侧边栏打开时，内容区域右移 */
body.sidebar-open {
    margin-left: 250px;
}

/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.container {
    width: 100%;
    max-width: 800px;
}

.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 35px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.title {
    text-align: center;
    font-size: 2.2rem;
    color: #4a4848;
    margin-bottom: 8px;
    font-weight: 500;
}

.subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.search-box {
    display: flex;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.ip-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #eaeaea;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.ip-input:focus {
    border-color: #4a90e2;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.query-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.query-btn:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
}

.query-btn:active {
    transform: translateY(1px);
}

.result-container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.result-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-row {
    display: flex;
    margin-bottom: 20px;
    gap: 20px;
}

.result-item {
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-radius: 10px;
    background-color: #f9f9f9;
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.full-width {
    flex: 2;
}

.icon-container {
    width: 40px;
    height: 40px;
    background-color: #e6f0fd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: #4a90e2;
}

.info {
    flex: 1;
}

.label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4a90e2;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    padding: 15px;
    background-color: #fde8e7;
    border-radius: 8px;
    margin-top: 20px;
}

.error-message i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .result-row {
        flex-direction: column;
        gap: 10px;
    }

    .card {
        padding: 25px;
    }

    .title {
        font-size: 2rem;
    }

    /* 移动端侧边栏样式调整 */
    .sidebar {
        width: 80%;
        max-width: 300px;
        transform: translateX(-100%);
    }

    body.sidebar-open {
        margin-left: 0;
    }

    .sidebar-toggle {
        width: 36px;
        height: 36px;
        left: 10px;
        top: 10px;
    }
}

/* 动效 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.result-row:nth-child(1) .result-item {
    animation-delay: 0.1s;
}

.result-row:nth-child(2) .result-item {
    animation-delay: 0.2s;
}

.result-row:nth-child(3) .result-item {
    animation-delay: 0.3s;
}

.result-row:nth-child(4) .result-item {
    animation-delay: 0.4s;
}

.result-row:nth-child(5) .result-item {
    animation-delay: 0.5s;
}

/* 撒花效果样式 */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 1000;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    animation: confetti-fall 3s ease-out forwards;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #eaeaea;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #fff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-link {
    color: black;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 300;
}

.footer-link:hover {
    color: black;
    transform: scale(1.05);
    display: inline-block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer {
        padding: 15px 0;
    }

    body {
        padding-bottom: 60px;
    }
}