/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: white;
    background: linear-gradient(135deg, #ff6e7f, #bfe9ff);
    animation: gradient 15s ease infinite;
    min-height: 100vh; /* 确保背景色铺满整个视口高度 */
    display: flex;
    flex-direction: column;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 200px;
    /* height: 50px; */
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    margin: 0;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav li {
    margin-left: 20px;
}

.nav a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #ff6e7f;
}

/* 主内容区域样式 */
.main {
    flex: 1; /* 使主内容区域占据剩余空间 */
    padding: 20px;
    text-align: center;
}

.game-list h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.game-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-list li {
    margin: 55px 0;
    transition: transform 0.3s ease;
}

/* .game-list li:hover {
    transform: scale(1.05); 
} */

.game-list a {
    text-decoration: none;
    color: white;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.game-list a:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 底部样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    text-align: center;
    color: white;
    font-size: 14px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* 点击计数游戏样式 */
.click-counter-game .game-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.click-counter-game button {
    background-color: #6200ea;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.click-counter-game button:hover {
    background-color: #3700b3;
}

/* 猜数字游戏样式 */
.guess-number-game .game-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.guess-number-game input[type="number"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.guess-number-game button {
    background-color: #6200ea;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.guess-number-game button:hover {
    background-color: #3700b3;
}

/* 记忆翻牌游戏样式 */
.memory-game .game-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.memory-game #board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.memory-game .card {
    width: 100px;
    height: 100px;
    background-color: #d3d3d3;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.memory-game .card.flipped {
    background-color: white;
}

.memory-game .card img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.memory-game .card.flipped img {
    opacity: 1;
}