/* 抽奖转盘样式 - 方块布局 */
.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); }
}

/* 抽奖标题区域样式 */
.lottery-header {
  text-align: center;
  margin-bottom: 20px;
}

/* 紧凑型邀请信息样式 */
.compact-referral-info {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-size: 13px;
}

.referral-description {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #0d6efd;
  line-height: 1.4;
}

.referral-description i {
  font-size: 14px;
  flex-shrink: 0;
}

.referral-code-compact,
.referral-link-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.referral-link-compact {
  margin-bottom: 0;
}

.referral-label {
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
  min-width: 60px;
}

.referral-code-value {
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: #007bff;
  font-size: 12px;
  min-width: 80px;
  text-align: center;
}

.referral-link-value {
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: #6c757d;
  flex: 1;
  min-width: 200px;
  word-break: break-all;
  max-width: 300px;
}

.compact-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
}

.compact-btn i {
  font-size: 12px;
  line-height: 1;
}

.compact-btn .btn-text {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 500;
}

/* 如果图标不显示，隐藏文字 */
.compact-btn:not(:has(i)) .btn-text {
  margin-left: 0;
}

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

.compact-btn.copy-btn {
  background: #007bff;
  color: white;
}

.compact-btn.copy-btn:hover {
  background: #0056b3;
}

.compact-btn.share-btn {
  background: #28a745;
  color: white;
}

.compact-btn.share-btn:hover {
  background: #1e7e34;
}

/* 邀请码分享区域样式（保留原样式作为备用） */
.referral-code-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.referral-code-display,
.referral-link-display {
  margin-bottom: 10px;
}

.referral-code-display:last-child,
.referral-link-display:last-child {
  margin-bottom: 0;
}

.referral-code-display label,
.referral-link-display label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 6px;
  font-size: 12px;
}

.code-input-group,
.link-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.referral-code-input,
.referral-link-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: #495057;
}

.copy-btn,
.share-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.copy-btn {
  background: #007bff;
  color: white;
}

.copy-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.share-btn {
  background: #28a745;
  color: white;
}

.share-btn:hover {
  background: #1e7e34;
  transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .code-input-group,
  .link-input-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .copy-btn,
  .share-btn {
    width: 100%;
  }

  /* 移动端紧凑型邀请信息样式 */
  .compact-referral-info {
    padding: 10px 12px;
    margin: 10px 0;
    font-size: 12px;
  }

  .referral-description {
    padding: 6px 10px;
    font-size: 11px;
    margin-bottom: 10px;
  }

  .referral-description i {
    font-size: 12px;
  }

  .referral-code-compact,
  .referral-link-compact {
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
  }

  .referral-label {
    min-width: 50px;
    font-size: 11px;
  }

  .referral-code-value {
    font-size: 11px;
    min-width: 70px;
    padding: 3px 6px;
  }

  .referral-link-value {
    font-size: 10px;
    min-width: 150px;
    max-width: 200px;
    padding: 3px 6px;
  }

  .compact-btn {
    padding: 3px 6px;
    font-size: 10px;
    min-width: 24px;
    height: 24px;
  }
} 