/* 重置和基础样式 */
:root {
    --primary-color: #7b68ee;
    --primary-dark: #5b43ea;
    --secondary-color: #ff6b6b;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #e6e6e6;
    --text-light: #b0b0b0;
    --border-color: #2d4059;
    --success-color: #4cd964;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(123, 104, 238, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-top: 20px;
}

.header h1 {
    font-size: 2.8rem;
    background: linear-gradient(to right, #7b68ee, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.header h2 {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 30px;
}

.badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 5px 10px;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

/* 搜索区域 */
.search-container {
    max-width: 700px;
    margin: 0 auto 40px;
    position: relative;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 18px 25px 18px 60px;
    font-size: 1.1rem;
    background: rgba(22, 33, 62, 0.8);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.2);
}

.search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.search-hint {
    margin-top: 10px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: white;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

/* 服务器列表 */
.server-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-title h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h3 i {
    color: var(--primary-color);
}

.server-count {
    background: var(--primary-dark);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.server-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 自定义滚动条 */
.server-list::-webkit-scrollbar {
    width: 8px;
}

.server-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.server-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.server-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid transparent;
}

.server-item:hover {
    background: rgba(123, 104, 238, 0.1);
    border-color: rgba(123, 104, 238, 0.3);
    transform: translateX(5px);
}

.server-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.server-id {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--border-color);
}

/* 联系方式卡片 */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: white;
    font-size: 1.3rem;
}

.contact-card h4 i {
    color: var(--primary-color);
}

.contact-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.contact-info span {
    font-weight: 600;
    font-size: 1.1rem;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.contact-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 页脚 */
.footer {
    background: rgba(22, 33, 62, 0.8);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
    backdrop-filter: blur(10px);
}

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

.footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer p:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .server-list {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        padding: 15px 20px 15px 50px;
        font-size: 1rem;
    }
    
    .server-container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .badge {
        padding: 6px 15px;
        font-size: 0.8rem;
        margin: 0 3px 8px;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 加载动画 */
.loader {
    display: none;
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.loader i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* 更新提示 */
.update-info {
    background: rgba(76, 217, 100, 0.1);
    border: 1px solid rgba(76, 217, 100, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.update-info i {
    color: var(--success-color);
    font-size: 1.5rem;
}

/* Toast样式 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 1000;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success-color);
    font-size: 1.2rem;
}

/* 辅助样式 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}