/**
 * profile-card.css - 资料卡组件专属样式
 * 用于首页的3行x4列资料卡
 */

/* ========== 资料卡组件 - 3行×4列 ========== */
.profile-card {
  grid-column: span 4;
  grid-row: span 3;
  background: transparent;
  backdrop-filter: blur(var(--blur-strong));
  -webkit-backdrop-filter: blur(var(--blur-strong));
  border: none;
  border-radius: var(--widget-border-radius-lg);
  color: var(--widget-text-strong);
  overflow: visible;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--widget-box-shadow);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

.profile-card:active {
  transform: scale(0.98);
}

.profile-banner {
  width: 100%;
  height: 45%;
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-4xl);
  border-radius: var(--widget-border-radius-lg) var(--widget-border-radius-lg) 0 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-banner::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 40%, rgba(13,13,13,0.25) 100%);
  pointer-events: none;
}

.profile-banner i {
  font-size: 64px;
  color: var(--text-white);
  text-shadow: var(--widget-text-shadow);
  z-index: 1;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  border: 4px solid var(--widget-surface);
  position: absolute;
  top: calc(45% - 35px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xxl);
  box-shadow: var(--widget-box-shadow);
  z-index: 2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-avatar i {
  font-size: 32px;
  color: var(--text-white);
  text-shadow: var(--widget-text-shadow);
}

.profile-info {
  padding: 55px 20px 18px;
  text-align: center;
  background: transparent;
}

.profile-username {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 6px;
  text-shadow: none;
  color: var(--widget-text-strong);
}

.profile-bio {
  font-size: var(--font-size-sm);
  opacity: 1;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--widget-text-muted);
}

.profile-location {
  font-size: var(--font-size-xs);
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--widget-text-muted);
}

.profile-location i {
  font-size: var(--font-size-xs);
}

/* ========== 夜间模式适配 ========== */
[data-theme="dark"] .profile-avatar {
  border-color: var(--bg-card);
}

/* ========== 响应式适配 ========== */
@media (max-height: 800px) {
  .profile-avatar {
    width: 60px;
    height: 60px;
    top: calc(45% - 30px);
  }
  
  .profile-avatar i {
    font-size: 26px;
  }
  
  .profile-info {
    padding: 48px 16px 12px;
  }
  
  .profile-username {
    font-size: var(--font-size-base-lg);
  }
  
  .profile-bio {
    font-size: var(--font-size-xs);
  }
  
  .profile-location {
    font-size: var(--font-size-xxs);
  }
}

@media (max-width: 375px) {
  .profile-avatar {
    width: 55px;
    height: 55px;
    top: calc(45% - 27.5px);
  }
  
  .profile-avatar i {
    font-size: 24px;
  }
  
  .profile-info {
    padding: 45px 12px 10px;
  }
}

/* ========== 动画效果 ========== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.profile-card.pulse {
  animation: pulse 0.4s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card.slide-in {
  animation: slideIn 0.4s ease-out;
}

