/*! Custom Tailwind CSS for Recharge Page */

/* 基础重置样式 */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  line-height: inherit;
  background-color: #ffffff;
  color: #1f2937;
}

/* 基础工具类 */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-gray-500 { background-color: #6b7280; }
.bg-gray-800 { background-color: #1f2937; }
.bg-black { background-color: #000000; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-300 { background-color: #fde047; }
.bg-yellow-400 { background-color: #facc15; }
.bg-red-500 { background-color: #ef4444; }

.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; margin-left: 10px;}
.text-base { font-size: 1rem; line-height: 1.5rem; margin-left: 15px;}
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }

.flex { display: flex; }
.hidden { display: none; }
.grid { display: grid; }
.inline-block { display: inline-block; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }

.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }

.w-5 { width: 1.25rem; }
.w-10 { width: 2.5rem; }
.w-full { width: 100%; }

.h-5 { height: 1.25rem; }
.h-full { height: 100%; }

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-gray-300 { border-color: #d1d5db; }
.border-primaryYellow { border-color: #FFD54F; }

.rounded { border-radius: 1rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto { overflow-y: auto; }

.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.z-50 { z-index: 50; }

.top-20 { top: 5rem; }
.left-1\/2 { left: 50%; }
.-translate-x-1\/2 { transform: translateX(-50%); }

.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-span-3 { grid-column: span 3 / span 3; }
.gap-3 { gap: 0.75rem; }

.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }

.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:bg-yellow-50:hover { background-color: #fefce8; }
.hover\:bg-yellow-400:hover { background-color: #facc15; }
.hover\:text-gray-500:hover { color: #6b7280; }
.hover\:underline:hover { text-decoration: underline; }

.focus\:border-primaryYellow:focus { border-color: #FFD54F; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

.disabled\:opacity-70:disabled { opacity: 0.7; }

.max-w-md { max-width: 28rem; }
.max-h-\[80vh\] { max-height: 80vh; }

.bg-black\/50 { background-color: rgb(0 0 0 / 0.5); }
.bg-black\/80 { background-color: rgb(0 0 0 / 0.8); }

/* 自定义颜色 */
.text-primaryYellow { color: #FFD54F; }
.text-wechatGreen { color: #07C160; }
.text-alipayBlue { color: #1677FF; }

.bg-primaryYellow { background-color: #FFD54F; }
.bg-wechatGreen { background-color: #07C160; }
.bg-alipayBlue { background-color: #1677FF; }

.border-primaryYellow { border-color: #FFD54F; }


/* 加载动画 */
.loading-spin {
  width: 20px; 
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spin-sm {
  width: 16px; 
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { 
  to { transform: rotate(360deg); } 
}

/* 支付方式选中状态 */
.pay-method-active { 
  background-color: #fefce8; 
  border-color: #FFD54F; 
  border-width: 2px;
}

.pay-check-active { 
  background-color: #10B981; 
  border-color: #10B981; 
}

/* 支付方式未选中状态 */
.pay-method-inactive {
  background-color: #ffffff;
  border-color: #e5e7eb;
  border-width: 1px;
}

.pay-check-inactive {
  background-color: #ffffff;
  border-color: #d1d5db;
  border-width: 2px;
}

/* 按钮加载状态 */
.btn-loading { 
  opacity: 0.7; 
  cursor: not-allowed; 
}

/* 触摸反馈 */
.touchable {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.card-active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

.transition-scale { 
  transition-property: transform; 
}

.duration-100 { 
  transition-duration: 100ms; 
}

.ease-tap { 
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1); 
}

/* 支付方式图片样式 */
.payment-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* 星币图片样式 */
.star-coin-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* 协议弹窗内容样式 */
.agreement-content {
  font-size: 16px;
  line-height: 1.8;
  max-height: calc(80vh - 100px);
}

/* 圆形checkbox样式 */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  background-color: #ffffff;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

input[type="checkbox"]:hover {
  border-color: #FFD54F;
}

input[type="checkbox"]:checked {
  background-color: #10B981;
  border-color: #10B981;
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}
