/* ═══════════════════════════════════════
   MY PROFILE — page-specific styles
   Built on top of css/styles.css (theme vars, navbar, footer, page-hero
   are all inherited from there). Everything below is scoped to the
   .profile-page body / .profile-* classes so it can't leak onto other pages.
═══════════════════════════════════════ */

/* Default .page-content caps at 50rem — this page needs a bit more room
   for the two-side-panel layout + a 4-across creation grid. */
.profile-page .page-content {
  max-width: 62rem;
}

.profile-main {
  display: flex;
  justify-content: center;
  padding: 12px 20px 72px;
}

/* ═══════ Play on PC — the one eye-catching button on the page ═══════
   Lives right under the coin/orb/star pill, in the avatar column. Keeps
   the earlier bold pulse treatment (this is the actual conversion action —
   get the player into the real game client) while everything else around
   it (Discord, share icons, "also on") stays quiet by comparison. */
.play-pc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: var(--coral);
  color: var(--white);
  font-family: 'Luckiest Guy', cursive;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 11px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2), 0 10px 22px rgba(0, 0, 0, 0.3);
  animation: play-pc-pulse 2.2s ease-in-out infinite;
  transition: transform 0.15s, background 0.2s;
}

.play-pc-btn:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
}

.play-pc-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

@keyframes play-pc-pulse {
  0%, 100% { box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2), 0 10px 22px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(235, 66, 41, 0.45); }
  50% { box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2), 0 10px 22px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(235, 66, 41, 0); }
}

.play-pc-also-label {
  margin-top: 12px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.play-pc-platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.play-pc-platform-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.play-pc-platform-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.play-pc-platform-btn img {
  height: 14px;
  width: auto;
  display: block;
}

.profile-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ═══════ Shared panel look ═══════ */
.profile-top-panel,
.profile-bottom-panel {
  position: relative;
  background: rgba(20, 29, 66, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* ═══════ Top panel: Discord | Avatar+stats | Announcements ═══════ */
.profile-top-panel {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 260px) 1fr;
  align-items: start;
  gap: 20px;
  padding: 56px 24px 28px;
}

.profile-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 20px;
  height: 100%;
  box-sizing: border-box;
}

.profile-panel-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.05rem;
  color: var(--white);
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.profile-panel-text {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Discord panel ---- */
.profile-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px;
  background: #5865F2;
  color: var(--white);
  font-family: 'Luckiest Guy', cursive;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.profile-discord-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.profile-discord-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--white);
  flex-shrink: 0;
}

.profile-refer-label {
  margin-top: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.profile-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.profile-share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.profile-share-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.profile-share-icon svg {
  width: 15px;
  height: 15px;
}

/* ---- Notifications panel ---- */
.profile-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.profile-panel-header .profile-panel-title {
  margin-bottom: 0;
}

.profile-notifications-clear {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.profile-notifications-clear:hover {
  color: var(--white);
}

.profile-notifications-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.profile-notification-item {
  position: relative;
  padding-bottom: 10px;
  padding-right: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-notification-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-notification-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
}

.profile-notification-date {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--coral-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.profile-notification-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.profile-notification-dismiss {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  line-height: 1;
}

.profile-notification-dismiss:hover {
  color: var(--white);
}

.profile-notification-dismiss svg {
  width: 12px;
  height: 12px;
}

.profile-notification-empty {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- Avatar + name + stats column ---- */
.profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  margin-top: -76px;
  margin-bottom: 10px;
}

.profile-avatar {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  background: var(--navy);
  border: 4px solid var(--white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar svg {
  width: 100%;
  height: 100%;
}

.profile-avatar-edit {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coral);
  color: var(--white);
  border: 3px solid var(--white);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.profile-avatar-edit:hover {
  background: var(--coral-dark);
  transform: scale(1.08);
}

.profile-avatar-edit svg {
  width: 14px;
  height: 14px;
}

.profile-badge-tag {
  position: absolute;
  bottom: -8px;
  right: -14px;
  background: var(--yellow-card);
  color: var(--navy-deep);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.profile-name {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.4rem;
  color: var(--white);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.18);
  paint-order: stroke fill;
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
}

.profile-joined {
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.profile-stats-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.profile-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--white);
}

.profile-stat svg {
  width: 18px;
  height: 18px;
}

.profile-stat-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
}

/* ═══════ Achievements panel ═══════ */
.profile-achievements-panel {
  position: relative;
  background: rgba(20, 29, 66, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 22px 24px 26px;
}

.profile-achievements-title {
  text-align: center;
  margin-bottom: 18px;
}

.profile-achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  transition: transform 0.2s, border-color 0.2s;
}

.achievement-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.achievement-card.locked {
  opacity: 0.55;
}

.achievement-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow-card);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.achievement-card.locked .achievement-icon {
  background: rgba(255, 255, 255, 0.15);
  filter: grayscale(1);
}

.achievement-icon svg {
  width: 22px;
  height: 22px;
}

/* Real achievement art (assets/achievements/<id>.png) — sized to leave the
   yellow circle visible as a frame around it, matching the trophy-icon
   fallback's proportions (used when no image file matches the id). */
.achievement-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.achievement-body {
  min-width: 0;
  flex: 1;
}

.achievement-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.achievement-name {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--white);
}

.achievement-unlocked-tick {
  color: #6ee7a0;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.achievement-desc {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.3;
  margin-top: 2px;
}

.achievement-progress-track {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.achievement-progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 999px;
}

.achievement-progress-label {
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 860px) {
  .profile-achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ═══════ Bottom panel: tabs + creation grid ═══════ */
.profile-bottom-panel {
  padding: 20px 24px 26px;
}

.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.profile-tab {
  background: none;
  border: none;
  padding: 4px 2px 8px;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Luckiest Guy', cursive;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.profile-tab:hover {
  color: rgba(255, 255, 255, 0.85);
}

.profile-tab.active {
  color: var(--white);
  border-bottom-color: var(--coral);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.profile-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 45%),
              linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, transparent 40%);
  pointer-events: none;
}

.profile-card__stats {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: flex;
  gap: 8px;
}

.profile-card__stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--white);
  font-weight: 800;
  font-size: 0.72rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-card__stat svg {
  width: 12px;
  height: 12px;
}

.profile-card__name {
  position: absolute;
  left: 8px;
  bottom: 8px;
  right: 8px;
  z-index: 1;
  background: var(--yellow-card);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ═══════ Utility ═══════ */
.is-hidden {
  display: none !important;
}

/* ═══════ Toast (mirrors signIn.html's #authToast) ═══════ */
.profile-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  background: rgba(20, 29, 66, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 500;
  max-width: 90vw;
  text-align: center;
}

.profile-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ═══════ Responsive ═══════ */
@media (max-width: 860px) {
  .profile-top-panel {
    grid-template-columns: 1fr;
    padding: 68px 20px 24px;
  }

  .profile-avatar-col {
    order: -1;
  }

  .profile-avatar-wrap {
    margin-top: -84px;
  }

  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .profile-avatar {
    width: 92px;
    height: 92px;
  }

  .profile-avatar-wrap {
    margin-top: -70px;
  }

  .profile-name {
    font-size: 1.2rem;
  }

  .profile-stats-pill {
    gap: 8px;
    padding: 7px 12px;
  }
}
