/* 抽奖转盘样式 - 方块布局 */
.lottery-container {
  text-align: center;
  padding: 20px;
  background: #ffffff;
  border-radius: 20px;
  color: #333;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.lottery-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #e74c3c;
}

.lottery-description {
  font-size: 1rem;
  margin-bottom: 30px;
  color: #7f8c8d;
  line-height: 1.6;
}

.lottery-grid-container {
  position: relative;
  margin: 0 auto 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lottery-grid {
  display: grid;
  gap: 8px;
  position: relative;
}

/* 4个奖品的网格布局 */
.grid-4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 300px;
  height: 300px;
}

/* 6个奖品的网格布局 */
.grid-6 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 360px;
  height: 240px;
}

/* 8个奖品的网格布局 */
.grid-8 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 400px;
  height: 200px;
}

/* 9个奖品的网格布局 */
.grid-9 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 360px;
  height: 360px;
}

/* 10个奖品的网格布局 */
.grid-10 {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 450px;
  height: 180px;
}

/* 12个奖品的网格布局 */
.grid-12 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 400px;
  height: 300px;
}

.lottery-prize {
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 80px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lottery-prize::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.lottery-prize:hover::before {
  left: 100%;
}

.lottery-prize:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: #e74c3c;
}

.lottery-prize.balance {
  background: #e74c3c;
  border-color: #e74c3c;
  color: white;
}

.lottery-prize.special {
  background: #f39c12;
  border-color: #f39c12;
  color: white;
}

.lottery-prize.normal {
  background: #3498db;
  border-color: #3498db;
  color: white;
}

.lottery-prize.thanks {
  background: #95a5a6;
  border-color: #95a5a6;
  color: white;
}

.lottery-prize.selected {
  border-color: #f1c40f;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.6);
  transform: scale(1.1);
}

.lottery-prize.winning {
  border-color: #f1c40f;
  box-shadow: 0 0 30px rgba(241, 196, 15, 0.8);
}

.prize-name {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
  line-height: 1.2;
}

.prize-amount {
  font-size: 12px;
  opacity: 0.9;
  text-align: center;
}

.lottery-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.lottery-status {
  display: flex;
  justify-content: space-around;
  margin-bottom: 0;
}

.lottery-status-item {
  text-align: center;
  position: relative;
}

.lottery-status-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -25%;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: #dee2e6;
}

.lottery-status-number {
  font-size: 1.2rem;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 3px;
}

.lottery-status-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
}

.lottery-button {
  background: #e74c3c;
  border: none;
  color: white;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
  position: relative;
  overflow: hidden;
}

.lottery-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.lottery-button:hover::before {
  left: 100%;
}

.lottery-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.lottery-button:active {
  transform: translateY(-1px);
}

.lottery-button:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lottery-button:disabled::before {
  display: none;
}

.lottery-result {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: white;
  padding: 0;
  border-radius: 20px;
  text-align: center;
  z-index: 9999;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: result-enter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.lottery-result.success {
  border-top: 4px solid #27ae60;
}

.lottery-result.info {
  border-top: 4px solid #3498db;
}

.lottery-result-header {
  background: #667eea;
  color: white;
  padding: 30px 20px 20px;
  position: relative;
}

.lottery-result-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

.lottery-result-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.lottery-result-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.lottery-result-body {
  padding: 25px 20px;
}

.lottery-result-message {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 500;
}

.lottery-result-amount {
  font-size: 2.2rem;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lottery-result-info {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #6c757d;
  border-left: 3px solid #3498db;
}

.lottery-result-close {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.lottery-result-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.lottery-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  animation: overlay-enter 0.3s ease-out;
}

/* 加载动画 */
.lottery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lottery-loading .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f1f3f4;
  border-top: 4px solid #e74c3c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .lottery-grid {
    gap: 6px;
  }
  
  .lottery-prize {
    padding: 12px 8px;
    min-height: 70px;
  }
  
  .prize-name {
    font-size: 12px;
  }
  
  .prize-amount {
    font-size: 10px;
  }
  
  .lottery-title {
    font-size: 1.5rem;
  }
  
  .lottery-button {
    padding: 14px 30px;
    font-size: 1rem;
  }
  
  .grid-4 { width: 250px; height: 250px; }
  .grid-6 { width: 300px; height: 200px; }
  .grid-8 { width: 320px; height: 160px; }
  .grid-9 { width: 300px; height: 300px; }
  .grid-10 { width: 350px; height: 140px; }
  .grid-12 { width: 320px; height: 240px; }
}

@media (max-width: 480px) {
  .lottery-grid {
    gap: 4px;
  }
  
  .lottery-prize {
    padding: 10px 6px;
    min-height: 60px;
  }
  
  .prize-name {
    font-size: 11px;
  }
  
  .prize-amount {
    font-size: 9px;
  }
  
  .grid-4 { width: 200px; height: 200px; }
  .grid-6 { width: 240px; height: 160px; }
  .grid-8 { width: 256px; height: 128px; }
  .grid-9 { width: 240px; height: 240px; }
  .grid-10 { width: 280px; height: 112px; }
  .grid-12 { width: 256px; height: 192px; }
}

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

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

@keyframes overlay-enter {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

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