/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f5f6fa;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

/* 容器样式 */
.draw-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
}

/* 卡片通用样式 */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

/* 卡片头部 */
.card-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}

.card-title i {
  color: #4287f5;
  font-size: 20px;
}

/* 查看全部链接 */
.view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4287f5;
  text-decoration: none;
  font-size: 14px;
}

.view-all i {
  font-size: 18px;
}

/* 倒计时 */
.countdown {
  font-size: 16px;
  font-weight: bold;
  color: #4287f5;
}

/* 刷新按钮样式 */
.refresh-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-time {
  font-size: 12px;
  color: #666;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f5f6fa;
  color: #4287f5;
}

.btn-icon i {
  font-size: 20px;
}

/* 加密货币价格卡片 */
.crypto-card {
  overflow: hidden;
}

.crypto-prices {
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.crypto-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s;
}

.crypto-item:hover {
  transform: translateY(-2px);
}

.crypto-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  padding: 6px;
}

.crypto-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crypto-details {
  flex: 1;
}

.crypto-name {
  margin-bottom: 4px;
}

.coin-symbol {
  font-weight: bold;
  font-size: 14px;
}

.coin-fullname {
  font-size: 12px;
  color: #666;
  display: block;
}

.crypto-price {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

/* 信息栏 */
.info-bar {
  margin: 0 15px 15px;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}

.info-bar i {
  font-size: 16px;
  color: #4287f5;
}

/* 规则卡片样式 */
.rule-card {
  overflow: hidden;
}

.rule-content {
  padding: 15px;
}

.rule-intro {
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
}

.rule-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.rule-item i {
  color: #4287f5;
  font-size: 24px;
}

.rule-text {
  flex: 1;
}

.rule-text strong {
  display: block;
  margin-bottom: 4px;
  color: #333;
  font-size: 14px;
}

.rule-text p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.highlight-text {
  color: #4287f5;
  font-weight: bold;
  font-size: 16px;
}

.muted-text {
  color: #999;
  font-size: 14px;
}

.small-text {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

/* 抽奖活动卡片 */
.draw-card {
  overflow: hidden;
}

.draw-content {
  padding: 15px;
}

.draw-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
}

/* 抽奖统计样式 */
.draw-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  padding: 15px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-icon {
  margin-bottom: 10px;
}

.stat-icon i {
  color: #4287f5;
  font-size: 24px;
}

.stat-label {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 16px;
  font-weight: bold;
}

.stat-value.highlight {
  color: #4287f5;
}

/* 奖池构成样式 */
.pool-details {
  text-align: left !important;
}

.pool-breakdown {
  margin-top: 10px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.pool-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.pool-item:last-child {
  border-bottom: none;
}

.pool-item.muted {
  color: #999;
}

/* 抽奖券选择器 */
.user-section {
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  margin-top: 20px;
}

.user-tickets {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: #333;
}

.user-tickets i {
  color: #4287f5;
}

.user-tickets strong {
  color: #4287f5;
}

.ticket-selector {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.ticket-label {
  margin-bottom: 10px;
  color: #666;
}

.ticket-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ticket-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ticket-btn:hover {
  background: #f5f6fa;
  border-color: #4287f5;
  color: #4287f5;
}

.ticket-btn i {
  font-size: 20px;
}

.ticket-input {
  width: 60px;
  text-align: center;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.quick-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex: 1;
  text-align: center;
  min-width: 60px;
}

.quick-btn:hover {
  background: #f5f6fa;
  border-color: #4287f5;
  color: #4287f5;
}

/* 抽奖按钮 */
.draw-action {
  margin: 15px 0;
}

.draw-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #ff4d4d, #f33);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.draw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

.draw-btn i {
  font-size: 20px;
}

/* 中奖概率 */
.chance-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.chance-label {
  color: #666;
  margin-bottom: 8px;
}

.chance-value {
  font-size: 18px;
  font-weight: bold;
  color: #4287f5;
  margin-bottom: 8px;
}

.chance-note {
  font-size: 12px;
  color: #666;
}

/* 结果弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalShow 0.3s ease;
}

@keyframes modalShow {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.modal-header h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}

.result-icon {
  color: #4287f5;
  font-size: 24px;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  border-radius: 4px;
}

.close-btn:hover {
  background: #f5f6fa;
}

.close-btn i {
  font-size: 20px;
}

.modal-content {
  padding: 15px;
}

/* 加载状态 */
.loading-state {
  text-align: center;
  padding: 30px 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4287f5;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-state p {
  color: #666;
  font-size: 14px;
}

/* 结果详情 */
.result-message {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.result-info {
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-label i {
  font-size: 18px;
}

.result-value {
  font-weight: bold;
  color: #333;
}

.result-value.success {
  color: #4CAF50;
}

.result-value.prize {
  color: #f33;
  font-size: 18px;
}

/* 验证部分 */
.verification-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.verification-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

.verification-title i {
  color: #4CAF50;
  font-size: 20px;
}

.crypto-values {
  display: grid;
  gap: 10px;
}

.verify-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.verify-row:last-child {
  border-bottom: none;
}

.verify-row.highlight {
  color: #4287f5;
  font-weight: bold;
}

.verify-label {
  color: #666;
}

.verify-value {
  font-weight: bold;
}

/* 结果操作按钮 */
.result-actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn i {
  font-size: 18px;
}

.btn-primary {
  background: #4287f5;
  color: white;
}

.btn-primary:hover {
  background: #2673e6;
}

.btn-secondary {
  background: #f5f6fa;
  color: #666;
}

.btn-secondary:hover {
  background: #e8e9ec;
}

/* 历史记录表格 */
.history-content {
  padding: 15px;
}

.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.history-table thead th {
  background: #f8f9fa;
  text-align: left;
  padding: 12px 15px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.history-table tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  vertical-align: middle;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background: #f8f9fa;
}

.history-table tbody tr.win {
  background: rgba(76, 175, 80, 0.05);
}

/* 我的抽奖记录表格列宽 */
.history-table .col-time {
  width: 140px;
  color: #666;
}

.history-table .col-tickets {
  width: 100px;
  text-align: center;
  color: #4287f5;
  font-weight: 500;
}

.history-table .col-result {
  width: 120px;
  text-align: center;
}

.history-table .col-prize {
  width: 120px;
  text-align: right;
}

/* 全球中奖记录表格 */
.global-table .col-user {
  width: 200px;
}

.global-table .col-time {
  width: 140px;
  color: #666;
}

.global-table .col-amount {
  width: 120px;
  text-align: right;
}

/* 用户信息样式 */
.global-table .user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-table .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.global-table .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.global-table .user-name {
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* 中奖状态和金额样式 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #f0f0f0;
  color: #666;
}

.badge.success {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.badge i {
  font-size: 14px;
}

.win-amount {
  color: #4CAF50;
  font-weight: bold;
}

.no-prize {
  color: #999;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 30px 15px;
}

.empty-state i {
  font-size: 48px;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.empty-state p {
  color: #666;
  margin: 0;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .draw-container {
    padding: 10px;
  }
  
  .crypto-prices {
    grid-template-columns: 1fr;
  }
  
  .draw-stats {
    grid-template-columns: 1fr;
  }
  
  .quick-select {
    flex-wrap: wrap;
  }
  
  .quick-btn {
    min-width: calc(33.33% - 6px);
  }
  
  .history-content {
    padding: 10px;
  }
  
  .history-table thead th,
  .history-table tbody td {
    padding: 10px;
    font-size: 12px;
  }
  
  .history-table .col-time {
    width: 100px;
  }
  
  .history-table .col-tickets {
    width: 60px;
  }
  
  .history-table .col-result,
  .history-table .col-prize,
  .global-table .col-amount {
    width: 80px;
  }
  
  .global-table .col-user {
    width: 140px;
  }
  
  .global-table .user-name {
    max-width: 90px;
  }
  
  .global-table .avatar {
    width: 24px;
    height: 24px;
  }
  
  .badge {
    padding: 2px 6px;
  }
  
  .badge i {
    font-size: 12px;
  }
  
  .modal {
    padding: 10px;
  }
  
  .pool-breakdown {
    font-size: 12px;
  }
  
  .verify-row {
    font-size: 12px;
  }
}

/* 抽奖模式选择区域 */
.draw-mode-selector {
  margin: 15px 0;
  padding: 10px 15px;
  background: #f9fafe;
  border-radius: 8px;
  border: 1px solid #e8eaf6;
}

.mode-label {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin-bottom: 10px;
}

.mode-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mode-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  background: #f0f4ff;
  border-color: #c0d0ff;
}

.mode-tab.active {
  background: #1976d2;
  color: white;
  border-color: #1976d2;
  box-shadow: 0 2px 5px rgba(25, 118, 210, 0.2);
}

.mode-tab i {
  font-size: 16px;
}

.mode-desc {
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  border-left: 3px solid #1976d2;
}

/* 模式详情区域 */
.mode-details {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.user-info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.info-icon {
  width: 36px;
  height: 36px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon i {
  font-size: 20px;
}

.info-content {
  flex: 1;
}

.info-label {
  font-size: 12px;
  color: #777;
}

.info-value {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.detail-note {
  font-size: 12px;
  color: #777;
  margin-top: 8px;
  line-height: 1.4;
}

.detail-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fff3e0;
  border-radius: 4px;
  color: #e65100;
  font-size: 13px;
}

.detail-warning i {
  font-size: 18px;
}

/* 抽奖结果详情样式 */
#match-type-row .result-value {
  font-weight: 500;
  color: #1976d2;
}

#id-difference-row .result-value {
  font-weight: 500;
  color: #1976d2;
}

/* 禁用按钮样式 */
.draw-btn.disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.button-hint {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    border-left: 4px solid #ffeeba;
}

/* 关闭按钮样式优化 */
.close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.close-btn .material-icons {
    margin-right: 4px;
}

.close-text {
    font-size: 14px;
    font-weight: 500;
}

/* 高亮关闭按钮 */
.highlight-close {
    animation: pulse 1.5s infinite;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 结果模态框底部添加关闭按钮 */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

/* 确保模态框内容可滚动 */
.modal-content {
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* 底部关闭按钮样式 */
.btn-outline {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #666;
}

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #999;
    color: #333;
}

/* 确保按钮在移动设备上也能正常显示 */
@media (max-width: 576px) {
    .result-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .result-actions .btn {
        width: 100%;
    }
} 