* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(
    90deg,
    rgba(255, 112, 67, 0.1) 0%,
    rgba(255, 255, 255, 0.9) 30%,
    rgba(255, 255, 255, 0.9) 70%,
    rgba(255, 112, 67, 0.1) 100%
  );
  color: #333;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* 背景图片样式 */
.background-images {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bg-img {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0.7;
  animation: float 6s ease-in-out infinite;
  transition: transform 0.3s ease;
}

/* 浮动动画 */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  50% {
    transform: translateY(0px) rotate(0deg);
  }
  75% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

/* 不同图片的动画延迟 */
.bg-img:nth-child(1) {
  animation-delay: 0s;
}

.bg-img:nth-child(2) {
  animation-delay: 1.5s;
}

.bg-img:nth-child(3) {
  animation-delay: 3s;
}

.bg-img:nth-child(4) {
  animation-delay: 4.5s;
}

/* 确保内容在背景图片之上 */
.container {
  position: relative;
  z-index: 2;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* 顶部导航栏 */
.header {
  margin-bottom: 30px;
  background-color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-section h1 {
  margin: 0;
  font-size: 32px;
  color: #ff7043;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  gap: 15px;
}

.nav-btn {
  background-color: #ff7043;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(255, 112, 67, 0.3);
}

.nav-btn:hover {
  background-color: #f4511e;
  transform: scale(1.05);
}

.coins {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
}

.coin-icon {
  margin-right: 10px;
}

.coin-count {
  color: #ffd700;
}

/* 主要内容区 */
.main-content {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 打卡按钮 */
.checkin-section {
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.motivational-text {
  margin-top: 15px;
  font-size: 18px;
  color: #ff7043;
  font-weight: bold;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.checkin-btn {
  background-color: #ff9800;
  color: white;
  border: none;
  padding: 18px 40px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.checkin-btn:hover {
  background-color: #f57c00;
  transform: scale(1.05);
}

.checkin-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
}

/* 图片展示区 */
.images-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

/* 计时器样式 */
.timer-section {
  text-align: center;
  background-color: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
  margin: 30px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timer-section h3 {
  margin-bottom: 15px;
  color: #ff7043;
  font-size: 20px;
}

.timer-display {
  font-size: 48px;
  font-weight: bold;
  margin: 15px 0;
  color: #333;
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
}

.today-study-time {
  margin: 10px 0 20px;
  color: #666;
  font-size: 16px;
}

.timer-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.timer-btn:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

.timer-btn.running {
  background-color: #f44336;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.timer-btn.running:hover {
  background-color: #da190b;
}

.content-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.content-img:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* 日历视图 */
.calendar-section {
  margin-top: 30px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h2 {
  font-size: 24px;
  color: #333;
}

.month-btn {
  background-color: #f0f2f5;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.month-btn:hover {
  background-color: #e0e2e5;
}

/* 日历网格 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

/* 星期标题 */
.weekday {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background-color: #f0f2f5;
  border-radius: 5px;
  color: #666;
}

/* 日期格子 */
.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.day:hover {
  background-color: #e0e2e5;
}

/* 不同打卡状态 */
.day.checked-in {
  background-color: #4caf50;
  color: white;
}

.day.not-checked-in {
  background-color: #f44336;
  color: white;
}

.day.other-month {
  color: #cccccc;
  background-color: #f0f0f0;
  cursor: default;
}

.day.other-month:hover {
  background-color: #f0f0f0;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

.modal-open {
  overflow: hidden;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #333;
}

.modal h3 {
  margin-bottom: 20px;
  color: #333;
}

.modal p {
  margin-bottom: 15px;
  color: #666;
}

.modal textarea {
  width: 100%;
  height: 120px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  resize: vertical;
  margin-bottom: 20px;
  font-family: inherit;
}

.submit-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.submit-btn:hover {
  background-color: #45a049;
}

.submit-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 响应式设计 */
/* 商店商品样式 */
.store-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.store-item {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.store-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.store-item-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.store-item-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.store-item-price {
  color: #ff9800;
  margin-bottom: 10px;
}

.store-item-buy {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.store-item-buy:hover {
  background-color: #45a049;
}

.store-item-buy:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* 转盘样式 */
.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.wheel-container {
  position: relative;
  margin-bottom: 30px;
}

.wheel {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: conic-gradient(
    #ff6b6b 0deg 60deg,
    #4ecdc4 60deg 120deg,
    #45b7d1 120deg 180deg,
    #96ceb4 180deg 240deg,
    #ffeaa7 240deg 300deg,
    #dfe6e9 300deg 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.wheel::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.wheel-arrow {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;
  color: #ff9800;
  z-index: 10;
}

.wheel-controls {
  text-align: center;
}

.wheel-btn {
  background-color: #ff9800;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.wheel-btn:hover {
  background-color: #f57c00;
  transform: scale(1.05);
}

.wheel-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.wheel-result {
  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
  color: #4caf50;
}

/* 成功提示弹窗样式 */
.success-modal {
  text-align: center;
  padding: 40px 30px;
}

.success-icon {
  font-size: 50px;
  margin-bottom: 20px;
  animation: bounce 1s ease-in-out;
}

.success-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.success-btn:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* 奖励页面样式 */
.rewards-container {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 20px;
}

.reward-item {
  background-color: #f9f9f9;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reward-item-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.reward-item-icon {
  font-size: 24px;
}

.reward-item-name {
  font-weight: bold;
}

.reward-item-date {
  color: #999;
  font-size: 14px;
}

.reward-item-value {
  color: #ff9800;
  font-weight: bold;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .nav-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-content {
    padding: 20px;
  }

  .calendar-grid {
    gap: 5px;
  }

  .day {
    font-size: 14px;
    padding: 8px;
  }

  .checkin-section {
    margin-bottom: 20px;
  }

  .timer-section {
    padding: 20px 15px;
  }

  .timer-display {
    font-size: 36px;
  }

  .images-section {
    gap: 15px;
    margin: 20px 0;
  }

  .content-img {
    width: 80px;
    height: 80px;
  }

  .modal-content {
    margin: 20% auto;
    width: 95%;
    max-width: 400px;
    padding: 20px;
  }

  .wheel {
    width: 250px;
    height: 250px;
  }

  .wheel-section {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .header-content {
    gap: 10px;
  }

  .logo-section h1 {
    font-size: 20px;
  }

  .nav-btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .timer-display {
    font-size: 28px;
  }

  .checkin-btn {
    padding: 15px 30px;
    font-size: 18px;
  }

  .modal-content {
    margin: 30% auto;
    padding: 15px;
  }

  .wheel {
    width: 200px;
    height: 200px;
  }
}
