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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.65;
    color: #0a1128;
    background: #f8fafc;
    /* 添加专业的渐变背景 */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(13, 59, 102, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(255, 183, 3, 0.03) 0%, transparent 40%),
        linear-gradient(to bottom right, #f8fafc 0%, #eef2f7 100%);
    background-attachment: fixed;
    transition: background-color 0.3s ease;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(90deg, rgba(30, 64, 175, 0.98) 0%, rgba(25, 42, 86, 0.98) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    /* 添加微妙的图案纹理 */
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm20 20h20v20H20V20zm0-20h20v20H20V0zM0 20h20v20H0V20z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fb8500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 1.8rem);
}

.nav-links a {
    /* color: #f1f5f9; */
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
    position: relative;
    padding: 0.5rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: #fb8500;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-links a:hover {
    color: #fb8500;
}

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

/* 汉堡菜单样式 - 默认隐藏 */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger .bar {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #e2e8f0;
    border-radius: 1px;
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    padding: clamp(3rem, 10vh, 5rem) 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
    /* 添加精致的图案背景 */
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 183, 3, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 1.5rem;
    color: #ffb703;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    max-width: 800px;
    margin: 0 auto;
    color: #e0e7ff;
    line-height: 1.7;
}

/* 文章分类样式 */
.article-categories {
    margin: 3rem 0;
}

.category {
    margin-bottom: clamp(2rem, 5vw, 4rem);
    position: relative;
}

.category h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: clamp(1rem, 3vw, 1.8rem);
    color: #0d3b66;
    border-bottom: 3px solid #ffb703;
    padding-bottom: 0.6rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
}

.category h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60%;
    height: 3px;
    background-color: #0d3b66;
    border-radius: 1px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 280px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

/* 文章卡片样式 */
.game-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* 添加轻微的背景纹理 */
    background-image: linear-gradient(120deg, rgba(13, 59, 102, 0.01) 0%, rgba(255, 183, 3, 0.01) 100%);
    /* 添加微妙的辉光效果 */
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #ffb703;
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px 16px 0 0;
}

.game-card:hover img {
    transform: scale(1.07);
}

.game-card-content {
    padding: 1.25rem;
    background: linear-gradient(to bottom, white 0%, #fafafa 100%);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-card h4 {
    font-size: 1.15rem;
    color: #0d3b66;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* 卡片悬停效果增强 */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffb703 0%, #fb8500 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

/* 页脚样式 */
.footer {
    background: linear-gradient(180deg, #1e3a8a 0%, #1e293b 100%);
    color: #f1f5f9;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
    /* 添加渐变图案背景 */
    background-image: 
        linear-gradient(90deg, rgba(251, 133, 0, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(251, 133, 0, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(251, 133, 0, 0.1) 0%, transparent 50%);
    background-size: 50px 50px, 50px 50px, 100% 100%;
    border-top: 4px solid #fb8500;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffb703 0%, #fb8500 100%);
}

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

.footer p {
    color: #0d3b66;
    margin-bottom: 1.5rem;
    /* color: #cbd5e1; */
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: clamp(1rem, 3vw, 1.8rem);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-links a {
    /* color: #f1f5f9; */
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.3rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.footer-links a:hover {
    color: #fb8500;
}

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

/* 友情链接样式 */
.footer-links h4 {
    font-size: 1.1rem;
    color: #ffb703;
    /* margin-bottom: 1rem; */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-content: center;
}

.friendship-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    /* margin-top: 1rem; */
}

.friendship-links-list a {
    /* color: #cbd5e1; */
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.3rem 0;
}

.friendship-links-list a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #fb8500;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.friendship-links-list a:hover {
    color: #fb8500;
}

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

/* 详情页样式 */
.game-detail {
    margin: 3rem 0;
    background-color: white;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    /* 添加轻微的背景纹理 */
    background-image: linear-gradient(120deg, rgba(13, 59, 102, 0.01) 0%, rgba(255, 183, 3, 0.01) 100%);
    /* 添加微妙的辉光效果 */
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.game-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #ffb703 0%, #fb8500 100%);
}

.game-detail-info {
    text-align: center;
}

.game-detail-image {
    margin: 1.5rem auto;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.game-detail-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-detail:hover img {
    transform: scale(1.03);
}

.game-detail-info h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: #0d3b66;
    border-bottom: 3px solid #ffb703;
    padding-bottom: 0.75rem;
    font-weight: 800;
    line-height: 1.3;
}

.game-detail-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 2rem;
    text-align: justify;
}

.play-button {
    display: inline-block;
    background: linear-gradient(135deg, #0d3b66 0%, #072541 100%);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(13, 59, 102, 0.25);
    position: relative;
    overflow: hidden;
}

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

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 59, 102, 0.35);
}

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

.back-button {
    display: inline-flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #0d3b66;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background-color: #f1f5f9;
}

.back-button::before {
    content: '←';
    position: relative;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.back-button:hover {
    color: #ffb703;
    background-color: #e2e8f0;
    transform: translateX(-3px);
}

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

/* 可能喜欢的文章样式 */
.may-like {
    margin: 4rem 0;
    padding-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
}

.may-like h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    color: #0d3b66;
    text-align: center;
    position: relative;
    font-weight: 700;
}

.may-like h3::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ffb703 0%, #fb8500 100%);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* 辅助页面样式 */
.auxiliary-page {
    background-color: white;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    position: relative;
    /* 添加轻微的背景纹理 */
    background-image: linear-gradient(120deg, rgba(13, 59, 102, 0.01) 0%, rgba(255, 183, 3, 0.01) 100%);
    /* 添加微妙的辉光效果 */
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.auxiliary-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffb703 0%, #fb8500 100%);
    border-radius: 16px 16px 0 0;
}

.auxiliary-page h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: #0d3b66;
    padding-bottom: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.auxiliary-page h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin: 2rem 0 1.25rem;
    color: #0d3b66;
    font-weight: 700;
}

.auxiliary-page p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
    font-size: 1.05rem;
}

.auxiliary-page ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.auxiliary-page li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #4a5568;
}

