/* 乐爱网址导航 - 主样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 顶部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo img {
    height: 50px;
}

.weather {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.time {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
}

.user-link img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.login-btn, .register-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-btn {
    background: #667eea;
    color: #fff;
}

.register-btn {
    background: #fff;
    color: #667eea;
    border: 1px solid #667eea;
}

.login-btn:hover, .register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 搜索栏 */
.search-bar {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    margin: 20px 0;
}

.search-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
}

.search-logo img {
    height: 60px;
}

.search-box {
    flex: 1;
}

.search-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.search-tabs .tab {
    padding: 5px 15px;
    cursor: pointer;
    color: #666;
    border-radius: 15px;
    transition: all 0.3s;
}

.search-tabs .tab:hover {
    color: #667eea;
}

.search-tabs .tab.active {
    background: #667eea;
    color: #fff;
}

.search-input {
    display: flex;
    gap: 10px;
}

.search-input input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input input:focus {
    outline: none;
    border-color: #667eea;
}

.search-input button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s;
}

.search-input button:hover {
    transform: translateY(-2px);
}

.search-input button img {
    width: 20px;
    height: 20px;
}

/* 默认站点 */
.default-sites {
    background: rgba(255, 255, 255, 0.95);
    max-width: 1200px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 500;
}

.section-header .sub {
    font-size: 14px;
    opacity: 0.8;
    margin-left: 10px;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    opacity: 0.8;
}

.sites-list {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 15px;
}

.site-item {
    width: calc(12.5% - 15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    background: #f8f9fa;
}

.site-item:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.site-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.site-item span {
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* 分类区块 */
.category-section {
    background: rgba(255, 255, 255, 0.95);
    max-width: 1200px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
}

.category-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.subcategory-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.subcategory-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 500;
}

.subcategory-link img {
    width: 24px;
    height: 24px;
}

.more-link {
    color: #999;
    font-size: 12px;
}

.more-link:hover {
    color: #667eea;
}

.site-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.site-links li a {
    color: #666;
    font-size: 13px;
    display: block;
    padding: 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-links li a:hover {
    color: #667eea;
}

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0 20px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.footer-item a {
    color: #667eea;
}

.footer-item a:hover {
    text-decoration: underline;
}

.run-time {
    color: #4CAF50;
    font-weight: bold;
}

/* 响应式 */
@media (max-width: 992px) {
    .category-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-item {
        width: calc(16.666% - 15px);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .search-content {
        flex-direction: column;
    }
    
    .category-content {
        grid-template-columns: 1fr;
    }
    
    .site-item {
        width: calc(25% - 15px);
    }
    
    .footer-content {
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .site-item {
        width: calc(50% - 15px);
    }
}
