/* ===== FPS 优化：仅 GPU 层动画 ===== */
:root {
  --primary: #667eea;
  --radius: 12px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.friend-apply-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  will-change: transform;
}
.friend-apply-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  will-change: transform, box-shadow;
  transition: transform var(--transition), box-shadow var(--transition);
}
.friend-apply-card:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.friend-apply-header {
  background: linear-gradient(135deg, var(--primary), #764ba2);
  color: #fff;
  padding: 1.5rem;
  text-align: center;
  will-change: transform;
}
.friend-apply-body {
  padding: 1.5rem;
  will-change: transform;
}
.info-tip {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #1565c0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  will-change: transform;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  will-change: transform;
}
.form-input:focus {
  border-color: var(--primary);
  outline: none;
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  will-change: transform;
}
.submit-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
  will-change: transform;
}
.submit-btn:hover {
  background: #5a67d8;
}
/* 弹窗 GPU 层 */
#custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  will-change: opacity;
}
#custom-modal.show {
  visibility: visible;
  opacity: 1;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.2s;
  will-change: transform;
}
#custom-modal.show .modal-box {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
  will-change: color;
}
.modal-close:hover {
  color: #333;
}
.modal-icon {
  font-size: 44px;
  margin-bottom: 12px;
  will-change: transform;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}
.modal-msg {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}
.modal-ok {
  border: none;
  background: #1677ff;
  color: #fff;
  height: 36px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  will-change: background;
}
.modal-ok:hover {
  background: #0958d9;
}
/* 深色模式仅换背景/边框，文字随主题走 */
[data-theme="dark"] .friend-apply-card,
[data-theme="dark"] .modal-box {
  background: #1e1e1e;
  border-color: #333;
}
[data-theme="dark"] .form-input {
  background: #2a2a2a;
  border-color: #444;
}
[data-theme="dark"] .checkbox-input {
  accent-color: #667eea;
  background: #2a2a2a;
  border-color: #666;
}
