/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* 全局样式 */
body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    color: #fff;
    min-height: 100vh;
    padding: 15px;
    background-attachment: fixed;
    overflow-x: hidden;
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.logo {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ff4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.tagline {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #e0e0ff;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    text-align: center;
    line-height: 1.5;
}

/* 顶部广告样式 */
.top-ads {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ad-banner {
    width: 150px;
    height: 30px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
    position: relative;
}

.ad-banner:hover {
    transform: translateY(-3px);
}

.ad-banner a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
}

/* 推荐区域样式 */
.recommendation-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.section-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff8c00;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.section-title i {
    color: #ffd700;
}

.website-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
}

.website-card {
    width: 100%;
    max-width: 150px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.website-card:hover {
    transform: scale(1.05);
}

.website-card a {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 0 5px;
}

/* 底部样式 */
.large-card-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

footer {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.footer-title {
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    margin-bottom: 15px;
    color: #ffd700;
    text-align: center;
}

.friend-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.friend-links a {
    color: #a0d2ff;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.friend-links a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.contact {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-top: 15px;
    text-align: center;
}

.contact a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 600;
}

.contact a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.copyright {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .recommendation-section, .large-card-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .website-grid {
        grid-template-columns: repeat(3, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .recommendation-section, .large-card-section {
        gap: 25px;
    }
    
    .website-grid {
        grid-template-columns: repeat(3, minmax(90px, 1fr));
    }
}

@media (max-width: 600px) {
    .logo {
        font-size: 2.2rem;
    }
    
    .website-grid {
        grid-template-columns: repeat(3, minmax(90px, 1fr));
    }
    
    .top-ads {
        gap: 10px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .website-grid {
        grid-template-columns: repeat(3, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .ad-banner {
        width: 140px;
        height: 28px;
    }
    
    .website-card {
        height: 28px;
    }
    
    .website-card:active, .ad-banner:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

@media (max-width: 360px) {
    .website-grid {
        grid-template-columns: repeat(3, minmax(70px, 1fr));
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .friend-links a {
        font-size: 12px;
        padding: 3px 6px;
    }
}

/* 性能优化 */
.perf-optimize {
    will-change: transform;
    transform: translateZ(0);
}