/* 基础变量定义 */
:root {
  --primary-color: #4e73df;
  --primary-gradient: linear-gradient(135deg, #4e73df 0%, #3a5bd9 100%);
  --secondary-color: #f8f9fc;
  --success-color: #1cc88a;
  --warning-color: #f6c23e;
  --danger-color: #e74a3b;
  --text-color: #5a5c69;
  --border-radius: 16px;
  --box-shadow: 0 10px 30px rgba(78, 115, 223, 0.15);
  --transition-normal: all 0.3s ease;
  --heart-color: #ff6b6b;
  --gold-gradient: linear-gradient(135deg, #ffd700 0%, #ffcc00 100%);
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: #5a5c69;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%234e73df' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(78, 115, 223, 0.05) 0%, rgba(78, 115, 223, 0) 70%);
  z-index: -1;
}

/* 容器样式 */
.donate-container {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  padding: 0 15px;
  animation: fadeIn 0.8s ease-out;
  perspective: 1000px;
  position: relative;
}

.donate-container::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0) 70%);
  border-radius: 50%;
  top: -75px;
  right: -75px;
  z-index: -1;
  animation: pulse-gold 4s infinite alternate;
}

@keyframes pulse-gold {
  0% { transform: scale(0.8); opacity: 0.3; }
  100% { transform: scale(1.2); opacity: 0.6; }
}

/* 卡片样式 */
.donate-card {
  background: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: var(--transition-normal);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border: 1px solid rgba(78, 115, 223, 0.1);
}

.donate-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 20px 40px rgba(78, 115, 223, 0.25);
  border-color: rgba(78, 115, 223, 0.2);
}

/* 卡片头部 */
.donate-header {
  background: var(--primary-gradient);
  color: white;
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.donate-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 80%);
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.8s, opacity 0.8s;
}

.donate-header:hover::before {
  opacity: 1;
  transform: scale(1);
}

.donate-header h3 {
  margin: 0;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
  position: relative;
  display: inline-block;
}

.donate-header h3::after {
  content: "❤";
  position: absolute;
  font-size: 0.7em;
  color: var(--heart-color);
  top: -5px;
  right: -15px;
  transform: rotate(15deg);
  text-shadow: none;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1) rotate(15deg); }
  5% { transform: scale(1.2) rotate(15deg); }
  10% { transform: scale(1.1) rotate(15deg); }
  15% { transform: scale(1.2) rotate(15deg); }
  50% { transform: scale(1) rotate(15deg); }
  100% { transform: scale(1) rotate(15deg); }
}

/* 卡片内容区 */
.donate-body {
  padding: 35px;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbff 100%);
  position: relative;
}

.donate-body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 5px;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, 
    rgba(78, 115, 223, 0) 0%, 
    rgba(78, 115, 223, 0.3) 50%, 
    rgba(78, 115, 223, 0) 100%);
}

/* 图标样式 */
.donate-icon {
  font-size: 68px;
  margin-bottom: 25px;
  display: inline-block;
  transition: transform 0.5s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  position: relative;
}

.donate-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 20px;
  bottom: -10px;
  left: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 80%);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.5;
  transform: scaleX(0.7);
}

.donate-icon:hover {
  transform: scale(1.15) rotate(5deg);
}

.fa-hands-helping {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(255, 215, 0, 0.3));
}

/* 按钮组样式 */
.donate-btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
}

.donate-btn-group::after {
  content: "选择一个金额支持我们";
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: #6c757d;
  opacity: 0.8;
}

/* 捐赠按钮样式 */
.donate-btn {
  flex: 1;
  min-width: 80px;
  border-radius: 12px;
  transition: all 0.3s;
  background-color: #ffffff;
  border: 2px solid #4e73df;
  color: #4e73df;
  padding: 12px 15px;
  cursor: pointer;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.donate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  z-index: -1;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.donate-btn:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(78, 115, 223, 0.3);
}

.donate-btn:hover::before {
  transform: translateY(0);
  opacity: 1;
}

.donate-btn:active {
  transform: translateY(-1px);
}

/* 特殊金额按钮 */
.donate-btn:nth-child(5) {
  position: relative;
  border-color: #ffd700;
  color: #b8860b;
}

.donate-btn:nth-child(5)::before {
  background: var(--gold-gradient);
}

