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

body {
  font-family: 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* ========== 活动说明区域样式 ========== */
.header {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.rule-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.rule-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  padding-left: 10px;
  border-left: 4px solid #ffd93d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-title::before {
  content: "📋";
  font-size: 1.2rem;
}

.rule-item {
  margin-bottom: 15px;
  padding: 0 10px;
  line-height: 1.6;
}

.rule-item:last-child {
  margin-bottom: 0;
}

.rule-label {
  font-weight: bold;
  color: #ffd93d;
  display: inline-block;
  min-width: 85px;
}

.rule-text {
  color: rgba(255, 255, 255, 0.95);
}

.rule-text strong {
  color: #ffd93d;
}

.notice-card {
  background: rgba(255, 100, 100, 0.25);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid rgba(255, 200, 100, 0.5);
  backdrop-filter: blur(5px);
}

.notice-icon {
  font-size: 24px;
  flex-shrink: 0;
  background: rgba(255, 200, 100, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-content {
  flex: 1;
}

.notice-title {
  font-size: 1rem;
  font-weight: bold;
  color: #ffd93d;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.notice-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.5;
}

.notice-text strong {
  color: #ffaa66;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* ========== 转盘样式 ========== */
.main-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  width: 100%;
}

.wheel-container {
  position: relative;
  width: 400px;
  height: 400px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 
    0 0 0 8px rgba(255, 255, 255, 0.1),
    0 0 30px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.pointer {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 70px;
  z-index: 10;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
}

.pointer::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-top: 40px solid #ff4757;
}

.wheel-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #ffa726,
    #ffd93d,
    #1dd1a1,
    #48dbfb,
    #6c5ce7,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -1;
  opacity: 0.1;
  animation: rotate 10s linear infinite;
}

.pointer::after {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #ff4757, #ff6b81);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.8);
}

.wheel-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #fff, #f8f9fa);
  border-radius: 50%;
  box-shadow: 
    0 0 20px rgba(255, 255, 255, 0.5),
    inset 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 5;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.center-button-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.center-draw-button {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  color: #333;
  border: none;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 1.2;
  padding: 10px;
}

.center-draw-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.center-draw-button:active {
  transform: translateY(1px) scale(0.98);
}

.center-draw-button:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========== 奖品列表样式 ========== */
.controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.prize-list-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.prize-list-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ========== 历史记录样式 ========== */
.history {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.history h2 {
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.5rem;
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* ========== 弹窗样式 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.prize-modal, .result-modal {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff3838 50%, #ff0000 100%);
  border-radius: 20px;
  padding: 0;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(255, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  position: relative;
}

.result-modal {
  max-width: 400px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-content {
  padding: 25px;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
}

.prize-grid {
  display: grid;
  gap: 12px;
}

.prize-card {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.prize-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.prize-color {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.prize-info {
  flex: 1;
}

.prize-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.prize-probability {
  opacity: 0.8;
  font-size: 0.9rem;
  color: #ffd93d;
}

.result-content {
  padding: 20px;
  text-align: center;
}

.result-prize {
  font-size: 2rem;
  font-weight: bold;
  color: #ffdd59;
  margin: 20px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

/* ========== 加载动画 ========== */
.loading {
  text-align: center;
  padding: 20px;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #fff;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

/* ========== 动画 ========== */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    align-items: center;
  }
  .wheel-container {
    width: 300px;
    height: 300px;
  }
}