/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f9ff;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    background-color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4a90e2;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.game-title {
    background-color: #4a90e2;
    color: #ffffff;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    margin-left: 0.3rem;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 1.5rem;
}

.nav a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav a:hover {
    color: #4a90e2;
}

/* 主要内容样式 */
.main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2.5rem;
}

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

.game-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.1);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.2);
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.game-content {
    padding: 1.5rem;
}

.game-name {
    color: #4a90e2;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.game-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.play-button {
    display: inline-block;
    background-color: #4a90e2;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.play-button:hover {
    background-color: #3a7bc8;
}

/* 页脚样式 */
.footer {
    background-color: #ffffff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 2px solid #4a90e2;
    color: #7f8c8d;
    box-shadow: 0 -2px 10px rgba(74, 144, 226, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav li {
        margin: 0.5rem;
    }
}

/* 链接基础样式 */
a {
    color: #4a90e2;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* 常规链接悬停效果 */
a:not(.play-button):not(.nav a):hover {
    color: #3a7bc8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 正文中的链接样式 */
.content-area a {
    color: #5d9cec;
    position: relative;
}

.content-area a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #4a90e2;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.content-area a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 页脚链接样式 */
.footer a {
    color: #7f8c8d;
    margin: 0 0.5rem;
}

.footer a:hover {
    color: #4a90e2;
    text-decoration: none;
}

/* 禁用状态的链接 */
a.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

/* 外部链接标识 */
a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
    vertical-align: super;
    line-height: 0;
}

/* 活动状态链接 */
a.active {
    color: #4a90e2;
    font-weight: bold;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 2px;
}

/* 查看全部按钮样式 */
.view-all {
    text-align: center;
    margin-top: 2rem;
}

.view-all-button {
    display: inline-block;
    background-color: #ffffff;
    color: #4a90e2;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #4a90e2;
    transition: all 0.3s;
}

.view-all-button:hover {
    background-color: #4a90e2;
    color: #ffffff;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    padding: 0.8rem 1rem;
    border: 2px solid #4a90e2;
    border-radius: 4px 0 0 4px;
    background-color: #ffffff;
    color: #333;
    width: 70%;
    font-size: 1rem;
    outline: none;
}

.search-button {
    padding: 0.8rem 1.5rem;
    background-color: #4a90e2;
    color: #ffffff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #3a7bc8;
}

@media (max-width: 600px) {
    .search-container {
        flex-direction: column;
        align-items: center;
    }
    
    .search-input {
        width: 100%;
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .search-button {
        width: 100%;
        border-radius: 4px;
    }
}
