/* 页面整体样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #fff;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  overflow: hidden;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, #ff8300, #ff6a00);
  color: #fff;
  text-align: center;
  padding: 30px 20px;
}

.main-title {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #fff;
}

.subtitle {
  font-size: 14px;
  opacity: 0.95;
  color: #fff;
}

/* 信任标识 */
.trust-badge {
  background: #fff;
  padding: 10px 15px;
  text-align: center;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
}

.trust-badge span {
  margin: 0 8px;
}

.trust-badge .divider {
  margin: 0 5px;
  color: #ddd;
}

/* 礼品区域 */
.gift-section {
  padding: 20px;
  background: #fff;
}

.section-title {
  text-align: center;
  color: #333;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.gift-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0;
}

.gift-item {
  background: #fff;
  border: 1px solid #ffe8d4;
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s;
}

.gift-item:hover {
  border-color: #ff8300;
  box-shadow: 0 2px 8px rgba(255,134,0,0.15);
}

.gift-icon {
  font-size: 20px;
  margin-right: 8px;
  flex-shrink: 0;
}

.gift-name {
  font-size: 12px;
  color: #333;
  line-height: 1.4;
}

.gift-item.highlight {
  background: linear-gradient(135deg, #fff9f5 0%, #fff 100%);
}

.gift-item.highlight .gift-name {
  color: #ff6a00;
  font-weight: 600;
}

.limit-hint {
  text-align: center;
  color: #ff6a00;
  margin-top: 15px;
  font-size: 13px;
  font-weight: 500;
}

/* 表单区域 */
.form-section {
  padding: 20px 25px 30px;
}

.form-group {
  margin-bottom: 12px;
}

.phone-input {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background: #fafafa;
}

.phone-input:focus {
  outline: none;
  border-color: #ff8300;
  background: #fff;
}

.no-invite-code {
  text-align: center;
  margin-top: 10px;
}

.no-invite-link {
  color: #ff6a00;
  cursor: pointer;
  font-size: 13px;
}

.no-invite-link:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff8300, #ff6a00);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255,134,0,0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
}

.privacy-hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

/* 底部 */
.footer {
  background: #fafafa;
  padding: 18px 20px;
  text-align: center;
  font-size: 12px;
  color: #999;
  line-height: 1.8;
  border-top: 1px solid #f0f0f0;
}

/* ==================== 弹窗样式 ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  background: linear-gradient(135deg, #ff8300, #ff6a00);
  color: #fff;
  padding: 20px;
  text-align: center;
  border-radius: 16px 16px 0 0;
}

.modal-header h3 {
  font-size: 18px;
  margin: 0;
}

.modal-body {
  padding: 20px;
}

.modal-tips {
  background: #fff9f5;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #ffe8d4;
}

.tips-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  font-size: 14px;
}

.tips-line {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
}

.tips-line:last-child {
  margin-bottom: 0;
}

.modal-tip {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  color: #666;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #f0f0f0;
}

.modal-btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn.primary {
  background: linear-gradient(135deg, #ff8300, #ff6a00);
  color: #fff;
}

.modal-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,134,0,0.35);
}

.modal-btn.secondary {
  background: #f5f5f5;
  color: #333;
}

.modal-btn.secondary:hover {
  background: #eee;
}

.modal-btn.link-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  color: #999;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.modal-btn.link-btn:hover {
  color: #fff;
  text-decoration: underline;
}

/* 响应式 */
@media (max-width: 480px) {
  body {
    padding: 0;
  }
  
  .container {
    border-radius: 0;
  }
  
  .modal-btn-row {
    flex-direction: column;
  }
  
  .main-title {
    font-size: 22px;
  }
  
  .gift-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}