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

body {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f0ff;
    background-image: radial-gradient(circle at 5% 15%, rgba(108, 92, 231, 0.08) 0%, rgba(108, 92, 231, 0) 70%);
    background-size: 35px 35px;
    overflow-x: hidden;
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(145deg, #8e44ad, #9b59b6);
    color: white;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 6px 30px rgba(155, 89, 182, 0.25);
    backdrop-filter: blur(15px);
    border-bottom: none;
}

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

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.5px;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    background: linear-gradient(130deg, #ffffff, #e1bee7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    margin-left: 2.5rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    position: relative;
    padding-bottom: 5px;
    letter-spacing: 0.5px;
    font-style: normal;
}

.nav-links a:hover {
    color: #e1bee7;
    transform: translateY(-2px);
}

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

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

.nav-links a {
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* 汉堡菜单样式 - 默认隐藏 */
.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, #9b59b6 0%, #8e44ad 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(155, 89, 182, 0.4);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, transparent 70%),
                radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 55%);
    animation: subtleFloat 8s ease-in-out infinite;
}

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

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

/* 游戏分类样式 */
.game-categories {
    margin: 2rem 0;
}

.category {
    margin-bottom: 3rem;
}

.category h3 {
    font-size: 2.1rem;
    margin-bottom: 1.5rem;
    color: #9b59b6;
    border-bottom: 3px solid #d1c4e9;
    padding-bottom: 0.5rem;
    font-weight: 700;
    position: relative;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.category h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.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;
    overflow: hidden;
    border: 1px solid rgba(155, 89, 182, 0.1);
    backdrop-filter: blur(5px);
}

.game-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 45px rgba(155, 89, 182, 0.3);
    border-color: rgba(155, 89, 182, 0.3);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.game-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(155, 89, 182, 0.1) 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.4s;
}

.game-card:hover img {
    transform: scale(1.1);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card-content {
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}

.game-card h4 {
    font-size: 1.2rem;
    color: #9b59b6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.game-card p {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    padding: 3rem 0;
    margin-top: 3rem;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    position: relative;
    box-shadow: 0 -5px 25px rgba(155, 89, 182, 0.3);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.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;
    position: relative;
    padding-bottom: 3px;
}

.footer-links a:hover {
    color: #e1bee7;
    transform: translateY(-2px);
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #a29bfe;
    transition: width 0.3s;
}

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

/* 详情页样式 */
.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);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(155, 89, 182, 0.1);
}

.game-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.game-detail::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(155, 89, 182, 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;
}

.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: #9b59b6;
    font-weight: 800;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    position: relative;
    display: inline-block;
}

.game-detail-info h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    border-radius: 2px;
}

.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, #9b59b6, #8e44ad);
    color: white;
    padding: 1.3rem 2.5rem;
    text-decoration: none;
    border-radius: 12px;
    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(155, 89, 182, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.7s ease;
}

.play-button:hover::before {
    left: 100%;
}

.play-button:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(155, 89, 182, 0.5);
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.play-button:active {
    transform: translateY(-2px) scale(0.98);
}

.back-button {
    display: inline-block;
    margin: 1rem 0;
    color: #9b59b6;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    padding-left: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.back-button::before {
    content: '←';
    position: absolute;
    left: 0;
    transition: transform 0.3s;
}

.back-button:hover {
    color: #8e44ad;
    transform: translateX(-5px);
}

.back-button:hover::before {
    transform: translateX(-2px);
}

/* 可能喜欢的游戏样式 */
.may-like {
    margin: 3rem 0;
}

.may-like h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #6c5ce7;
    font-weight: 700;
    position: relative;
    padding-left: 20px;
}

.may-like h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 30px;
    background-color: #6c5ce7;
    border-radius: 5px;
}

/* 辅助页面样式 */
.auxiliary-page {
    background-color: white;
    padding: 3rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.auxiliary-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
}

.auxiliary-page h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: #6c5ce7;
    font-weight: 800;
}

.auxiliary-page h3 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: #6c5ce7;
    font-weight: 700;
    position: relative;
    padding-left: 20px;
}

.auxiliary-page h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: #6c5ce7;
    border-radius: 50%;
}

.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: 15px;
}

.auxiliary-page li::before {
    content: '•';
    color: #6c5ce7;
    font-size: 1.2em;
    position: absolute;
    left: -10px;
    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: #6c5ce7;
    font-size: 1.05rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e8f0ff;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: all 0.3s;
    background-color: #faf9ff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a29bfe;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    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(108, 92, 231, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(108, 92, 231, 0.5);
    background: linear-gradient(90deg, #a29bfe, #6c5ce7);
}

.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: #6c5ce7;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 1rem 0;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 1rem 0;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    /* 英雄区域 */
    .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: 30px 30px;
    }
    .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: 25px 25px;
    }
    
    .nav-links {
        top: 60px;
    }
}

/* 波纹动画 */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}