/* 全局变量 - 科技创新主题配色 */
:root {
    --primary-color: #165DFF;
    --secondary-color: #00A8E8;
    --accent-color: #7B61FF;
    --background-color: #f8f9ff;
    --text-color: #1a1a2e;
    --light-text: #5a6c84;
    --card-bg: #ffffff;
    --border-color: #e0e5ec;
    --shadow: 0 4px 20px rgba(22, 93, 255, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* 导航栏样式 */
.navbar {
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 15px rgba(22, 93, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* 滚动时导航栏样式 */
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(22, 93, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-left {
    display: flex;
    align-items: center;
}

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

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航栏中心区域样式已移除搜索框 */
.navbar-center {
    display: none;
}

.navbar-right {
    display: flex;
    align-items: center;
}

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

.nav-main, .nav-secondary {
    display: flex;
    gap: 1rem;
}

.nav-secondary {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(22, 93, 255, 0.05);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

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

.hamburger .bar {
    display: block;
    width: 24px;
    height: 3px;
    margin: 5px auto;
    transition: var(--transition);
    background-color: var(--text-color);
    border-radius: 3px;
}

/* 响应式导航样式 */
@media (max-width: 1024px) {
    .navbar-center {
        display: none;
    }
    
    .nav-secondary {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 0.5rem 1rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        flex-direction: column;
        gap: 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-main {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
        border-radius: 4px;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* 英雄区域样式 */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #165DFF 0%, #7B61FF 100%);
    color: white;
    margin: 2rem 0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* 英雄区域内部装饰 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
}

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

.category {
    margin-bottom: 3rem;
}

.category h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 4px solid var(--primary-color);
    padding-bottom: 0.5rem;
    font-weight: 700;
    display: inline-block;
    position: relative;
}

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

/* 文章卡片样式 */
.article-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(22, 93, 255, 0.15);
    border-color: var(--primary-color);
}

.article-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.article-card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.article-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    font-weight: 600;
}

.article-card p {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background-color: #1a1a2e;
    color: #e0e0e0;
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.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;
    margin: 1.5rem 0;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

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

/* 详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

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

.game-detail-image {
    margin: 1.5rem auto;
    max-width: 600px;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-detail-info h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.game-detail-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.play-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

.play-button:hover {
    background-color: #0e4bdb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 93, 255, 0.4);
}

.back-button {
    display: inline-block;
    margin: 1rem 0;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.back-button:hover {
    color: #0e4bdb;
    transform: translateY(-2px);
    text-decoration: underline;
}

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

.may-like h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* 辅助页面样式 */
.auxiliary-page {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auxiliary-page h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.auxiliary-page h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #34495e;
}

.auxiliary-page p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.auxiliary-page li {
    margin-bottom: 0.5rem;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

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

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

.submit-button:hover {
    background-color: #0e4bdb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 93, 255, 0.4);
}

/* 响应式设计 */
@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: #2c3e50;
        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: 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: 200px; */
        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) {
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .category h3,
    .may-like h3 {
        font-size: 1.5rem;
    }
    
    .game-detail {
        padding: 1rem;
    }
    
    .game-detail-info h2 {
        font-size: 1.5rem;
    }
    
    .play-button {
        width: 100%;
        text-align: center;
    }
}