/* tab3.page.scss */
:host {
  --primary-green: #2ecc71;
  --secondary-green: #27ae60;
  --light-green: #d4efdf;
  --text-dark: #2c3e50;
}

.profile-container,
.login-container {
  max-width: 800px;
  margin: 0 auto;
}

.login-container {
  max-width: 500px;
  margin: 50px auto 0;
}

.user-card,
.login-container ion-card {
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.user-card .avatar-container,
.user-section .avatar-container {
  position: relative;
  margin: 0 auto 15px;
  width: fit-content;
  display: inline-block;
}

.glow-avatar {
  width: 100px;
  height: 100px;
  border: 3px solid white;
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
  transition: transform 0.3s ease;
  animation: avatarGlow 2s ease-in-out infinite;
}

.user-card .glow-avatar {
  border-color: var(--ion-color-success);
  box-shadow: 0 0 15px rgba(var(--ion-color-success-rgb), 0.3);
  animation: none;
}

.vip-badge,
.id-badge {
  position: absolute;
  font-size: 12px;
}

.vip-badge { bottom: -5px; right: -5px; }
.id-badge { bottom: -10px; right: -10px; border-radius: 15px; }

.username {
  font-weight: bold;
  margin-top: 10px;
  color: var(--text-dark);
  font-size: 1.4rem;
  margin: 0;
}

.user-id {
  color: var(--ion-color-medium);
  font-size: 14px;
  color: #7f8c8d;
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.stats-grid {
  margin: 20px 0;
  padding: 0 1rem;
}

.stats-grid .stat-button,
.stats-grid .stat-card {
  height: 100%;
  background: white;
  border-radius: 15px;
  padding: 1.2rem;
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.1);
  transition: all 0.3s ease;
}

.stats-grid .stat-button:active,
.stats-grid .stat-card:active {
  transform: scale(0.98);
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 5px;
  font-size: 2.2rem;
  color: var(--primary-green);
  margin-bottom: 0.8rem;
}

.stats-grid h3 {
  margin: 5px 0;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-dark);
  margin: 0;
  font-size: 1.6rem;
}

.stats-grid p {
  margin: 0;
  font-size: 14px;
  color: var(--ion-color-medium);
  color: #7f8c8d;
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}

.stats-grid .stat-card.history { border-left: 4px solid var(--primary-green); }
.stats-grid .stat-card.favorite { border-left: 4px solid #e74c3c; }

.menu-list {
  background: transparent;
  margin-bottom: 20px;
  margin: 1.5rem 0;
}

.menu-list ion-item,
.menu-list .menu-item {
  --border-color: rgba(var(--ion-color-medium-rgb), 0.1);
  --padding-start: 10px;
  --padding-end: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  --background-hover: #e8f8f1;
  --border-radius: 12px;
  margin: 0.5rem 1rem;
  transition: transform 0.3s ease;
}

.menu-list ion-item ion-icon,
.menu-list .menu-item ion-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.menu-list .menu-item:active { transform: scale(0.98); }

.menu-list ion-label {
  color: var(--text-dark);
  font-weight: 500;
}

.menu-list ion-note { font-size: 0.85rem; }

.logout-button { margin: 20px 0; }

.version-info,
.version-section {
  text-align: center;
  font-size: 12px;
  padding: 2rem 1rem;
}

.version-info ion-text,
.version-section ion-text {
  display: block;
  margin-bottom: 5px;
  margin: 0.3rem 0;
  font-size: 0.85rem;
}

.header-bar {
  --background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  --color: white;
}

.header-bar .app-title {
  font-weight: 500;
  letter-spacing: 1px;
}

.header-bar .header-icon {
  font-size: 1.8rem;
  margin-right: 12px;
}

.profile-content {
  background: linear-gradient(var(--light-green) 30%, #ffffff 70%);
}

.user-section {
  padding: 2rem 1rem;
  text-align: center;
}

.user-section .user-info { margin-top: 1.5rem; }

/* 动画效果 */
@keyframes avatarGlow {
  0% { box-shadow: 0 0 10px rgba(46, 204, 113, 0.3); }
  50% { box-shadow: 0 0 20px rgba(46, 204, 113, 0.5); }
  100% { box-shadow: 0 0 10px rgba(46, 204, 113, 0.3); }
}

.glow-avatar:active { transform: scale(0.95); }
.stats-grid .stat-card { flex: initial; }