/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-06-03 10:28:07
 * Fingerprint: 18f8d0015be24d2b
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

/* Steam Profile Card */
.steam-profile-card { min-height: 80px; }

/* === Header: 头像 + 用户信息 + 统计标签 === */
.steam-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4, 16px);
}

.steam-avatar-link { flex-shrink: 0; }

.steam-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg, 12px);
  object-fit: cover;
  border: 2px solid var(--color-border, rgba(255,255,255,0.1));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.steam-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.steam-user-info { flex: 1; min-width: 0; }

.steam-username {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.steam-username a {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text, #fff);
  text-decoration: none;
  transition: color 0.2s;
}
.steam-username a:hover { color: var(--color-accent, #66c0f4); }

/* Level Badge */
.steam-level {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full, 999px);
  background: var(--color-accent, #66c0f4);
  color: #fff;
  letter-spacing: 0.5px;
}

/* Status */
.steam-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full, 999px);
  font-weight: 500;
}
.steam-status-dot { width: 6px; height: 6px; border-radius: 50%; }

.steam-status--online { background: rgba(87,203,222,0.15); color: #57cbde; }
.steam-status--online .steam-status-dot { background: #57cbde; box-shadow: 0 0 6px #57cbde; }
.steam-status--away { background: rgba(255,193,7,0.15); color: #ffc107; }
.steam-status--away .steam-status-dot { background: #ffc107; }
.steam-status--offline { background: rgba(144,144,144,0.15); color: #909090; }
.steam-status--offline .steam-status-dot { background: #909090; }

/* Platform Tag (紧跟状态右侧) */
.steam-platform-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full, 999px);
  background: rgba(255,255,255,0.06);
  color: var(--color-text-secondary, rgba(255,255,255,0.5));
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
}

.steam-realname {
  font-size: 0.85rem;
  color: var(--color-text-secondary, rgba(255,255,255,0.6));
  margin-bottom: 4px;
}
.steam-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.steam-meta-item {
  font-size: 0.8rem;
  color: var(--color-text-secondary, rgba(255,255,255,0.6));
}

/* Ban Tag */
.steam-ban-tag {
  color: #ff4d4f;
  background: rgba(255,77,79,0.12);
  padding: 1px 6px;
  border-radius: var(--radius-full, 999px);
  font-size: 0.75rem;
  font-weight: 500;
}

/* === Stats Tags (水平排列在 header 最右侧) === */
.steam-header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
  align-items: center;
  max-width: 280px;
}

.steam-stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full, 999px);
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent, #66c0f4) 25%, transparent);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.steam-stat-tag:hover {
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 15%, transparent);
  border-color: var(--color-accent, #66c0f4);
}
.steam-stat-tag .steam-stat-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text, #fff);
}
.steam-stat-tag .steam-stat-label {
  font-size: 0.7rem;
  color: var(--color-text-secondary, rgba(255,255,255,0.5));
}

/* === XP Capsule (胶囊进度条) === */
.steam-xp-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 200px;
  max-width: 260px;
  padding: 3px 10px;
  border-radius: var(--radius-full, 999px);
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent, #66c0f4) 25%, transparent);
}
.steam-xp-lv {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-secondary, rgba(255,255,255,0.5));
  white-space: nowrap;
}
.steam-xp-track {
  flex: 1;
  min-width: 60px;
  height: 4px;
  background: var(--color-border, rgba(255,255,255,0.1));
  border-radius: 2px;
  overflow: hidden;
}
.steam-xp-fill {
  height: 100%;
  background: var(--color-accent, #66c0f4);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.steam-xp-hint {
  font-size: 0.6rem;
  color: var(--color-text-secondary, rgba(255,255,255,0.4));
  white-space: nowrap;
}
.steam-xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* === Badge Icons (XP 行右侧小徽章) === */
.steam-badge-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}
.steam-badge-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--color-accent, #66c0f4) 25%, transparent);
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 8%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.steam-badge-icon:hover {
  transform: scale(1.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1;
}
.steam-badge-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--color-accent, #66c0f4);
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent, #66c0f4) 25%, transparent);
  white-space: nowrap;
  cursor: default;
  transition: transform 0.2s ease;
}
.steam-badge-tag:hover {
  transform: scale(1.15);
}

