/* ---------- 认证页面样式 ---------- */

.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 50%, #0d1f3c 100%); padding: 40px 20px;
  position: relative; overflow: auto;
}

.auth-page::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(46, 154, 219, .15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(255, 138, 61, .1) 0%, transparent 50%);
}

#particles-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
}

.auth-container {
  width: 100%; max-width: 440px; position: relative; z-index: 10;
}

.auth-card {
  background: #fff; border-radius: 20px; padding: 48px 40px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .3); position: relative; z-index: 100;
}

.auth-header {
  text-align: center; margin-bottom: 36px;
}

.auth-logo {
  width: 70px; height: 70px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #3A7BD5, #1a2d4a);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 25px rgba(58, 123, 213, .3);
}

.auth-logo svg { width: 40px; height: 40px; color: #fff; }

.auth-title {
  font-size: 24px; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 13px; color: var(--muted);
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { position: relative; z-index: 101; }

.form-group label {
  display: block; font-size: 13px; font-weight: 600; color: var(--primary-dark);
  margin-bottom: 6px; pointer-events: none;
}

.form-group input {
  width: 100%; padding: 13px 15px; border: 2px solid var(--border); border-radius: 10px;
  font-size: 14px; transition: all .3s; background: #fff; position: relative; z-index: 102;
}

.form-group input:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(58, 123, 213, .1);
}

.form-group .input-icon {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}

.form-group .input-icon svg { width: 18px; height: 18px; }

.auth-btn {
  width: 100%; padding: 15px; background: var(--grad); color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .3s; margin-top: 8px; position: relative; z-index: 102;
}

.auth-btn:hover {
  transform: translateY(-2px); box-shadow: 0 8px 25px rgba(58, 123, 213, .4);
}

.auth-btn:disabled {
  opacity: .6; cursor: not-allowed; transform: none;
}

.auth-links {
  display: flex; justify-content: space-between; margin-top: 16px;
  font-size: 13px; position: relative; z-index: 102;
}

.auth-links a {
  color: var(--primary); text-decoration: none; transition: color .3s; cursor: pointer;
}

.auth-links a:hover { color: var(--accent); }

.auth-divider {
  display: flex; align-items: center; gap: 16px; margin: 20px 0;
  color: var(--muted); font-size: 13px; position: relative; z-index: 102;
}

.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.social-login {
  display: flex; gap: 12px; position: relative; z-index: 102;
}

.social-btn {
  flex: 1; padding: 11px; border: 2px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer; transition: all .3s; display: flex;
  align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text); position: relative; z-index: 102;
}

.social-btn:hover {
  border-color: var(--primary); background: var(--primary-light);
}

.social-btn svg { width: 20px; height: 20px; }

.auth-footer {
  text-align: center; margin-top: 24px; font-size: 14px; color: var(--muted);
  position: relative; z-index: 102;
}

.auth-footer a {
  color: var(--primary); font-weight: 600; text-decoration: none; cursor: pointer;
}

/* 错误提示 */
.auth-error {
  background: #FEE2E2; color: #DC2626; padding: 12px 16px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px; display: none;
}

.auth-error.show { display: block; }

/* 成功提示 */
.auth-success {
  background: #D1FAE5; color: #059669; padding: 12px 16px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px; display: none;
}

.auth-success.show { display: block; }

/* 加载状态 */
.auth-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 14px;
}

.auth-loading .spinner {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 会员中心样式 ---------- */

.member-page {
  min-height: 100vh; padding-top: 80px;
  background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 50%, #0d1f3c 100%);
  position: relative;
}

.member-page::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(46, 154, 219, .15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(255, 138, 61, .1) 0%, transparent 50%);
}

.member-container {
  position: relative; z-index: 1;
}

.member-container {
  max-width: 1200px; margin: 0 auto; padding: 40px 5%;
}

.member-header {
  display: flex; align-items: center; gap: 24px; margin-bottom: 40px;
  background: rgba(255, 255, 255, .95); padding: 32px; border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.member-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
}

.member-info h2 {
  font-size: 22px; margin-bottom: 4px;
}

.member-info p {
  color: var(--muted); font-size: 13px;
}

.member-role {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; margin-top: 8px;
}

.member-role.admin {
  background: rgba(58, 123, 213, .1); color: var(--primary);
}

.member-role.member {
  background: rgba(255, 138, 61, .1); color: var(--accent);
}

.member-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
}

.member-sidebar {
  background: rgba(255, 255, 255, .95); border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.member-menu { display: flex; flex-direction: column; gap: 4px; }

.member-menu-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 15px;
  border-radius: 10px; cursor: pointer; transition: all .3s;
  font-size: 14px; color: var(--text);
}

.member-menu-item:hover {
  background: rgba(58, 123, 213, .1);
}

.member-menu-item.active {
  background: rgba(58, 123, 213, .15); color: var(--primary); font-weight: 600;
}

.member-menu-item.active {
  background: var(--primary-light); color: var(--primary); font-weight: 600;
}

.member-menu-item svg { width: 20px; height: 20px; }

.member-content {
  background: rgba(255, 255, 255, .95); border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.member-section { display: none; }
.member-section.active { display: block; }

.member-section h3 {
  font-size: 18px; margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* 表单样式 */
.profile-form { display: flex; flex-direction: column; gap: 20px; }

.profile-form .form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

/* 表格样式 */
.admin-table {
  width: 100%; border-collapse: collapse;
}

.admin-table th, .admin-table td {
  padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg-soft); font-weight: 600; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
}

.admin-table td { font-size: 13px; }

.admin-table tr:hover { background: rgba(58, 123, 213, .05); }

/* 权限开关 */
.permission-toggle {
  display: flex; align-items: center; gap: 11px; padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.permission-toggle:last-child { border-bottom: none; }

.permission-label {
  flex: 1; font-size: 13px;
}

.toggle-switch {
  position: relative; width: 48px; height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 26px; transition: .3s;
}

.toggle-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: .3s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* 响应式 */
@media (max-width: 768px) {
  .auth-card { padding: 32px 24px; }
  
  .member-grid { grid-template-columns: 1fr; }
  
  .member-header {
    flex-direction: column; text-align: center;
  }
  
  .member-avatar { margin: 0 auto; }
  
  .profile-form .form-row { grid-template-columns: 1fr; }
}