/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 网络状态指示器 */
.network-status {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffc107;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #28a745;
}

.status-dot.offline {
    background: #dc3545;
}

.status-text {
    font-weight: 500;
    font-size: 1.1rem;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    margin-bottom: 30px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 网站卡片样式 */
.site-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.site-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* 网站图标 */
.site-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 48px;
    max-height: 48px;
}

/* 默认图标样式 */
.site-icon .default-icon {
    width: 32px;
    height: 32px;
    opacity: 0.6;
}

.site-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.site-url {
    font-size: 0.9rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

.site-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.site-status.direct {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.site-status.proxy {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.site-status.blocked {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.site-status.accessible {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.site-status.checking {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 检测中的卡片样式 */
.site-card.checking {
    opacity: 0.8;
    border-color: rgba(59, 130, 246, 0.3);
}

.site-card.checking .site-icon img {
    opacity: 0.7;
}

/* 友链状态样式 */
.site-status.friendlink {
    background: linear-gradient(135deg, #5981b6, #3b39b1);
    color: white;
}

.site-card.friendlink {
    border-color: #9b59b6;
    background: linear-gradient(135deg, rgb(255, 255, 255), rgb(216, 213, 252));
}

.site-card.friendlink:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 148, 187, 0.3);
    border-color: #8e44ad;
}

/* 自动跳转提示样式 */
.auto-redirect-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-icon {
    font-size: 1rem;
}

/* 提示面板 */
.notice-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.notice-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.notice-text h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.notice-text p {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.6;
}

.notice-close {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.notice-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 页脚 */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .site-card {
        padding: 20px;
    }
    
    .notice-content {
        margin: 10px;
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .site-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .site-info {
        text-align: center;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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