/* === Achievement Section === */
.steam-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary, rgba(255,255,255,0.6));
  margin-bottom: 8px;
}
.steam-achievement-section {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md, 10px);
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent, #66c0f4) 12%, transparent);
}
.steam-ach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.steam-ach-game {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text, #fff);
}
.steam-ach-stats {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text, #fff);
}
.steam-ach-pct {
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-secondary, rgba(255,255,255,0.5));
}
.steam-ach-bar {
  height: 6px;
  background: var(--color-border, rgba(255,255,255,0.1));
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.steam-ach-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #5ba32b, #8bc34a);
  transition: width 0.6s ease;
}
.steam-ach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.steam-ach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full, 999px);
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent, #66c0f4) 20%, transparent);
  transition: background 0.2s, border-color 0.2s;
}
.steam-ach-chip:hover {
  background: color-mix(in srgb, var(--color-accent, #66c0f4) 15%, transparent);
  border-color: var(--color-accent, #66c0f4);
}
.steam-ach-chip-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text, #fff);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.steam-ach-chip-time {
  font-size: 0.65rem;
  color: var(--color-text-secondary, rgba(255,255,255,0.4));
  white-space: nowrap;
}

/* === Toggle Button (折叠按钮) === */
.steam-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 16px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #fff;
  background: var(--color-accent, #66c0f4);
  border: none;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.15s ease;
  font-family: inherit;
}
.steam-toggle-btn:hover { opacity: 0.85; }
.steam-toggle-btn:active { transform: scale(0.98); }
.steam-toggle-btn .steam-section-title { color: #fff; }
.steam-toggle-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.steam-toggle-btn--open .steam-toggle-chevron {
  transform: rotate(180deg);
}

/* === Collapsible Panel (折叠面板) === */
.steam-collapse-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.steam-collapse-panel .steam-game-grid {
  padding-top: 12px;
}

/* === Fallback More Button (无游戏时) === */
.steam-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 16px;
  padding: 10px 0;
  font-size: 0.85rem;
  color: #fff;
  background: var(--color-accent, #66c0f4);
  border: none;
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.15s ease;
  font-family: inherit;
}
.steam-btn-icon { width: 14px; height: 14px; }
.steam-more-btn:hover { opacity: 0.85; color: #fff; }
.steam-more-btn:active { transform: scale(0.98); }

/* === Game Grid (模态框内游戏卡片) === */
.steam-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.steam-game-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-mute, rgba(255,255,255,0.04));
}
.steam-game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.steam-game-card:hover .steam-game-card-img {
  transform: scale(1.08);
}
.steam-game-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.steam-game-card:hover .steam-game-card-overlay {
  opacity: 1;
}
.steam-game-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.steam-game-card-time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
}

/* === Loading & Error === */
.steam-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--color-text-secondary, rgba(255,255,255,0.5));
  font-size: 0.875rem;
}
.steam-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border, rgba(255,255,255,0.1));
  border-top-color: var(--color-accent, #66c0f4);
  border-radius: 50%;
  animation: steam-spin 0.8s linear infinite;
}
@keyframes steam-spin { to { transform: rotate(360deg); } }
.steam-error {
  text-align: center;
  padding: 24px;
  color: var(--color-text-secondary, rgba(255,255,255,0.5));
  font-size: 0.875rem;
}

/* === Responsive === */
@media (max-width: 640px) {
  .steam-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .steam-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md, 8px);
    border-width: 1.5px;
  }
  .steam-user-info { flex: 1; min-width: 0; }
  .steam-username { gap: 5px; margin-bottom: 3px; }
  .steam-username a { font-size: 0.85rem; }
  .steam-level { font-size: 0.55rem; padding: 0 5px; }
  .steam-status { font-size: 0.6rem; padding: 1px 5px; }
  .steam-status-dot { width: 5px; height: 5px; }
  .steam-platform-tag { font-size: 0.55rem; padding: 1px 5px; }
  .steam-realname { font-size: 0.7rem; margin-bottom: 2px; }
  .steam-meta { gap: 6px; }
  .steam-meta-item { font-size: 0.65rem; }
  .steam-ban-tag { font-size: 0.6rem; padding: 0 4px; }
  .steam-header-stats {
    flex-basis: 100%;
    max-width: none;
    gap: 4px;
  }
  .steam-stat-tag { padding: 2px 6px; }
  .steam-stat-tag .steam-stat-num { font-size: 0.65rem; }
  .steam-stat-tag .steam-stat-label { font-size: 0.55rem; }
  .steam-xp-row { margin-top: 4px; gap: 6px; }
  .steam-xp-capsule { min-width: 120px; max-width: 180px; padding: 2px 6px; }
  .steam-xp-lv { font-size: 0.5rem; }
  .steam-xp-track { height: 3px; }
  .steam-xp-hint { font-size: 0.5rem; }
  .steam-badge-icons { gap: 3px; }
  .steam-badge-icon { width: 16px; height: 16px; border-radius: 3px; }
  .steam-badge-tag { min-width: 16px; height: 16px; font-size: 0.45rem; padding: 0 3px; }
  .steam-achievement-section { padding: 8px 10px; margin-top: 8px; }
  .steam-ach-game { font-size: 0.7rem; }
  .steam-ach-stats { font-size: 0.65rem; }
  .steam-ach-pct { font-size: 0.55rem; margin-left: 4px; }
  .steam-ach-bar { height: 4px; margin-bottom: 6px; }
  .steam-ach-chips { gap: 4px; }
  .steam-ach-chip { padding: 2px 6px; gap: 4px; }
  .steam-ach-chip-name { font-size: 0.6rem; max-width: 80px; }
  .steam-ach-chip-time { font-size: 0.5rem; }
  .steam-section-title { font-size: 0.75rem; }
  .steam-toggle-btn { padding: 7px 10px; font-size: 0.75rem; margin-top: 8px; border-radius: 6px; }
  .steam-toggle-chevron { width: 14px; height: 14px; }
  .steam-more-btn { padding: 7px 0; font-size: 0.75rem; margin-top: 8px; border-radius: 6px; }
  .steam-btn-icon { width: 12px; height: 12px; }
  .steam-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
  }
  .steam-game-card { border-radius: 8px; }
  .steam-game-card-name { font-size: 0.6rem; }
  .steam-game-card-time { font-size: 0.5rem; }
  .steam-game-card-overlay { padding: 5px; }
}
