/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, 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;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #e30613;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Times New Roman', Times, serif;
}

.logo p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-style: italic;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Times New Roman', Times, serif;
}

nav a:hover {
    color: #e30613;
    background-color: rgba(227, 6, 19, 0.1);
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #e30613;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 80%;
}

/* 英雄区域样式 */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: 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%20classic%20view%2C%20floodlights%2C%20atmospheric%2C%20professional%20photography%2C%20high%20quality&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h2 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    font-family: 'Times New Roman', Times, serif;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-style: italic;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    background-color: #e30613;
    color: #fff;
    font-family: 'Times New Roman', Times, serif;
}

.btn:hover {
    background-color: transparent;
    border-color: #e30613;
    color: #e30613;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(227, 6, 19, 0.3);
}

/* 通用区块样式 */
section {
    padding: 100px 0;
    position: relative;
}

section:nth-child(even) {
    background-color: #fff;
}

section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    color: #000;
    position: relative;
    padding-bottom: 20px;
    font-family: 'Times New Roman', Times, serif;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: #e30613;
    border-radius: 2px;
}

/* 俱乐部新闻区块样式 */
.news-section {
    background-color: #f9f9f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.news-item:hover .news-img {
    transform: scale(1.05);
}

.news-item h3 {
    font-size: 1.5rem;
    margin: 20px;
    color: #000;
    line-height: 1.3;
    font-family: 'Times New Roman', Times, serif;
}

.news-item p {
    color: #666;
    margin: 0 20px 20px;
    line-height: 1.6;
}

.news-date {
    display: inline-block;
    margin: 0 20px 20px;
    padding: 5px 15px;
    background-color: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 赛事回顾区块样式 */
.matches-section {
    background-color: #fff;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.match-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.match-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #e30613;
}

.match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.team {
    flex: 1;
    text-align: center;
}

.team span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
}

.vs {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e30613;
    margin: 0 20px;
}

.match-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.match-competition {
    font-size: 14px;
    color: #999;
    font-style: italic;
}

/* 传奇球星区块样式 */
.legends-section {
    background-color: #000;
    color: #fff;
}

.legends-section h2 {
    color: #fff;
}

.legends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.legend-card {
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 30px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #e30613;
}

.legend-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid #e30613;
    transition: all 0.3s ease;
}

.legend-card:hover .legend-img {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(227, 6, 19, 0.5);
}

.legend-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
    font-family: 'Times New Roman', Times, serif;
}

.legend-card p {
    color: #ccc;
    font-style: italic;
}

/* 荣誉殿堂区块样式 */
.trophies-section {
    background-color: #f5f5f5;
}

.trophies-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.trophy-item {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.trophy-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #e30613;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.trophy-item:hover::before {
    transform: scaleX(1);
}

.trophy-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #e30613;
}

.trophy-item h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

.trophy-item p {
    color: #666;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 联系我们区块样式 */
.contact-section {
    background-color: #000;
    color: #fff;
    text-align: center;
}

.contact-section h2 {
    color: #fff;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* 页脚样式 */
footer {
    background-color: #111;
    color: #fff;
    padding: 60px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #e30613;
    font-family: 'Times New Roman', Times, serif;
}

.footer-logo p {
    opacity: 0.7;
    font-size: 1.1rem;
    font-style: italic;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: 'Times New Roman', Times, serif;
}

.footer-links a:hover {
    color: #e30613;
    padding-left: 10px;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-link {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: inline-block;
    position: relative;
    padding-left: 25px;
    font-family: 'Times New Roman', Times, serif;
}

.social-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #e30613;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: #e30613;
}

.social-link:hover::before {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 10px rgba(227, 6, 19, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #333;
    opacity: 0.7;
    font-size: 14px;
    font-family: 'Times New Roman', Times, serif;
}

/* 模态窗口样式 */
.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.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: slideIn 0.3s ease;
    border: 2px solid #e30613;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
    transition: all 0.3s ease;
}

.close:hover {
    color: #e30613;
    transform: rotate(90deg);
}

#modal-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #000;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
}

#modal-body {
    line-height: 1.8;
    color: #333;
    font-family: 'Times New Roman', Times, serif;
}

.detail-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

#modal-body p {
    margin-bottom: 20px;
    line-height: 1.6;
}

#modal-body strong {
    color: #e30613;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    nav ul {
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
    }

    .news-grid,
    .matches-grid,
    .legends-grid,
    .trophies-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .modal-content {
        margin: 20% auto;
        padding: 20px;
        width: 95%;
    }

    #modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .news-item,
    .match-item,
    .legend-card,
    .trophy-item {
        padding: 20px;
    }

    .news-item h3,
    .legend-card h3,
    .trophy-item h3 {
        font-size: 1.3rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(227, 6, 19, 0.3);
    border-radius: 50%;
    border-top-color: #e30613;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 图片懒加载效果 */
img {
    transition: opacity 0.3s ease;
}

img.lazy {
    opacity: 0;
}

img.lazy.loaded {
    opacity: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #e30613;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c00511;
}

/* 打印样式 */
@media print {
    header,
    nav,
    footer,
    .btn,
    .modal {
        display: none;
    }

    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    h1, h2, h3 {
        color: #000;
        page-break-after: avoid;
    }
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    body {
        background-color: #000;
        color: #fff;
    }

    section:nth-child(even) {
        background-color: #111;
    }

    .news-item,
    .match-item,
    .trophy-item {
        background-color: #222;
        color: #fff;
        border-color: #e30613;
    }

    .news-item h3,
    .match-item h3,
    .trophy-item h3 {
        color: #fff;
    }

    .news-item p,
    .match-item p,
    .trophy-item p {
        color: #ccc;
    }
}