/* account.css — 账号系统样式 */

/* ════════════════════════════════════════
   账号弹窗
═════════════════════════════════════════ */

.account-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: accountFadeIn 0.2s ease;
}

.account-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: accountSlideUp 0.3s ease;
}

.account-modal-content h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  text-align: center;
  color: #333;
}

/* 昵称输入框 */
.account-nickname-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.account-nickname-input:focus {
  border-color: #667eea;
}

/* 弹窗按钮组 */
.account-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.account-modal-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.account-modal-btn.cancel {
  background: #f5f5f5;
  color: #666;
}

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

.account-modal-btn.confirm {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

.account-modal-btn.confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.account-modal-btn.danger {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
}

.account-modal-btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* 重置警告文字 */
.account-reset-warning {
  font-size: 0.85rem;
  color: #ff6b6b;
  line-height: 1.6;
  text-align: center;
}

/* ════════════════════════════════════════
   头像选择网格
═════════════════════════════════════════ */

.account-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}

.account-avatar-option {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 2px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.account-avatar-option:hover {
  border-color: #667eea;
  background: #f8f7ff;
  transform: scale(1.05);
}

.account-avatar-option.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea20, #764ba220);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* ════════════════════════════════════════
   账号页面 — 个人资料卡片
═════════════════════════════════════════ */

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #667eea15, #764ba215);
  border-radius: 16px;
  margin-bottom: 20px;
}

.account-profile-avatar {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.account-profile-info {
  flex: 1;
  min-width: 0;
}

.account-profile-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-id {
  font-size: 0.75rem;
  color: #999;
  font-family: monospace;
  margin-bottom: 4px;
}

.account-profile-level {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.account-profile-level .level-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.account-profile-level .level-title {
  font-size: 0.8rem;
  color: #764ba2;
}

.account-profile-days {
  font-size: 0.8rem;
  color: #667eea;
}

/* ════════════════════════════════════════
   账号等级卡片
════════════════════════════════════════ */

.account-level-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.account-level-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.account-level-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-level-icon {
  font-size: 40px;
  animation: levelFloat 3s ease-in-out infinite;
}

@keyframes levelFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.account-level-info {
  flex: 1;
}

.account-level-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.account-level-title .level-number {
  font-size: 24px;
  font-weight: 700;
}

.account-level-title .level-name {
  font-size: 14px;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 12px;
}

.account-level-exp-bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.account-level-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffec8b);
  border-radius: 4px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.account-level-exp-text {
  font-size: 12px;
  opacity: 0.85;
}

.account-level-arrow {
  font-size: 14px;
  opacity: 0.7;
  transition: transform 0.3s;
}

/* 等级详情展开区 */
.account-level-detail {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.2);
  animation: slideDown 0.3s ease;
}

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

.level-detail-section {
  margin-bottom: 14px;
}

.level-detail-section h5 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  opacity: 0.95;
}

.level-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.level-detail-item {
  background: rgba(255,255,255,0.15);
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
}

.level-detail-item span {
  font-size: 16px;
  display: block;
  margin-bottom: 2px;
}

.level-titles-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.level-title-mini {
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 4px;
}

.level-title-mini.unlocked {
  background: rgba(255,255,255,0.25);
  opacity: 1;
}

.level-title-mini span {
  font-size: 14px;
}

.level-detail-tip {
  font-size: 12px;
  opacity: 0.8;
  text-align: center;
  padding-top: 8px;
}

/* 复制按钮 */
.account-copy-btn {
  padding: 6px 14px;
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #667eea;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.account-copy-btn:hover {
  background: #667eea;
  color: #fff;
}

/* ════════════════════════════════════════
   菜单用户信息
═════════════════════════════════════════ */

.menu-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-user-info:hover {
  background: #f9f9f9;
}

.menu-user-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: #f0f0f0;
  border-radius: 10px;
  flex-shrink: 0;
}

.menu-user-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-user-arrow {
  color: #ccc;
  font-size: 0.8rem;
}

/* ════════════════════════════════════════
   动画
═════════════════════════════════════════ */

@keyframes accountFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes accountSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ════════════════════════════════════════
   移动端适配
═════════════════════════════════════════ */

@media (max-width: 480px) {
  .account-modal-content {
    padding: 20px;
    margin: 0 16px;
  }

  .account-avatar-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .account-avatar-option {
    font-size: 1.4rem;
  }

  .account-profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 2rem;
  }

  .account-profile-name {
    font-size: 1.05rem;
  }
}
