* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /* 蓝色主色调渐变天空 */
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.2), transparent 50%),
        /* 像素方块感的随机分布方块 */
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 2px, transparent 2px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 2px, transparent 2px, transparent 4px),
        linear-gradient(to bottom, #70bfff, #3169b4);
    /* Minecraft天空蓝渐变 */

    background-blend-mode: screen, screen, normal, normal, normal;
    background-size: cover, cover, 100px 100px, 100px 100px, cover;
    background-attachment: fixed;
    background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;

    color: #f0f0f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    user-select: none;
    cursor: default;
}


main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    width: 100%;

    background-color: rgba(20, 30, 70, 0.6);
    /* 半透明深蓝 */
    backdrop-filter: blur(8px);
    /* 背景模糊 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

header {
    background-color: rgba(10, 20, 40, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4fc3f7;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4fc3f7;
    background-color: rgba(79, 195, 247, 0.1);
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #ffffff;
}

.page-title h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-title p {
    color: #a0c8ff;
    font-size: 1.2rem;
}

.servers-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.server-card {
    background: linear-gradient(135deg, rgba(40, 50, 90, 0.95), rgba(60, 70, 110, 0.85));
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        background 0.4s ease;
    overflow: hidden;
    position: relative;
}

/* 悬停效果：上浮 + 背景渐变 + 阴影增强 */
.server-card:hover {
    transform: translateY(-6px);
    /* 轻微上浮 + 微放大 */
    background: linear-gradient(135deg, rgba(55, 65, 105, 0.95), rgba(75, 85, 125, 0.9));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3), 0 0 15px rgba(79, 195, 247, 0.2);
}

/* 初始动画 */
.server-card.fade-in-up {
    opacity: 0;
    transform: translateY(12px);
    /* 初始轻微下移 */
    transition: all 0.4s ease-out;
}

.server-card.fade-in-up.show {
    opacity: 1;
    transform: translateY(0);
    /* 到达自然位置 */
}

/* hover 叠加上浮 */
.server-card.fade-in-up.show:hover {
    transform: translateY(-6px) scale(1.02);
}

.server-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3a5fcd, #4a6fd5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2rem;
    flex-shrink: 0;
    font-size: 2rem;
    color: white;
    box-shadow: 0 0 20px rgba(58, 95, 205, 0.5);
}

.server-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.server-info {
    flex-grow: 1;
}

.server-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #4fc3f7;
}

.server-detail {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.server-detail i {
    width: 24px;
    margin-right: 10px;
    color: #a0c8ff;
}

.server-detail span {
    font-weight: 500;
}

.server-ip {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.server-link {
    color: #4fc3f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.server-link:hover {
    color: #29b6f6;
    text-decoration: underline;
}

footer {
    background-color: rgba(10, 20, 40, 0.9);
    text-align: center;
    padding: 1.5rem;
    color: #a0c8ff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .server-card {
        flex-direction: column;
        text-align: center;
    }

    .server-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .server-detail {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }
}

.copy-tooltip {
    position: absolute;
    background: rgba(50, 50, 50, 0.75);
    /* 灰色半透明 */
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(0);
    /* 初始位置 */
    transition: opacity 0.3s ease, transform 0.6s ease;
    z-index: 2000;
}

/* 加载中和无结果提示动画 */
.loading.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.loading.fade-in-up.show {
    opacity: 1;
    transform: translateY(0);
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: #a0c8ff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.loading.show {
    opacity: 1;
    transform: translateY(0);
}

/* 汉堡按钮默认隐藏，大屏不显示 */
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #4fc3f7;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(10, 20, 40, 0.95);
        position: absolute;
        top: 100%;
        margin: auto
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    nav {
        position: relative;
    }

    .nav-links li {
        margin: 1rem 0;
        text-align: center;
    }
}

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.toast-message {
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    font-size: 14px;
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.server-search {
    display: flex;
    justify-content: center;
    margin: 1.5rem auto 2rem;
    max-width: 500px;
    width: 100%;
}

/* 搜索输入框统一风格 */
.server-search input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    outline: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition:
        transform 0.2s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}

/* placeholder */
.server-search input::placeholder {
    color: #a0c8ff;
}

/* 悬停效果 */
.server-search input:hover {
    transform: translateY(-2px) scale(1.01);
    /* 轻微上浮 + 微放大 */
    background: rgba(255, 255, 255, 0.18);
    /* 背景微亮 */
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.3);
}

/* 聚焦效果 */
.server-search input:focus {
    color: #4fc3f7;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.3);
}

/* 搜索按钮统一风格 */
.server-search button {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 0 1rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1.2rem;
    color: #a0c8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.2s ease,
        background 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

/* 悬停 + 聚焦效果 */
.server-search button:hover {
    transform: translateY(-2px) scale(1.01);
    color: #4fc3f7;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 6px rgba(79, 195, 247, 0.3);
    /* 蓝光光晕 */
}

/* 刷新按钮：左圆角，右平角 */
#query-server-refresh-btn {
    border-radius: 0 8px 8px 0;
    /* 仅需平滑衔接，可根据情况微调 */
}

