/* Profile page styles — modern dark theme with depth and motion */
:root {
  --bg-dark: #030308;
  --bg-panel: rgba(15, 15, 30, 0.6);
  --bg-card: rgba(20, 20, 40, 0.7);
  --bg-card-hover: rgba(25, 25, 50, 0.8);
  --text-main: #ffffff;
  --text-muted: #a0a0b0;
  --accent-cyan: #60efff;
  --accent-purple: #8a2be2;
  --accent-green: #00ff88;
  --accent-orange: #ff8800;
  --accent-red: #ff3355;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --glow-cyan: 0 0 20px rgba(96, 239, 255, 0.4);
  --glow-purple: 0 0 20px rgba(138, 43, 226, 0.4);
  --gradient-accent: linear-gradient(
    135deg,
    var(--accent-cyan),
    var(--accent-purple)
  );
  --gradient-primary: linear-gradient(
    135deg,
    var(--accent-cyan),
    var(--accent-purple)
  );
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Ubuntu", sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Enhanced cosmic background */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Decorative radial gradients */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      ellipse at 20% 80%,
      rgba(96, 239, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(138, 43, 226, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(0, 255, 136, 0.04) 0%,
      transparent 70%
    );
  z-index: 1;
  pointer-events: none;
}

/* Header */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 32px);
  background: rgba(3, 3, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 24px);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.back-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(96, 239, 255, 0.15);
  transform: translate(-50%, -50%);
  transition:
    width 0.4s,
    height 0.4s;
}

.back-btn:hover::before {
  width: 200px;
  height: 200px;
}

.back-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
  background: rgba(96, 239, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

.back-btn i {
  transition: transform 0.3s ease;
}

.back-btn:hover i {
  transform: translateX(-4px);
}

.header-title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  background: var(--gradient-accent);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Main layout */
.main {
  position: relative;
  z-index: 10;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 32px) 80px;
}

/* Sidebar navigation */
.tabs {
  position: absolute;
  right: 100%;
  margin-right: 32px;
  top: 48px;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tab-btn {
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--gradient-accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.tab-btn.active {
  color: var(--text-main);
  background: rgba(96, 239, 255, 0.15);
  box-shadow: 0 0 24px rgba(96, 239, 255, 0.12);
}

.tab-btn.active::before {
  transform: scaleY(1);
}

.tab-btn i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.tab-btn:hover i {
  transform: scale(1.1);
}

/* Tab content */
.tab-content {
  display: none;
  min-width: 0;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-cyan),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  opacity: 0.6;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--accent-cyan);
  font-size: 16px;
}

/* Profile avatar with enhanced effects */
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  margin: 0 auto 20px;
  box-shadow:
    0 0 40px rgba(96, 239, 255, 0.3),
    0 0 80px rgba(138, 43, 226, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.profile-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 50%;
  transition: opacity 0.3s;
}

.profile-avatar:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow:
    0 0 60px rgba(96, 239, 255, 0.5),
    0 0 120px rgba(138, 43, 226, 0.3);
}

.profile-name-display {
  text-align: center;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #fff, var(--accent-cyan), #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

/* Form elements */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(96, 239, 255, 0.1);
}

.form-input::placeholder {
  color: rgba(160, 160, 176, 0.4);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.4s,
    height 0.4s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--bg-dark);
  box-shadow: 0 4px 16px rgba(96, 239, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(96, 239, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-danger {
  background: rgba(255, 51, 85, 0.15);
  border: 1px solid rgba(255, 51, 85, 0.3);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: rgba(255, 51, 85, 0.25);
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 51, 85, 0.3);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Button groups */
.btn-group {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
}

.btn-opt {
  flex: 1;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-opt:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn-opt.active {
  background: var(--gradient-accent);
  color: var(--bg-dark);
  box-shadow: 0 2px 12px rgba(96, 239, 255, 0.4);
}

/* Profile list */
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.3s;
}

.profile-item:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.profile-item.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(96, 239, 255, 0.15);
  background: rgba(96, 239, 255, 0.05);
}

.profile-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px rgba(96, 239, 255, 0.3);
}

.profile-item-name {
  font-weight: 600;
  font-size: 15px;
}

