/**
 * 数列规律发现游戏 - 样式表
 * 采用极简风格，以黑白灰为主色调
 */

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f8f8;
  color: #333;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 800px;
  width: 100%;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page {
  padding: 40px;
  transition: all 0.3s ease;
}

.hidden {
  display: none;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #222;
}

/* 按钮样式 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.primary-btn {
  background-color: #333;
  color: white;
}

.primary-btn:hover {
  background-color: #555;
}

.secondary-btn {
  background-color: #f0f0f0;
  color: #333;
}

.secondary-btn:hover {
  background-color: #e0e0e0;
}

/* 欢迎页面样式 */
.welcome-content {
  text-align: center;
  padding: 20px;
}

.game-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222;
}

.game-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: #555;
}

.welcome-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 300px;
  margin: 0 auto;
}

/* 游戏页面样式 */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.level-info {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

.sequence-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.number-item {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.input-wrapper {
  width: 100%;
  height: 100%;
}

.answer-input-item {
  width: 100%;
  height: 100%;
  border: 2px solid #333;
  border-radius: 8px;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.answer-input-item:focus {
  border-color: #555;
  box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.answer-input-item:disabled {
  background-color: #f0f0f0;
  cursor: not-allowed;
}

.feedback-container {
  text-align: center;
  margin-bottom: 30px;
  height: 30px;
}

.feedback-message {
  font-size: 18px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.feedback-message.show {
  opacity: 1;
  transform: translateY(0);
}

.feedback-message.correct {
  color: #2ecc71;
}

.feedback-message.incorrect {
  color: #e74c3c;
}

.game-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* 结果页面样式 */
.results-container {
  background-color: #f8f8f8;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 18px;
  color: #555;
}

.result-value {
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.results-buttons {
  text-align: center;
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
}

.close-button:hover {
  color: #333;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .page {
    padding: 20px;
  }
  
  .game-title {
    font-size: 28px;
  }
  
  .game-description {
    font-size: 16px;
  }
  
  .number-item {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  
  .sequence-container {
    gap: 8px;
  }
  
  .results-container {
    padding: 20px;
  }
  
  .result-item {
    padding: 10px 0;
  }
  
  .result-label,
  .result-value {
    font-size: 16px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .number-item {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  
  .sequence-container {
    gap: 6px;
  }
}