#query-server-clear-btn {
    border-radius: 0;
}

/* 覆盖层 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 30, 70, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s;
}

/* 弹窗容器 */
.confirm-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(40, 50, 90, 0.95), rgba(60, 70, 110, 0.85));
    color: #a0c8ff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 80vw;
    max-height: 80vh;
    width: 500px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

/* 标题 */
.confirm-header {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* 内容区域 */
.confirm-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 底部按钮 */
.confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* 按钮 */
.confirm-btn {
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #f0f0f0;
}

.confirm-btn.ok {
    background: #2c3e80;
}

.confirm-btn.ok:hover {
    background: #3a52a0;
}

.confirm-btn.cancel {
    background: #4b4b4b;
}

.confirm-btn.cancel:hover {
    background: #666;
}

/* Markdown 样式 */
.confirm-content h1 {
    font-size: 1.8em;
    margin: 0.6em 0;
    font-weight: bold;
}

.confirm-content h2 {
    font-size: 1.6em;
    margin: 0.6em 0;
    font-weight: bold;
}

.confirm-content h3 {
    font-size: 1.4em;
    margin: 0.6em 0;
    font-weight: bold;
}

.confirm-content h4 {
    font-size: 1.2em;
    margin: 0.5em 0;
}

.confirm-content h5 {
    font-size: 1em;
    margin: 0.5em 0;
}

.confirm-content h6 {
    font-size: 0.9em;
    margin: 0.4em 0;
    color: #888;
}

.confirm-content p {
    margin: 0.4em 0;
    line-height: 1.6;
}

.confirm-content strong {
    font-weight: bold;
    color: #f0f0f0;
}

.confirm-content em {
    font-style: italic;
    color: #ffa7c4;
}

.confirm-content code {
    background: #2d2d2d;
    color: #ffcb6b;
    padding: 2px 4px;
    border-radius: 4px;
}

.confirm-content pre {
    background: #1e1e1e;
    color: #dcdcdc;
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
}

.confirm-content ul {
    margin: 0.5em 0 0.5em 1.2em;
    list-style-type: disc;
}

.confirm-content li {
    margin: 0.2em 0;
}

.confirm-content table {
    border-collapse: collapse;
    margin: 0.6em 0;
    width: 100%;
}

.confirm-content th,
.confirm-content td {
    border: 1px solid #3a52a0;
    padding: 4px 8px;
}

.confirm-content thead td {
    font-weight: bold;
    background: #222a60;
}

.confirm-content input::placeholder,
.confirm-content textarea::placeholder {
    color: #a0c8ff;
}

.confirm-content input:focus,
.confirm-content textarea:focus {
    border-color: #4fc3f7;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 30px;
    color: #a0c8ff;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #29b6f6;
}

/* 默认弹窗输入框样式 */
.confirm-content input,
.confirm-content textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border: 1px solid #3a52a0;
    background: rgba(255, 255, 255, 0.1);
    /* 半透明白色背景 */
    color: #fff;
    font-size: 1rem;
    outline: none;
    resize: vertical;
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease,
        border 0.3s ease;
}

/* placeholder 颜色 */
.confirm-content input::placeholder,
.confirm-content textarea::placeholder {
    color: #a0c8ff;
}

/* hover 和 focus */
.confirm-content input:hover,
.confirm-content input:focus,
.confirm-content textarea:hover,
.confirm-content textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4fc3f7;
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.4);
}

.tool-input {
    width: 100%;
    padding: 0.4rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border: 1px solid #3a52a0;
    color: #fff;
    background: #2a2a2a;
    resize: vertical;
    min-height: 80px;
}

.tool-output {
    margin-top: 10px;
    padding: 3rem !important;
    color: #fff;
    background: #1e1e1e;
    border-radius: 6px;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#tool-output #qrcode {
    display: flex;
    justify-content: center;
    /* 水平居中 */
}

.server-delete-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0c8ff;
    font-size: 25px;
}

.server-delete-btn:hover {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #4fc3f7;
    font-size: 25px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3), 0 0 15px rgba(79, 195, 247, 0.2);
}

.announcement-bar {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: transform 0.6s ease-in-out;
    position: relative;
}

#announcement-list li {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 居中文字 */
    white-space: nowrap;
    cursor: default;
    transition: color 0.3s;
}

#announcement-list li.clickable {
    color: #4fc3f7 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

#announcement-list li.clickable:hover {
    cursor: pointer;
    color: #29b6f6 !important;
    text-decoration: underline;
}

#announcement-list li:hover.clickable {
    text-decoration: underline;
}