.donate-btn:nth-child(5)::after {
  content: "推荐";
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ffd700;
  color: #8b4513;
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 10px;
  transform: rotate(15deg);
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 输入组样式 */
.donate-input-group {
  margin-bottom: 30px;
  position: relative;
}

.donate-input-group::before {
  content: "或者";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0 10px;
  font-size: 0.9rem;
  color: #6c757d;
  z-index: 1;
}

.donate-input-group::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #e8eeff;
  z-index: 0;
}

.form-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #4a4a4a;
  font-size: 1.05rem;
  text-align: center;
}

.input-group {
  display: flex;
  width: 100%;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
}

.input-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.input-group-text {
  background-color: #f0f3ff;
  font-weight: 700;
  padding: 14px 20px;
  border: 2px solid #e8eeff;
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: #4e73df;
  font-size: 1.1rem;
}

.form-control {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #e8eeff;
  border-radius: 0 12px 12px 0;
  font-size: 18px;
  transition: all 0.3s;
  font-weight: 500;
}

.form-control:focus {
  outline: none;
  border-color: #4e73df;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
}

.form-text {
  font-size: 0.85rem;
  color: #858796;
  margin-top: 10px;
  padding-left: 5px;
  text-align: center;
}

/* 提交按钮样式 */
.donate-submit-btn {
  background: var(--primary-gradient);
  border: none;
  padding: 16px;
  font-weight: 700;
  letter-spacing: 1.2px;
  transition: all 0.4s;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  width: 100%;
  font-size: 18px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(78, 115, 223, 0.3);
}

.donate-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 75%);
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s;
  z-index: -1;
}

.donate-submit-btn::after {
  content: "❤";
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  opacity: 0;
  transition: all 0.3s;
}

.donate-submit-btn:hover {
  background: linear-gradient(135deg, #3a5bd9 0%, #4e73df 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(78, 115, 223, 0.4);
}

.donate-submit-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 75%);
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s;
  z-index: -1;
}

.donate-submit-btn:hover {
  background: linear-gradient(135deg, #3a5bd9 0%, #4e73df 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(78, 115, 223, 0.4);
}

.donate-submit-btn:hover::after {
  transform: translateX(100%) rotate(45deg);
}

.donate-submit-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(78, 115, 223, 0.3);
}

/* 页脚样式 */
.donate-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
  color: #6c757d;
  padding: 5px;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 15px;
}

/* 图标颜色 */
.success-icon {
  color: #1cc88a;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.warning-icon {
  color: #f6c23e;
  animation: shake 1s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 感谢信息 */
.thank-you-message {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 25px 0;
  color: #4a4a4a;
  background: rgba(78, 115, 223, 0.05);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #4e73df;
}

/* 文本对齐 */
.text-center {
  text-align: center;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.me-2 {
  margin-right: 0.5rem;
}

.w-100 {
  width: 100%;
}

h4 {
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 2px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: var(--primary-gradient);
  border-color: transparent;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3a5bd9 0%, #4e73df 100%);
}

.btn-outline-secondary {
  color: #6c757d;
  background-color: transparent;
  border-color: #6c757d;
}

.btn-outline-secondary:hover {
  color: #fff;
  background-color: #6c757d;
}

.d-flex {
  display: flex;
}

.gap-2 {
  gap: 0.75rem;
}

.justify-content-center {
  justify-content: center;
}

.small {
  font-size: 0.875em;
}

.text-muted {
  color: #6c757d;
}

/* 安全图标样式 */
.fa-lock {
  color: #4e73df;
  margin-right: 5px;
}

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

/* 响应式设计 */
@media (max-width: 576px) {
  .donate-body {
    padding: 25px 20px;
  }
  
  .donate-btn {
    min-width: 70px;
    padding: 10px 5px;
  }
  
  .donate-container {
    padding: 0 10px;
  }
  
  .donate-header h3 {
    font-size: 1.3rem;
  }
  
  .form-control, .input-group-text {
    padding: 10px 15px;
  }
}

/* 添加一些微妙的动画效果 */
.donate-card {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* 添加一些额外的美化效果 */
.bg-warning {
  background: linear-gradient(135deg, #f6c23e 0%, #f5b726 100%) !important;
}

/* 改进表单元素的外观 */
input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
