/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    --primary-color: #4a3c28;
    --secondary-color: #8b6914;
    --accent-color: #d4af37;
    --dark-color: #1a1410;
    --light-color: #e8dcc0;
    --text-color: #f0e6d2;
    --card-bg: rgba(30, 25, 20, 0.85);
    --overlay-color: rgba(0, 0, 0, 0.7);
}

/* 基础样式 */
body {
    font-family: 'Georgia', serif;
    background-color: var(--dark-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 洞穴背景 */
.cave-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1410 0%, #2d241b 50%, #1a1410 100%);
    z-index: -2;
}

.cave-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(74, 60, 40, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 60, 40, 0.3) 0%, transparent 50%);
    z-index: -1;
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 20, 16, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.goblin-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容 */
main {
    margin-top: 80px;
    padding: 2rem 5%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* 英雄区域 */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--light-color);
}

.cta-button {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--dark-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.cave-entrance {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: radial-gradient(ellipse at center bottom, rgba(0, 0, 0, 0.8) 0%, transparent 70%);
    z-index: 1;
}

/* 区块标题 */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.title-decoration {
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 0 auto;
}

/* 角色区域 */
.character-section {
    padding: 4rem 0;
    margin-bottom: 2rem;
}

/* 角色卡片 */
.character-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.character-image {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.character-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-card:hover .character-image::before {
    opacity: 1;
}

.image-placeholder {
    font-size: 8rem;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.character-info {
    flex: 2;
    padding: 2rem;
}

.character-info h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.character-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 1rem;
}

.character-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* 角色属性 */
.character-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-label {
    min-width: 60px;
    font-weight: bold;
}

.stat-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 5px;
}

/* 小弟容器 */
.minions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

/* 宠物能力 */
.pet-abilities {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ability {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.ability:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.ability-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ability-name {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 宝藏区域 */
.treasure-section {
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.treasure-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.treasure-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.treasure-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.treasure-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.treasure-item h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.treasure-item p {
    color: var(--light-color);
}

/* 页脚 */
footer {
    background: rgba(26, 20, 16, 0.9);
    padding: 3rem 5% 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* 动画 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.5);
    }
}

@keyframes fillBar {
    from { width: 0; }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 历史和传说部分样式 */
.history-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(25, 25, 35, 0.9), rgba(15, 15, 25, 0.95));
}

.history-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.history-timeline {
    margin-bottom: 60px;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 120px;
    top: 60px;
    width: 2px;
    height: calc(100% + 20px);
    background: linear-gradient(to bottom, #7209b7, transparent);
}

.timeline-date {
    flex: 0 0 120px;
    padding: 15px;
    background-color: rgba(114, 9, 183, 0.3);
    border-radius: 10px;
    color: #e0aaff;
    font-weight: bold;
    text-align: center;
    margin-right: 30px;
    height: fit-content;
}

.timeline-content {
    flex: 1;
    background-color: rgba(30, 30, 40, 0.8);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.timeline-content h3 {
    color: #9d4edd;
    margin-bottom: 15px;
    font-size: 22px;
}

.timeline-content p {
    color: #e0aaff;
    line-height: 1.6;
}

.legends {
    background-color: rgba(30, 30, 40, 0.8);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.legends h3 {
    color: #9d4edd;
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
}

.legend-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.legend-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legend-item h4 {
    color: #c77dff;
    margin-bottom: 15px;
    font-size: 20px;
}

.legend-item p {
    color: #e0aaff;
    line-height: 1.6;
}

/* 游戏部分样式 */
.game-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.game-intro {
    background-color: rgba(30, 30, 40, 0.8);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    margin-bottom: 30px;
    text-align: center;
}

.game-intro h3 {
    color: #9d4edd;
    margin-bottom: 15px;
    font-size: 24px;
}

.game-intro p {
    color: #e0aaff;
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.game-btn {
    background: linear-gradient(45deg, #7209b7, #9d4edd);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

.game-btn:active {
    transform: translateY(0);
}

.game-board {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.game-grid {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 2px;
    background-color: rgba(10, 10, 20, 0.8);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid rgba(138, 43, 226, 0.3);
    aspect-ratio: 1;
    max-width: 500px;
    margin: 0 auto;
}

.game-cell {
    background-color: rgba(30, 30, 40, 0.7);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-cell:hover {
    background-color: rgba(50, 50, 70, 0.7);
}

.game-cell.wall {
    background-color: rgba(60, 60, 80, 0.9);
    cursor: default;
}

.game-cell.wall:hover {
    background-color: rgba(60, 60, 80, 0.9);
}

.game-stats {
    flex: 1;
    background-color: rgba(30, 30, 40, 0.8);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.stat-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.stat-label {
    color: #c77dff;
    font-weight: bold;
}

.stat-value {
    color: #e0aaff;
    font-weight: bold;
}

.game-legend {
    background-color: rgba(30, 30, 40, 0.8);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    margin-bottom: 30px;
}

.game-legend h3 {
    color: #9d4edd;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(50, 50, 70, 0.5);
    border-radius: 50%;
}

.legend-text {
    color: #e0aaff;
    font-size: 16px;
}

.game-message {
    background-color: rgba(30, 30, 40, 0.8);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    text-align: center;
}

.game-message p {
    color: #e0aaff;
    font-size: 18px;
    line-height: 1.6;
}

/* 游戏动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes collect {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.5) rotate(180deg); }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.game-cell.player {
    animation: pulse 1.5s infinite;
}

.game-cell.treasure {
    animation: pulse 2s infinite;
}

.game-cell.trap {
    animation: shake 3s infinite;
}

.game-cell.collecting {
    animation: collect 0.5s forwards;
}

/* 游戏响应式设计 */
@media (max-width: 992px) {
    .game-board {
        flex-direction: column;
        gap: 20px;
    }
    
    .game-grid {
        max-width: 100%;
    }
    
    .game-stats {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .stat-item {
        flex: 0 0 45%;
        margin-bottom: 10px;
    }
}

/* 主菜单页面样式 */
.menu-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.menu-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.cave-title {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.cave-subtitle {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.5rem;
    color: #E0E0E0;
    margin-bottom: 0;
}

.menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-options {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 1200px;
}

.menu-card {
    background: rgba(30, 20, 10, 0.85);
    border: 2px solid #8B4513;
    border-radius: 15px;
    padding: 2.5rem;
    width: 45%;
    max-width: 500px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #8B4513);
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    border-color: #D2691E;
}

.explore-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(70, 130, 180, 0.5);
}

.game-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 69, 0, 0.5);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 1rem;
}

.card-description {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.1rem;
    color: #E0E0E0;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.feature {
    background: rgba(139, 69, 19, 0.3);
    border: 1px solid #8B4513;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #E0E0E0;
}

.card-button {
    background: linear-gradient(45deg, #8B4513, #D2691E);
    border: none;
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card-button:hover {
    background: linear-gradient(45deg, #A0522D, #DEB887);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.menu-footer {
    text-align: center;
    margin-top: 2rem;
}

.footer-text {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.9rem;
    color: #A0A0A0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cave-title {
        font-size: 3rem;
    }
    
    .cave-subtitle {
        font-size: 1.2rem;
    }
    
    .menu-options {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .menu-card {
        width: 90%;
        max-width: none;
        padding: 2rem;
    }
    
    .card-icon {
        font-size: 3rem;
    }
    
    .card-title {
        font-size: 1.8rem;
    }
    
    .card-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .menu-container {
        padding: 1rem;
    }
    
    .cave-title {
        font-size: 2.5rem;
    }
    
    .menu-card {
        padding: 1.5rem;
    }
    
    .card-features {
        gap: 0.5rem;
    }
    
    .feature {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

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

/* 游戏动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* 应用动画效果的类 */
.pulse {
    animation: pulse 0.5s ease-in-out;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.glow {
    animation: glow 1s ease-in-out;
}

.bounce {
    animation: bounce 1s ease-in-out;
}

/* 宝藏收集动画 */
.collecting {
    animation: collect 0.5s ease-out forwards;
}

@keyframes collect {
    0% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.5) rotate(180deg); 
        opacity: 0.8; 
    }
    100% { 
        transform: scale(0) rotate(360deg); 
        opacity: 0; 
    }
}

/* 陷阱触发动画 */
.trap-triggered {
    animation: trapTrigger 0.5s ease-out;
}

@keyframes trapTrigger {
    0% { 
        transform: scale(1); 
        filter: brightness(1); 
    }
    50% { 
        transform: scale(1.2); 
        filter: brightness(1.5) hue-rotate(180deg); 
    }
    100% { 
        transform: scale(1); 
        filter: brightness(1); 
    }
}

/* 玩家移动动画 */
.player-move {
    transition: all 0.2s ease-in-out;
}

/* 游戏结束动画 */
.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.game-over-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* 游戏胜利动画 */
.victory-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

.victory-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: gold;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px 5px gold;
    animation: victoryPulse 1s ease-out infinite;
}

@keyframes victoryPulse {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* 倒计时警告动画 */
.timer-warning {
    animation: timerWarning 1s ease-in-out infinite;
}

@keyframes timerWarning {
    0%, 100% { 
        color: #fff; 
        transform: scale(1); 
    }
    50% { 
        color: #ff4d4d; 
        transform: scale(1.1); 
    }
}

/* 分数增加动画 */
.score-increase {
    position: absolute;
    color: gold;
    font-weight: bold;
    font-size: 1.5rem;
    pointer-events: none;
    animation: scoreFloat 1s ease-out forwards;
    z-index: 50;
}

@keyframes scoreFloat {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* 生命值减少动画 */
.life-lost {
    animation: lifeLost 0.5s ease-out;
}

@keyframes lifeLost {
    0% { 
        color: #fff; 
        transform: scale(1); 
    }
    50% { 
        color: #ff4d4d; 
        transform: scale(1.3); 
    }
    100% { 
        color: #fff; 
        transform: scale(1); 
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 200px;
    }
    
    .legend-items {
        flex-direction: column;
        align-items: center;
    }
    
    .legend-item {
        margin-bottom: 10px;
    }
    
    .stat-item {
        flex: 0 0 100%;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(26, 20, 16, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .character-card {
        flex-direction: column;
    }
    
    .character-image {
        min-width: 100%;
        height: 200px;
    }
    
    .minions-container {
        grid-template-columns: 1fr;
    }
    
    .pet-abilities {
        flex-direction: column;
        gap: 1rem;
    }
}