/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #e74c3c;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

img {
    max-width: 100%;
    height: auto;
}

/* 导航栏样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    color: #e74c3c;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #e74c3c;
}

/* 英雄区样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 600px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hero-content h2 span {
    color: #e74c3c;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #7f8c8d;
}

/* 角色介绍样式 */
.characters {
    background-color: white;
}

.character-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.character {
    width: 45%;
    margin-bottom: 50px;
    background-color: #f8f9fa;
    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;
}

.character:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.character-img {
    height: 300px;
    overflow: hidden;
}

.character-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.character:hover .character-img img {
    transform: scale(1.05);
}

.character-info {
    padding: 20px;
}

.character-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.character-info p {
    margin-bottom: 20px;
    color: #7f8c8d;
}

.character-details-btn {
    display: inline-block;
    background-color: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.character-details-btn:hover {
    background-color: #e74c3c;
    color: white;
}

/* 画廊样式 */
.gallery {
    background-color: #f8f9fa;
}

.gallery-slider {
    margin: 0 auto;
    max-width: 900px;
}

.gallery-item {
    padding: 10px;
}

.gallery-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 游戏区域样式 */
.game {
    background-color: white;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-instructions {
    text-align: center;
    margin-bottom: 30px;
}

.game-instructions h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.game-instructions p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #7f8c8d;
}

#game-area {
    width: 600px;
    height: 400px;
    background-color: #f8f9fa;
    border: 3px solid #e74c3c;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    display: none;
}

#tom-character, #jerry-character {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#tom-character {
    width: 60px;
    height: 60px;
    background-image: url('../images/tom-game.png');
    left: 50px;
    top: 50px;
}

#jerry-character {
    width: 30px;
    height: 30px;
    background-image: url('../images/jerry-game.png');
    right: 50px;
    bottom: 50px;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    display: none;
}

/* 趣味知识样式 */
.trivia {
    background-color: #f8f9fa;
}

.trivia-container {
    max-width: 800px;
    margin: 0 auto;
}

.trivia-item {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.trivia-item h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

#trivia-content {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #7f8c8d;
    min-height: 100px;
}

/* 联系表单样式 */
.contact {
    background-color: white;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

#form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-weight: 500;
    display: none;
}

#form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #e74c3c;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .character {
        width: 80%;
    }
    
    #game-area {
        width: 90%;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
} 