* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  background: white;
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
  max-width: 500px;
  width: 100%;
  margin: 80px auto;
  flex: 1 0 auto;
  padding-bottom: 160px; /* 给 footer 留出空间，防止覆盖内容 */
}

h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 40px;
  font-weight: 600;
}

.code-box {
  background: #f8f9fa;
  border: 3px solid #4a90e2;
  border-radius: 15px;
  padding: 30px 20px;
  margin: 0 auto 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 350px;
}

.code-box:hover {
  background: #e9ecef;
  border-color: #357abd;
  transform: scale(1.02);
}

.code-box:active {
  transform: scale(0.98);
}

#codeDisplay {
  font-size: 56px;
  font-weight: bold;
  color: #333;
  letter-spacing: 8px;
  font-family: 'Courier New', monospace;
  display: block;
}

.countdown {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
}

#countdownDisplay {
  font-weight: bold;
  color: #4a90e2;
  font-size: 20px;
}

.copy-hint {
  font-size: 14px;
  color: #999;
  margin-top: 20px;
}

/* 复制成功提示 */
.copied-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(40, 167, 69, 0.95);
  color: white;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  z-index: 1000;
  animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* 响应式设计 */
@media (max-width: 600px) {
  .container {
    padding: 40px 30px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 30px;
  }

  #codeDisplay {
    font-size: 48px;
    letter-spacing: 6px;
  }

  .countdown {
    font-size: 16px;
  }

  #countdownDisplay {
    font-size: 18px;
  }
}
