* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: 'Arial', sans-serif;
  min-height: 100vh;
  background-image: url('bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.main-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 毛玻璃效果 */
.header, .game-area {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 标题栏样式 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
}

.header-title {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-links {
  display: flex;
  gap: 20px;
}

.header-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
}

.header-links a:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.header-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: white;
  transition: width 0.3s ease;
}

.header-links a:hover::after {
  width: 100%;
}

/* 游戏区域样式 */
.game-area {
  padding: 30px;
  color: white;
  text-align: center;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 开始界面样式 */
#start-screen {
  width: 100%;
  max-width: 600px;
}

#start-screen h2 {
  margin-bottom: 30px;
  font-size: 1.8rem;
}

#difficulty, #language {
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

#difficulty:hover, #language:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 自定义下拉框 */
.custom-select-wrapper {
  display: inline-block;
  position: relative;
}

.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 12px 40px 12px 20px;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  min-width: 150px;
  text-align: center;
}

.custom-select:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.custom-select:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.custom-select-wrapper::after {
  content: "▼";
  font-size: 0.7rem;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: white;
}

/* 难度主题样式 */
#difficulty-desc {
  padding: 15px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
  transition: all 0.3s ease;
}

button {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px 5px;
}

button:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 游戏界面样式 */
#board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto 30px;
  width: 100%;
  max-width: 350px;
}

.row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 auto;
}

.tile {
  width: 62px;
  height: 62px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

/* 键盘样式 */
#keyboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.key {
  min-width: 40px;
  height: 58px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.key:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.key-wide {
  flex: 1.5;
}

/* 颜色状态 */
.correct {
  background-color: rgba(106, 170, 100, 0.8) !important;
  border-color: rgba(106, 170, 100, 0.8) !important;
  color: white;
}

.present {
  background-color: rgba(201, 180, 88, 0.8) !important;
  border-color: rgba(201, 180, 88, 0.8) !important;
  color: white;
}

.absent {
  background-color: rgba(120, 124, 126, 0.8) !important;
  border-color: rgba(120, 124, 126, 0.8) !important;
  color: white;
}

/* 动画效果 */
@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0);
  }
}

@keyframes bounce {
  0%, 20% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  50% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(-15px);
  }
  80% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes shake {
  10%, 90% {
    transform: translateX(-1px);
  }
  20%, 80% {
    transform: translateX(2px);
  }
  30%, 50%, 70% {
    transform: translateX(-4px);
  }
  40%, 60% {
    transform: translateX(4px);
  }
}

.flip {
  animation: flip 0.5s ease;
}

.bounce {
  animation: bounce 0.5s ease;
}

.shake {
  animation: shake 0.5s ease;
}

/* 难度主题颜色 */
.theme-very-easy {
  background-color: rgba(144, 238, 144, 0.2) !important;
}

.theme-easy {
  background-color: rgba(34, 139, 34, 0.2) !important;
}

.theme-normal {
  background-color: rgba(0, 0, 255, 0.2) !important;
}

.theme-hard {
  background-color: rgba(255, 215, 0, 0.2) !important;
}

.theme-extreme {
  background-color: rgba(255, 0, 0, 0.2) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
  }
  
  .header-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .tile {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .key {
    min-width: 30px;
    height: 45px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .tile {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .key {
    min-width: 24px;
    height: 40px;
    font-size: 0.8rem;
  }
}

/* 自定义难度选择器 */
.difficulty-selector-container {
  margin: 20px auto;
  max-width: 500px;
}

.difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.difficulty-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 80px;
  border: 2px solid transparent;
}

.difficulty-option:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.difficulty-option.selected {
  border-color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.difficulty-icon {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 5px;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.difficulty-label {
  font-size: 0.9rem;
  color: white;
}

.very-easy-icon {
  background-color: #4caf50;
}

.easy-icon {
  background-color: #8bc34a;
}

.normal-icon {
  background-color: #ffc107;
}

.hard-icon {
  background-color: #ff9800;
}

.extreme-icon {
  background-color: #f44336;
}

@media (max-width: 600px) {
  .difficulty-selector {
    gap: 5px;
  }
  
  .difficulty-option {
    width: 60px;
    padding: 8px 5px;
  }
  
  .difficulty-icon {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    padding: 5px;
  }
  
  .difficulty-label {
    font-size: 0.8rem;
  }
} 