/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 图片优化样式 */
.optimized-img {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(10px);
}

.optimized-img.loaded {
    opacity: 1;
    transform: translateY(0);
}

.optimized-img.error {
    opacity: 1;
    transform: translateY(0);
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航栏 */
.header {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.logo span {
    font-size: 12px;
    color: #ff6b00;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin: 0 15px;
}

.nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: #ff6b00;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-box button {
    background-color: #ff6b00;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #e55a00;
}

/* 英雄区 */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=AC%20Milan%20San%20Siro%20stadium%20night%20match%20with%20floodlights%20illuminated%20red%20and%20black%20colors%20crowd%20cheering%20high%20quality%20photorealistic&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: #ff6b00;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #e55a00;
}

/* 通用区块样式 */
section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    color: #333;
}

.more-link {
    color: #ff6b00;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.more-link:hover {
    color: #e55a00;
}

/* 最新新闻 */
.news {
    background-color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-content .category {
    display: inline-block;
    background-color: #ff6b00;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.news-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    color: #ff6b00;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s;
}

.read-more:hover {
    color: #e55a00;
}

/* 赛事信息 */
.matches {
    background-color: #f5f5f5;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.match-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.match-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.match-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-date {
    font-size: 14px;
    color: #666;
    width: 100px;
}

.match-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.team {
    text-align: center;
}

.team-name {
    font-weight: bold;
    font-size: 16px;
}

.vs {
    color: #ff6b00;
    font-weight: bold;
}

.match-time {
    font-size: 14px;
    color: #333;
    width: 80px;
    text-align: center;
}

.match-stadium {
    font-size: 14px;
    color: #666;
    width: 150px;
    text-align: right;
}

/* 球队阵容 */
.teams {
    background-color: #fff;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.player-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s;
}

.player-card:hover {
    transform: translateY(-5px);
}

.player-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.player-info {
    padding: 20px;
}

.player-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.player-info .position {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.player-info .number {
    display: inline-block;
    background-color: #ff6b00;
    color: #fff;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

/* 视频集锦 */
.videos {
    background-color: #f5f5f5;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.video-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.play-btn {
    display: inline-block;
    background-color: #ff6b00;
    color: #fff;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 20px;
    transition: transform 0.3s;
}

.play-btn:hover {
    transform: scale(1.1);
}

.video-info {
    background-color: #fff;
    padding: 15px;
}

.video-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.video-duration {
    font-size: 12px;
    color: #666;
}

/* 赞助商 */
.sponsors {
    background-color: #fff;
    padding: 40px 0;
}

.sponsors h3 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    align-items: center;
    justify-items: center;
}

.sponsor-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.sponsor-item img:hover {
    opacity: 1;
}

/* 页脚 */
.footer {
    background-color: #000;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #ff6b00;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ff6b00;
}

.footer-section p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ff6b00;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    transition: background-color 0.3s, transform 0.3s;
}

.social-links a:hover {
    background-color: #ff6b00;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: #ccc;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease-in-out;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #ff6b00;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.modal-body {
    line-height: 1.6;
    color: #333;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

.modal-footer {
    margin-top: 30px;
    text-align: right;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.close-btn {
    background-color: #ff6b00;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: #e55a00;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .match-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .match-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .match-stadium {
        text-align: center;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .news-grid,
    .players-grid {
        grid-template-columns: 1fr;
    }
}