/* 半透明液态玻璃风格样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fefcf3 0%, #faf8f0 50%, #f5f3ed 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6b5b47;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: #8a7a66;
    font-weight: 400;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #6b5b47;
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.filter-toggle input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #6b5b47;
}

.error {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #d32f2f;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.site-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.site-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.45);
}

.site-card.offline {
    background: rgba(255, 200, 200, 0.3);
    border: 1px solid rgba(255, 200, 200, 0.5);
}

.site-card.offline:hover {
    background: rgba(255, 200, 200, 0.4);
}

.site-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a3f32;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

.site-card.offline .site-name {
    color: #8b3a3a;
}

.site-description {
    font-size: 0.9rem;
    color: #6b5b47;
    line-height: 1.4;
    margin-bottom: 12px;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

.site-description.expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: none;
}

.site-card.offline .site-description {
    color: #8b4a4a;
}

.description-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 300px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    word-wrap: break-word;
}

.site-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.6);
}

.site-card.offline .status-indicator {
    background: #f44336;
    box-shadow: 0 0 4px rgba(244, 67, 54, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .title {
        font-size: 2rem;
    }

    .site-card {
        padding: 20px;
    }
}

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

.site-card {
    animation: fadeInUp 0.6s ease-out;
}

.site-card:nth-child(even) {
    animation-delay: 0.1s;
}

.site-card:nth-child(3n) {
    animation-delay: 0.2s;
}
