/* BW Nice Number - Apple风格前端样式 */

:root {
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-green: #34c759;
  --apple-red: #ff3b30;
  --apple-orange: #ff9500;
  --apple-gray: #f5f5f7;
  --apple-dark-gray: #86868b;
  --apple-text: #1d1d1f;
  --apple-border: #d2d2d7;
  --apple-shadow: rgba(0, 0, 0, 0.1);
  --apple-radius: 12px;
  --apple-radius-sm: 8px;
  --apple-transition: all 0.2s ease;
}

.bw-nice-number-container {
  max-width: 100%;
  margin: 30px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Helvetica, Arial, sans-serif;
  color: var(--apple-text);
}

.bw-nice-number-message {
  padding: 16px;
  margin-bottom: 24px;
  border-radius: var(--apple-radius);
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.5s ease;
}

.bw-nice-number-message.bw-error {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--apple-text);
  border-left: 4px solid var(--apple-red);
}

.bw-nice-number-message.bw-success {
  background-color: rgba(52, 199, 89, 0.1);
  color: var(--apple-text);
  border-left: 4px solid var(--apple-green);
}

.bw-nice-number-message.bw-info {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--apple-text);
  border-left: 4px solid var(--apple-blue);
}

.bw-nice-number-user-info {
  margin-bottom: 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--apple-text);
  padding: 16px;
  background-color: white;
  border-radius: var(--apple-radius);
  box-shadow: 0 2px 8px var(--apple-shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

.bw-nice-number-user-info::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--apple-green);
  margin-right: 10px;
}

.bw-nice-number-list {
  background-color: white;
  border-radius: var(--apple-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--apple-shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--apple-transition);
}

.bw-nice-number-list:hover {
  box-shadow: 0 4px 16px var(--apple-shadow);
  transform: translateY(-2px);
}

.bw-nice-number-header {
  display: flex;
  background-color: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  color: var(--apple-dark-gray);
  font-size: 14px;
}

.bw-nice-number-header div {
  padding: 16px;
}

.bw-nice-number-item {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
}

.bw-nice-number-item:last-child {
  border-bottom: none;
}

.bw-nice-number-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.bw-number,
.bw-price,
.bw-action {
  padding: 16px;
  display: flex;
  align-items: center;
}

.bw-number {
  flex: 2;
  font-size: 18px;
  font-weight: 600;
  color: var(--apple-text);
  font-family: 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.5px;
}

.bw-price {
  flex: 1;
  color: var(--apple-blue);
  font-weight: 600;
  font-size: 16px;
}

.bw-price::after {
  content: ' 积分';
  font-size: 14px;
  color: var(--apple-dark-gray);
  font-weight: normal;
  margin-left: 4px;
}

.bw-action {
  flex: 1;
  justify-content: center;
}


.bw-not-enough {
  color: var(--apple-red);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.bw-not-enough::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--apple-red);
  margin-right: 6px;
}

.bw-nice-number-pagination {
  margin-top: 24px;
  text-align: center;
}

.bw-nice-number-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  margin: 0 4px;
  border-radius: var(--apple-radius-sm);
  background-color: white;
  border: 1px solid var(--apple-border);
  color: var(--apple-text);
  text-decoration: none;
  font-size: 14px;
  transition: var(--apple-transition);
}

.bw-nice-number-pagination .page-numbers:hover {
  background-color: #f5f5f7;
}

.bw-nice-number-pagination .page-numbers.current {
  background-color: var(--apple-blue);
  color: white;
  border-color: var(--apple-blue);
}

/* 模态框样式 */
.bw-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.bw-modal.show {
  display: flex;
  opacity: 1;
}

.bw-modal-content {
  background-color: white;
  padding: 24px;
  border-radius: var(--apple-radius);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.bw-modal.show .bw-modal-content {
  transform: translateY(0);
}

.bw-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  color: var(--apple-dark-gray);
  transition: var(--apple-transition);
}

.bw-modal-close:hover {
  color: var(--apple-text);
}

.bw-modal h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--apple-text);
  letter-spacing: -0.3px;
}

.bw-modal p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--apple-text);
}

/* #modal-number {
  font-family: 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.5px;
} */

/* #modal-price {
  color: var(--apple-blue);
  font-weight: 600;
} */

.bw-modal-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.bw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--apple-radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--apple-transition);
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Helvetica, Arial, sans-serif;
}

.bw-button-primary {
  background-color: var(--apple-blue);
  color: white;
}

.bw-button-primary:hover {
  background-color: var(--apple-blue-hover);
  transform: translateY(-1px);
}

#bw-cancel-buy {
  background-color: #f5f5f7;
  color: var(--apple-text);
  border: 1px solid var(--apple-border);
}

#bw-cancel-buy:hover {
  background-color: #e8e8ed;
  transform: translateY(-1px);
}

/* 空状态 */
.bw-empty-message {
  text-align: center;
  padding: 40px 0;
  color: var(--apple-dark-gray);
  font-size: 16px;
}

/* 响应式样式 */
@media (max-width: 768px) {

  .bw-nice-number-item,
  .bw-nice-number-header {
    flex-direction: column;
  }

  .bw-number,
  .bw-price,
  .bw-action {
    width: 100%;
    padding: 12px 16px;
    justify-content: flex-start;
  }

  .bw-action {
    padding-bottom: 16px;
  }

  .bw-modal-actions {
    flex-direction: column;
  }

  .bw-button {
    width: 100%;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bw-nice-number-container {
  animation: fadeIn 0.5s ease;
}