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

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif;
    background: linear-gradient(135deg, #ffcccc 0%, #ccffcc 50%, #ccccff 100%);
    color: #333;
    line-height: 1.6;
}

/* Q版装饰元素 */
.decoration {
    position: fixed;
    z-index: -1;
    opacity: 0.5;
}

.decoration:nth-child(1) {
    top: 10%;
    left: 5%;
    font-size: 3rem;
    color: #ff6b6b;
}

.decoration:nth-child(2) {
    top: 20%;
    right: 10%;
    font-size: 2.5rem;
    color: #4ecdc4;
}

.decoration:nth-child(3) {
    bottom: 15%;
    left: 15%;
    font-size: 2rem;
    color: #45b7d1;
}

.decoration:nth-child(4) {
    bottom: 25%;
    right: 5%;
    font-size: 3.5rem;
    color: #96ceb4;
}
ul li{
    list-style: none;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b6b;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.logo:hover {
    color: #ff8787;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

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

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-links a:hover {
    color: #ff6b6b;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: #fff;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #ff6b6b;
    position: relative;
    z-index: 1001;
    padding: 0.5rem;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 游戏网格样式 */
.games-section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ff6b6b;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 3px solid #ffd166;
}

.game-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.3);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-bottom: 3px solid #ffd166;
}

.game-card:hover img {
    transform: scale(1.1) rotate(1deg);
}

.game-info {
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.game-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #ff6b6b;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.game-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 游戏详情页样式 */
.game-detail {
    padding: 3rem 0;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    background: #fff;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    border: 3px solid #ffd166;
}

.game-detail-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
    border: 3px solid #ffd166;
}

.game-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #666;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px solid #ffd166;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    border: 3px solid #ffd166;
}

.play-button:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
}

/* 相关游戏推荐 */
.related-games {
    margin-top: 4rem;
    background: #fff;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    border: 3px solid #ffd166;
}

.related-games h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #ffd166;
}

.related-card:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid #ffd166;
}

.related-info {
    padding: 1rem;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.related-title {
    font-size: 1rem;
    font-weight: bold;
    color: #ff6b6b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 返回按钮 */
.back-button {
    display: inline-block;
    background: #ffd166;
    color: #333;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(255, 209, 102, 0.4);
    border: 2px solid #ff6b6b;
}

.back-button:hover {
    background: #ffbe40;
    transform: translateY(-3px) rotate(2deg);
    box-shadow: 0 6px 20px rgba(255, 209, 102, 0.5);
}

/* 页面通用样式 */
.page-content {
    padding: 3rem;
    background: white;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    margin: 2rem 0;
    border: 3px solid #ffd166;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: #ffd166;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 209, 102, 0.4);
}

.page-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #666;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 20px;
    border: 2px solid #ffd166;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-top: 5px solid #ffd166;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: #ffd166;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 209, 102, 0.4);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    line-height: 1.6;
    font-weight: bold;
}

.footer-section a:hover {
    color: #ffd166;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 3px solid #ffd166;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        border-bottom: 3px solid #ffd166;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links a {
        margin: 0.5rem 0;
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0.8rem 1.5rem;
        margin-bottom: 1rem;
    }

    .games-grid {
        /* grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); */
        gap: 1rem;
    }

    .game-card {
        border-radius: 20px;
    }

    .game-info {
        padding: 1rem;
    }

    .game-title {
        font-size: 1.1rem;
    }

    .detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
        border-radius: 20px;
    }

    .game-detail h1 {
        font-size: 2rem;
        padding: 0.8rem 1.5rem;
        word-break: break-all;
    }

    .game-detail-description {
        padding: 1rem;
        border-radius: 15px;
    }

    .play-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .related-games {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .related-games h2 {
        font-size: 1.8rem;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }

    .related-card {
        border-radius: 15px;
    }

    .related-card img {
        height: 120px;
    }

    .back-button {
        padding: 0.8rem 1.5rem;
    }

    .page-content {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .page-content h1 {
        font-size: 2rem;
        padding: 0.8rem 1.5rem;
    }

    .page-content p {
        padding: 0.8rem;
        border-radius: 15px;
    }

    .footer {
        border-top-left-radius: 30px;
        border-top-right-radius: 30px;
    }

    .footer-section h3 {
        font-size: 1.3rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotate(-2deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

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

.game-card {
    animation: fadeIn 0.5s ease forwards, bounce 0.5s ease 0.5s;
}

.game-card:nth-child(1) { animation-delay: 0.1s, 0.6s; }
.game-card:nth-child(2) { animation-delay: 0.2s, 0.7s; }
.game-card:nth-child(3) { animation-delay: 0.3s, 0.8s; }
.game-card:nth-child(4) { animation-delay: 0.4s, 0.9s; }
.game-card:nth-child(5) { animation-delay: 0.5s, 1s; }
.game-card:nth-child(6) { animation-delay: 0.6s, 1.1s; }
