/* 全局样式 */
body {
  font-family: var(--font-family); /* 使用 CSS 变量 */
  margin: 0;
  background-color: var(--background-color); /* 使用 CSS 变量 */
  color: var(--text-color); /* 使用 CSS 变量 */
}


/* 标题样式 */
h1, h2 {
  text-align: center;
  margin-top: 20px;
}

h1 {
  margin-top: 80px;
}

h2 {
  margin-top: 60px;
}

/* 导航栏样式 */
nav {
  background-color: rgb(23, 26, 33); /* 深灰色 */
  padding: 10px 0; /* 减少内边距 */
  position: fixed;
  top: 0;
  width: 80%;
  margin-left: 10%;
  z-index: 100;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

nav li {
  display: inline-block;
  margin: 0 80px; /* 减少列表项之间的间距 */
}

nav a {
  text-decoration: none;
  color: #fff; /* 白色文字 */
  font-weight: bold;
  font-size: 30px; /* 减少字体大小 */
  padding: 5px 10px; /* 减少内边距 */
  transition: background-color 0.3s ease;
  border-radius: 15px;
}

nav a:hover {
  background-color: #ddd;
  cursor: pointer;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
  nav ul {
    text-align: left;
  }

  nav li {
    display: block;
    margin: 5px 0; /* 减少列表项之间的间距 */
  }

  nav a {
    font-size: 20px; /* 进一步减少字体大小 */
  }
}
/* 页面内容样式 */
main {
  padding: 20px;
}

section {
  margin-bottom: 20px;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
}

/* 页面标题样式 */
#title1, #title2 {
  text-align: center;
}

#title1 {
  margin-top: 60px;
  width: 50%; /* 设置宽度，可根据需要调整 */
  margin: 0 auto; /* 水平居中 */
}

#title2 {
  margin-top: 60px;
}

/* 图片居中样式 */
#imgCenter {
  display: block;
  margin: 0 auto;
}

/* 游戏列表样式 */
section.game-list {
  margin: 0 auto;
  width: 70%; /* 设置宽度，可根据需要调整 */
}

/* 游戏卡片样式 */
.game-card {
  background-color: rgb(22, 90, 216); /* 深蓝色背景 */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 20px;
  margin-left: 200px;
  flex-grow: 1;
  max-width: 80%;
  text-align: center; /* 使游戏卡片中的文字居中 */
}

.game-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.game-card-container .game-card {
  margin-top: 20px; /* 为游戏卡片添加上下边距 */
}

/* 游戏卡片标题样式 */
.game-card h3 {
  margin-bottom: 10px; /* 为游戏卡片标题添加下边距 */
}

/* 游戏描述样式 */
.game-description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: max-width 0.3s ease;
  max-width: 1500px;
  text-align: center;
}

.game-card:hover .game-description {
  max-width: 100%;
}

/* 按钮样式 */
button {
  background-color: #4CAF50; /* 绿色按钮 */
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px; /* 圆角按钮 */
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #45a049; /* 鼠标悬停时颜色更深 */
}

/* 购物车样式 */
#cartBody {
  font-family: 'Roboto', sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

.cart-container {
  background-color: #282c34;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 700px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  padding: 15px 0;
}

.cart-item p {
  margin: 0;
  margin-right: 76px;
}

.cart-item .game-name {
  font-weight: bold;
}

.cart-item .game-price {
  font-style: italic;
}

.cart-item .game-quantity {
  font-size: 14px;
  color: #777;
}

#checkout-button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

#checkout-button:hover {
  background-color: #0056b3;
}

/* 科技感元素 */
.cart-container::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to right, #007bff, #0056b3);
  opacity: 0.3;
  z-index: -1;
  border-radius: 10px 10px 0 0;
}

/* 结账页面样式 */
.checkout-form {
  max-width: 600px;
  margin: 20px auto;
  padding: 30px;
  background-color: #68dcff; /* 蓝色背景 */
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.checkout-form h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.checkout-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
}

.checkout-form textarea {
  height: 100px;
}

.checkout-form button[type="submit"] {
  background-color: #4CAF50; /* 绿色按钮 */
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.checkout-form button[type="submit"]:hover {
  background-color: #45a049;
}

/* 响应式结账页面 */
@media (max-width: 600px) {
  .checkout-form {
    padding: 20px;
  }
}

/*鼠标悬浮变为手型*/
#hover {
  cursor: pointer;
  }
#center{
  text-align: center;
}
/*嵌套网站*/
iframe {
  border: none; /* 或 border: 0; */
  box-shadow: none;
  padding: 0;
  overflow: hidden;
  margin-left: 25%;
}

/* 画廊页面样式 */
.game-gallery {
  padding: 0; /* 确保画廊页面没有内边距 */
  overflow: hidden; /* 隐藏所有滚动条 */
}
/* 主题 1 */
.theme-1 {
  --background-color: rgb(24,48,70); /* 深灰色背景 */
  --text-color: #333;
  --font-family: 'Arial', sans-serif;
}

/* 主题 2 */
.theme-2 {
  --background-color: #70ef30;
  --text-color: #fff;
  --font-family: 'Helvetica', sans-serif;
}

/* 字体大小 */
.font-size-small {
  font-size: 14px;
}

.font-size-medium {
  font-size: 24px;
}

.font-size-large {
  font-size: 36px;
}