/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka One', 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: #333333;
    background-color: #fff9e6;
    background-image: linear-gradient(45deg, rgba(243, 156, 18, 0.07) 25%, transparent 25%), 
                      linear-gradient(-45deg, rgba(243, 156, 18, 0.07) 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, rgba(243, 156, 18, 0.07) 75%), 
                      linear-gradient(-45deg, transparent 75%, rgba(243, 156, 18, 0.07) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    overflow-x: hidden;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(120deg, #f39c12, #e67e22);
    color: white;
    padding: 1.3rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 6px 30px rgba(243, 156, 18, 0.4);
    border-bottom: 3px solid #f1c40f;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.25);
    background: linear-gradient(120deg, #ffffff, #ffe082);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2.2rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.nav-links a:hover {
    color: #f1c40f;
    transform: translateY(-2px);
}

/* 汉堡菜单样式 - 默认隐藏 */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px auto;
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 3px;
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.4);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10.01%) 0 0/20px 20px,
        radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.1) 0%, transparent 40%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero h2 {
    font-size: 2.9rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
    font-weight: 800;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.25), 0 0 10px rgba(255,255,255,0.1);
    }
    to {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.25), 0 0 20px rgba(255,255,255,0.3);
    }
}

.hero p {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* 游戏分类样式 */
.game-categories {
    margin: 2rem 0;
}

.category {
    margin-bottom: 3rem;
}

.category h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #f39c12;
    border-bottom: 4px solid #f1c40f;
    padding-bottom: 0.5rem;
    font-weight: 700;
    display: inline-block;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.category h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #e67e22, #f39c12);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 200px), 1fr));
    gap: 1.5rem;
}

/* 游戏卡片样式 */
.game-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    border: 1px solid #f8e0a0;
    background: linear-gradient(to bottom, white, #fff9e6);
}

.game-card:hover {
    transform: translateY(-10px) rotate(1deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(243, 156, 18, 0.3);
    border-color: #f39c12;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #f39c12, #f1c40f);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(243, 156, 18, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.game-card:hover::after {
    opacity: 1;
}

.game-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.game-card:hover img {
    transform: scale(1.1);
}

.game-card-content {
    padding: 0.5rem;
}

.game-card h4 {
    font-size: 1.2rem;
    color: #f39c12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: color 0.3s ease;
}

.game-card:hover h4 {
    color: #e67e22;
}

.game-card p {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 3rem 0;
    margin-top: 3rem;
    position: relative;
    box-shadow: 0 -5px 25px rgba(243, 156, 18, 0.3);
}

.footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 50% 50% 0 0;
    box-shadow: 0 -2px 15px rgba(243, 156, 18, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer p {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: #f1c40f;
    text-decoration: underline;
}

/* 详情页样式 */
.game-detail {
    display: flex;
    gap: 2.5rem;
    margin: 2rem 0;
    background-color: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border: 2px solid #f8e0a0;
    position: relative;
    background: linear-gradient(to bottom, white, #fff9e6);
}

.game-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.game-detail::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(243, 156, 18, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.game-detail-image {
    flex: 1;
    max-width: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.game-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-detail-image:hover img {
    transform: scale(1.05);
}

.game-detail-info {
    flex: 2;
}

.game-detail-info h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #f39c12;
    font-weight: 800;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    position: relative;
    display: inline-block;
    animation: subtleGlow 3s ease-in-out infinite alternate;
}

.game-detail-info h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    border-radius: 2px;
}

@keyframes subtleGlow {
    from {
        text-shadow: 2px 2px 5px rgba(0,0,0,0.1), 0 0 5px rgba(243, 156, 18, 0.1);
    }
    to {
        text-shadow: 2px 2px 5px rgba(0,0,0,0.1), 0 0 15px rgba(243, 156, 18, 0.3);
    }
}

.game-detail-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 2rem;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 1.3rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.play-button:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(243, 156, 18, 0.5);
    background: linear-gradient(135deg, #e67e22, #f39c12);
}

.play-button:active {
    transform: translateY(-2px) scale(0.98);
}

.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.play-button:hover::after {
    animation: ripple 1.5s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

.back-button {
    display: inline-block;
    margin: 1rem 0;
    color: #f39c12;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    padding-left: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.back-button::before {
    content: '←';
    position: absolute;
    left: 0;
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.back-button:hover {
    color: #e67e22;
    transform: translateX(-5px);
    text-shadow: 0 1px 5px rgba(243, 156, 18, 0.2);
}

.back-button:hover::before {
    transform: translateX(-5px);
}

/* 可能喜欢的游戏样式 */
.may-like {
    margin: 3rem 0;
}

.may-like h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #f39c12;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-right: 20px;
}

.may-like h3::after {
    content: '★';
    position: absolute;
    right: 0;
    top: 0;
    color: #f1c40f;
    font-size: 1.5rem;
    animation: twinkle 1.5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* 辅助页面样式 */
.auxiliary-page {
    background-color: white;
    padding: 3rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #f8e0a0;
    position: relative;
    overflow: hidden;
}

.auxiliary-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #f39c12, #f1c40f);
}

.auxiliary-page h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: #f39c12;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.auxiliary-page h3 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: #f39c12;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.auxiliary-page h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #f1c40f;
    border-radius: 3px;
}

.auxiliary-page p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.auxiliary-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.auxiliary-page li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 20px;
}

.auxiliary-page li::before {
    content: '✦';
    color: #f39c12;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: -2px;
}

/* 联系表单样式 */
.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #f39c12;
    font-size: 1.05rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #f8e0a0;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background-color: #fff9e6;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f39c12;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-button:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(243, 156, 18, 0.5);
    background: linear-gradient(135deg, #e67e22, #f39c12);
}

.submit-button:active {
    transform: translateY(-2px) scale(0.98);
}

.submit-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.submit-button:hover::after {
    animation: ripple 1.5s ease-out infinite;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(50%, 180px), 1fr));
    }
}

@media (max-width: 768px) {
    /* 汉堡菜单显示 */
    .hamburger {
        display: block;
    }
    
    /* 导航链接隐藏 */
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: #f39c12;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 1rem 0;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 1rem 0;
    }
    
    /* 英雄区域 */
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* 游戏详情页 */
    .game-detail {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .game-detail-image {
        max-width: 100%;
    }
    
    .game-detail-info h2 {
        font-size: 1.9rem;
    }
    
    /* 游戏卡片 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-card img {
        height: 150px;
    }
    
    /* 可能喜欢的游戏 - 垂直排列 */
    .may-like .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .may-like .game-card {
        width: 100%;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    /* 确保body背景在小屏幕上保持良好 */
    body {
        background-size: 25px 25px;
    }
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .game-detail-info h2 {
        font-size: 1.6rem;
    }
    
    .game-detail-info h2::after {
        width: 40px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .may-like .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card img {
        height: 180px;
    }
    
    .play-button, .submit-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    body {
        background-size: 15px 15px;
        background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-links {
        top: 60px;
    }
}