body.wp-lottery-wheel-active {
}
.wp-site-blocks {
  background: url('/wp-content/uploads/2025/11/bg-1.webp') no-repeat; background-size: 100%; background-color: #F6611F;
  max-width: 650px;
  margin: 0px auto;
}
#lotteryApp {
  max-width: 520px;
  margin: 0 auto 60px;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.wp-site-blocks { padding: 0px;}
.rule-dialog .el-dialog__title {font-size: 40px;}
.lottery-container {
  margin: 0 auto;
  width: min(420px, 90vw);
  position: relative;
  margin-top: 200px;
}
.el-dialog__body {
  padding: 20px 10px;
}
#wheel {
  width: 100% !important;
  height: auto !important;
  max-width: 420px !important;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 20px solid #ff6c36;
  background: #444;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 1);
  position: relative;
  display: block;
  box-sizing: border-box;
  z-index: 1;
  /* 修复无法显示的问题，如果仍然看不到，可以尝试增加以下属性 */
  min-width: 200px;
  min-height: 200px;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 用#wheel::after不会生效，因为canvas元素不支持伪元素，直接通过HTML加元素实现。这里提供 .wheel-text-circle 覆盖轮盘边缘文字的样式 */
.wheel-text-circle {
  pointer-events: none;
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 用于环绕canvas添加SVG文字 */
}

.wheel-text-circle text {
  font-family: Arial, sans-serif;
  font-size: 12px;
  fill: #fff;
  letter-spacing: 9px;
}

.text-center {
  text-align: center;
}
.el-card__header {
  border: 0px;
}
#wheel-text-circle {
  pointer-events: none;
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 10;
  /* 让svg遮住canvas边缘 */
  pointer-events: none;
}

#wheel-text-circle text {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 22px;
  fill: #b89011;
  letter-spacing: 4px;
}
.entry-content {padding: 0px;}
.draw-pointer-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(90px, 25vw, 110px);
  height: clamp(90px, 25vw, 110px);
  z-index: 2;
  background: radial-gradient(circle at 30% 35%, #ff6c36 70%, #ff6c36 100%);
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  border: none;
  border-radius: 50%;
  box-shadow:
    0 4px 18px 4px rgba(0, 0, 0, 0.4),
    0 0 0 6px #555 inset,
    0 1px 2px #555 inset;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  letter-spacing: 2px;
  outline: none;
}

.draw-pointer-btn:active {
  box-shadow:
    0 2px 8px 2px #ff6c36,
    0 0 0 6px #fffad4 inset,
    0 2px 4px #ff6c36 inset;
  transform: translate(-50%, -48%) scale(0.96);
}
.rule-content {
  word-wrap: break-word; /* 旧版属性，兼容老浏览器 */
  word-break: keep-all;  /* 关键：仅在空格/连字符处换行，保留完整单词 */
  white-space: normal;   /* 允许正常换行 */
  width: 100%;
}
.draw-pointer-btn .pointer-icon {
  display: block;
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid #555;
}

.exchange-section {
  margin: 0 auto;
  padding: 20px 24px 30px;
  width: min(420px, 95vw);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
  text-align: left;
  box-sizing: border-box;
}

.button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
}

.button-group .el-button {
  width: 70%;
  margin: 0;
  border-radius: 32px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 14px 0;
}

.draw-count {
  margin-top: 10px;
  color: #888;
  font-size: 16px;
  text-align: center;
}

.prizes-section {
  margin: 0 auto;
  width: min(420px, 95vw);
  padding: 20px 0;
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.prize-card {
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.prize-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prize-card-header {
  padding: 0;
}

.prize-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  display: block;
  padding: 12px 16px;
}
.prize-card-body img {
  width: 70%;
}
.el-card__body, .el-main {padding: 0px;}
.prize-card-body {
  padding: 12px 16px;
  min-height: 60px;
}

.prize-description {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  word-break: break-word;
}
.el-dialog.is-fullscreen {
  max-width: 50% ;
  max-height: 70% ;
  top: 20%;
}
.lw-history-list {
  overflow-y: auto;
  padding-right: 4px;
}

.lw-history-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.lw-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.lw-history-time {
  font-size: 12px;
  color: #999;
}

.lw-history-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.lw-history-badge-win {
  background: #f0f9eb;
  color: #67c23a;
}

.lw-history-badge-lose {
  background: #f4f4f5;
  color: #909399;
}

.lw-history-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lw-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.lw-history-row-copy {
  margin-top: 4px;
}

.lw-history-label {
  color: #999;
  margin-right: 8px;
}

.lw-history-value {
  color: #333;
  text-align: right;
}

.lw-history-serial {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.lw-history-copy-btn {
  padding: 2px 10px;
}

.lw-lookup-wrapper {
  max-width: 640px;
  margin: 30px auto;
}

.lw-lookup-card {
  border-radius: 18px !important;
}

.lw-lookup-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  color: #303133;
}

.lw-lookup-error {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef0f0;
  color: #c45656;
  border: 1px solid #fde2e2;
}

.lw-lookup-result {
  margin-top: 18px;
  border-top: 1px solid #f2f2f2;
  padding-top: 16px;
}

.lw-lookup-meta p,
.lw-lookup-usage p {
  margin: 0 0 6px;
  font-size: 14px;
  color: #444;
}

.lw-lookup-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.lw-lookup-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.lw-lookup-draws {
  margin-top: 18px;
}

.lw-lookup-draw p {
  margin: 0;
  font-size: 13px;
  color: #555;
}

.lw-draw-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lw-draw-prize {
  flex: 1;
  font-weight: 600;
  color: #303133;
}

.lw-draw-alert {
  margin-left: 8px;
  color: #e6a23c;
  font-size: 12px;
}

.lw-lookup-warning {
  padding: 20px;
  border: 1px solid #f5dab1;
  background: #fff9f0;
  color: #e6a23c;
  border-radius: 12px;
  margin: 20px 0;
}

.text-success {
  color: #67c23a;
}

.text-muted {
  color: #909399;
}

@media (max-width: 480px) {
  #lotteryApp {
    max-width: 100%;
    margin: 0;
    padding: 12px 8px 24px;
  }

  .lottery-container {
    width: 100%;
  }

  .exchange-section {
    width: 100%;
    padding: 16px 12px 22px;
  }

  .button-group {
    gap: 12px;
  }

  .button-group .el-button {
    width: 100%;
  }

  .draw-pointer-btn {
    font-size: 20px;
  }

  .draw-count {
    font-size: 14px;
  }
  .prizes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }
}
.lw-history-dialog-mobile {width: 60%; margin: 0 auto;}
.el-button--text span {font-size: 16px; color: #666;}
.lw-history-dialog-mobile {width: 100% ;}
.entry-content {margin: 0px;}

@media (min-width: 768px) {
  #lotteryApp {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
  }
  .prizes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap:15px;
    margin-top:15px;
  }
  .exchange-section {
    align-self: center;
  }
}

@media (max-width: 767px) {
  .lw-history-dialog-mobile {width: 100%; margin: 0 auto;}
  .el-dialog {width: 100% !important;}
  .el-dialog__body {
    padding: 20px 10px;
  }
  .el-dialog__body {padding: 20px 10px !important;}
  .lw-history-card span {font-size: 16px;}
  .rule-dialog .el-dialog__title {font-size: 28px;}
  .rule-dialog h3 {font-size: 21px; font-weight: bold;}
  .rule-dialog ol {font-size: 16px;}
  .el-dialog.is-fullscreen {max-width: 100%; max-height: 100%; top: 0px;}
}