/* 全局样式 */
:root {
    /* 定义主题颜色变量 */
    --primary-color: #ff0000; /* 马里奥红 */
    --secondary-color: #4caf50; /* 绿色管道 */
    --accent-color: #ffeb3b; /* 金币黄 */
    --dark-color: #333;
    --light-color: #f5f5f5;
    --text-color: #333;
    --background-color: #e7f5ff; /* 浅蓝色背景，类似马里奥的天空 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* 容器通用样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #e60000;
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* 导航栏样式 */
header {
    background: linear-gradient(to right, #ff9999, #ff6666); /* 更淡的马里奥红色渐变 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%;
}

.logo {
    display: flex;
    align-items: center;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.logo img {
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.8rem;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 8px 15px;
    margin: 0 5px;
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links li a:hover {
    color: var(--primary-color);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 语言选择器样式 */
.language-selector {
    position: relative;
    margin-left: 20px;
}

#language-btn {
    display: flex;
    align-items: center;
    background-color: white;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#language-btn:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#language-btn i {
    margin-right: 5px;
    font-size: 1.2rem;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 100;
    width: 150px;
    display: none;
    overflow: hidden;
}

.language-dropdown.active {
    display: block;
}

.language-dropdown a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.language-dropdown a:last-child {
    border-bottom: none;
}

.language-dropdown a:hover {
    background-color: #f8f8f8;
    color: var(--primary-color);
}

/* 移动设备菜单切换 */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333; /* 深色图标 */
}

/* 英雄区域样式 */
.hero {
    height: 500px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/首页轮播图.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out;
}

.hero-content .btn {
    animation: bounceIn 1s ease-out 0.5s;
    animation-fill-mode: both;
}

/* 游戏区域样式 */
.games-section {
    padding: 80px 20px;
    background-color: #f0e6ff; /* 轻柔的紫色，统一配色 */
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.game-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.1);
}

.game-card h3 {
    padding: 15px 15px 10px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.game-card p {
    padding: 0 15px 15px;
    color: var(--text-color);
}

.play-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.play-btn:hover {
    background-color: #e60000;
}

/* 游戏展示区样式 */
.game-display {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-container {
    width: 90%;
    max-width: 1000px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
}

.game-header h3 {
    font-size: 1.5rem;
}

#close-game {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
}

#game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
}

.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.game-controls {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
}

#fullscreen-btn {
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#fullscreen-btn i {
    margin-right: 5px;
}

/* 角色区域样式 */
.characters-section {
    padding: 80px 20px;
    background-color: #f0e6ff; /* 轻柔的紫色，类似夜晚的马里奥世界 */
}

.characters-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.character-card {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.character-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(255, 0, 0, 0.2);
}

.character-card img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.5s ease;
}

.character-card:hover img {
    transform: scale(1.1);
}

.character-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.character-card p {
    color: var(--text-color);
}

/* 新闻区域样式 */
.news-section {
    padding: 80px 20px;
    background-color: #f0e6ff; /* 轻柔的紫色，统一配色 */
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-excerpt {
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #e60000;
}

/* 页脚样式 */
footer {
    background-color: #1a237e; /* 深蓝色，类似马里奥夜间关卡 */
    color: white;
    padding-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
    max-width: 100%;
    filter: brightness(0) invert(1); /* 将任何颜色的图标转为白色 */
}

.footer-logo p {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.footer-links h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.footer-newsletter h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.footer-newsletter p {
    margin-bottom: 15px;
}

.footer-newsletter form {
    display: flex;
}

.footer-newsletter input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
}

.footer-newsletter button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer-newsletter button:hover {
    background-color: #e60000;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media screen and (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 20px;
    }
    
    .nav-links li a {
        color: var(--primary-color);
        background-color: #f8f8f8;
        display: block;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
        color: white;
        background-color: rgba(255, 255, 255, 0.2);
        padding: 8px 10px;
        border-radius: 8px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 600px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-newsletter form {
        flex-direction: column;
    }
    
    .footer-newsletter input {
        margin-bottom: 10px;
        border-radius: 5px;
    }
    
    .footer-newsletter button {
        border-radius: 5px;
    }
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
} 