.profile-item-badge {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(96, 239, 255, 0.2);
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.profile-item-actions {
  display: flex;
  gap: 8px;
}

.profile-item-actions button {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.profile-item-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: scale(1.1);
}

.profile-item-actions .delete-btn:hover {
  color: var(--accent-red);
  background: rgba(255, 51, 85, 0.2);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.stat-card:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card .stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s;
}

.stat-card:hover .stat-icon {
  transform: scale(1.2) rotate(10deg);
}

.stat-card .stat-value {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Level display */
.level-display {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.level-badge {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow:
    0 0 40px rgba(96, 239, 255, 0.4),
    0 0 80px rgba(138, 43, 226, 0.3);
  position: relative;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow:
      0 0 40px rgba(96, 239, 255, 0.4),
      0 0 80px rgba(138, 43, 226, 0.3);
  }
  50% {
    box-shadow:
      0 0 60px rgba(96, 239, 255, 0.6),
      0 0 120px rgba(138, 43, 226, 0.4);
  }
}

.level-details {
  flex: 1;
}

.level-title {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.level-xp-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    var(--accent-cyan),
    var(--accent-purple),
    var(--accent-green)
  );
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s linear infinite;
}

/* Game stats table */
.game-stats-table {
  width: 100%;
  border-collapse: collapse;
}

.game-stats-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.game-stats-table th:hover {
  color: var(--accent-cyan);
}

.sort-indicator {
  display: inline-block;
  width: 16px;
  text-align: center;
  font-size: 10px;
  margin-left: 4px;
}

.sort-indicator.asc::after {
  content: "▲";
  color: var(--accent-cyan);
}

.sort-indicator.desc::after {
  content: "▼";
  color: var(--accent-cyan);
}

.game-stats-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.game-stats-table .game-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.game-stats-table tr:hover td {
  background: rgba(96, 239, 255, 0.03);
}

.game-stats-table tr:last-child td {
  border-bottom: none;
}

.game-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.game-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* Achievement cards */
/* ===== ACHIEVEMENTS SECTION - MODERN REDESIGN ===== */

/* Overall summary banner */
.ach-summary-banner {
  background: linear-gradient(
    135deg,
    rgba(96, 239, 255, 0.1),
    rgba(138, 43, 226, 0.1)
  );
  border: 1px solid rgba(96, 239, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.ach-summary-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(96, 239, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

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

.ach-summary-stat {
  text-align: center;
  position: relative;
  z-index: 1;
}

.ach-summary-value {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #60efff, #8a2be2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.ach-summary-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Game card redesigned */
.ach-game-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  margin-bottom: 28px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ach-game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--gradient-primary));
  opacity: 0.6;
  transition: opacity 0.3s;
}

.ach-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--border-hover);
}

.ach-game-card:hover::before {
  opacity: 1;
}

.ach-game-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.game-dot {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  background: transparent;
  padding: 4px;
}

.game-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: inherit;
}

.game-dot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.ach-game-card-name {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.ach-game-card-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.ach-game-card-count {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.ach-game-card-xp {
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.ach-game-card-body {
  padding: 24px;
}

.ach-main-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
}

.ach-main-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ach-main-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

/* Difficulty bars redesigned */
.ach-diff-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.ach-diff-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.ach-diff-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.ach-diff-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--diff-color);
}

.ach-diff-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.ach-diff-fill {
  height: 100%;
  background: var(--diff-color);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--diff-color);
}

.ach-diff-count {
  font-size: 12px;
  color: var(--text-muted);
}

.ach-diff-xp {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Achievement grid instead of list */
.ach-game-ach-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.ach-game-ach-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ach-game-ach-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--achievement-color, var(--gradient-primary));
  transform: scaleY(0);
  transition: transform 0.3s;
}

.ach-game-ach-item:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ach-game-ach-item:hover::before {
  transform: scaleY(1);
}

.ach-game-ach-item.locked {
  opacity: 0.4;
}

.ach-game-ach-item.unlocked {
  border-color: var(--achievement-color, rgba(96, 239, 255, 0.3));
}

.ach-game-ach-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}

.ach-game-ach-item.unlocked .ach-game-ach-icon {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2),
    rgba(255, 215, 0, 0.1)
  );
  border-color: rgba(255, 215, 0, 0.4);
  color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
}

.ach-game-ach-item.locked .ach-game-ach-icon {
  color: var(--text-muted);
}

.ach-game-ach-content {
  flex: 1;
  min-width: 0;
}

.ach-game-ach-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.4;
}

.ach-game-ach-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ach-game-ach-xp {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(96, 239, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(96, 239, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .ach-summary-banner {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }

  .ach-summary-value {
    font-size: 28px;
  }

  .ach-game-ach-list {
    grid-template-columns: 1fr;
  }

  .ach-diff-bars {
    grid-template-columns: 1fr;
  }
}

/* Backup section */
.backup-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.backup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.import-mode-select {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.import-mode-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.import-mode-btn.active {
  border-color: var(--accent-cyan);
  color: var(--text-main);
  background: rgba(96, 239, 255, 0.15);
  box-shadow: 0 0 16px rgba(96, 239, 255, 0.2);
}

.import-mode-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.import-status {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.import-status.success {
  display: block;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--accent-green);
}

.import-status.error {
  display: block;
  background: rgba(255, 51, 85, 0.15);
  border: 1px solid rgba(255, 51, 85, 0.4);
  color: var(--accent-red);
}

/* Responsive */
@media (max-width: 1200px) {
  .tabs {
    position: static;
    flex-direction: row;
    width: 100%;
    margin-bottom: 32px;
    overflow-x: auto;
  }

  .tab-btn {
    flex: 1;
    min-width: fit-content;
    justify-content: center;
  }

  .tab-btn span {
    display: none;
  }

  .main {
    padding-top: 24px;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .level-display {
    flex-direction: column;
    text-align: center;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .btn-opt {
    min-width: 60px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .backup-actions {
    flex-direction: column;
  }

  .import-mode-select {
    flex-direction: column;
  }
}