/* 联系表单样式 */
.contact-form {
    margin-top: 2.5rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #0d3b66;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.25s ease;
    background-color: #f8fafc;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffb703;
    box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.1);
    background-color: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 180px;
    line-height: 1.6;
}

.submit-button {
    background: linear-gradient(135deg, #0d3b66 0%, #072541 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(13, 59, 102, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

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

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 59, 102, 0.35);
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(50%, 250px), 1fr));
    }
}

@media (max-width: 768px) {
    /* 汉堡菜单显示 */
    .hamburger {
        display: block;
    }
    
    /* 导航链接隐藏 */
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background: linear-gradient(180deg, #0a1a2f 0%, #07131f 100%);
        width: 100%;
        text-align: center;
        transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 1rem 0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    /* 英雄区域 */
    .hero h2 {
        font-size: 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.8rem;
    }
    
    /* 文章卡片 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-card img {
        height: 160px;
    }
    
    /* 可能喜欢的文章 - 垂直排列 */
    .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) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .category h3,
    .may-like h3 {
        font-size: 1.5rem;
    }
    
    .game-detail {
        padding: 1.25rem;
    }
    
    .game-detail-info h2 {
        font-size: 1.6rem;
    }
    
    .play-button {
        width: 100%;
        text-align: center;
    }
    
    /* 移动设备上的卡片网格 */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .game-card img {
        height: 180px;
    }
    
    .may-like .games-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category {
    animation: fadeInUp 0.6s ease-out;
}

/* 确保平滑的颜色过渡 */
button, a {
    transition: all 0.25s ease;
    text-decoration: none;
    color: #0d3b66;
}

/* 增强文本可读性 */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
}

/* 确保表单元素在iOS上的样式一致性 */
input[type="text"],
input[type="email"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 添加焦点轮廓的自定义样式 */
*:focus {
    outline: 2px solid #ffb703;
    outline-offset: 2px;
}

/* 修复Safari中的一些渲染问题 */
@media not all and (min-resolution: 0.001dpcm) {
    @supports (-webkit-appearance: none) {
        .game-card img {
            transform: translateZ(0);
        }
    }
}