/* ==========================================================================
   ChargedSMP - My account page
   ========================================================================== */

/* ---------- header / profile ---------- */

.acc-hero {
  padding-bottom: clamp(22px, 3vw, 34px);
}
.acc-hero.is-centered {
  min-height: 78vh;
  display: grid;
  align-items: center;
}
.acc-head {
  min-height: 150px;
  display: grid;
  align-items: end;
}
.acc-hero.is-centered .acc-head {
  align-items: center;
  justify-items: center;
}
.acc-spinner {
  width: 30px;
  height: 30px;
  color: var(--ice);
  justify-self: center;
  align-self: center;
}

.acc-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px 26px;
  align-items: center;
  animation: reveal-in 0.6s var(--ease-out) backwards;
}
.acc-avatar {
  width: 120px;
  height: 120px;
}
.acc-avatar img,
.acc-avatar .avatar {
  width: 96px;
  height: 96px;
  border-radius: 0;
  font-size: 52px;
}
.acc-avatar .mc-head {
  image-rendering: pixelated;
}
.acc-id {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.acc-id h1 {
  font-size: clamp(42px, 6vw, 68px);
  overflow-wrap: anywhere;
  text-shadow:
    0 0.04em 0 #3d6890,
    0 0.08em 0 #24496b,
    0 0.16em 0.2em rgba(0, 0, 0, 0.5);
}
.acc-id .prefix {
  color: #ffaa00;
  text-shadow:
    0 0.04em 0 #9a6609,
    0 0.08em 0 #5e3d05,
    0 0.16em 0.2em rgba(0, 0, 0, 0.5);
}
.acc-meta {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  color: #c4d0e4;
  font-size: 15px;
}
.acc-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.acc-meta svg {
  width: 17px;
  height: 17px;
  color: #8f9aff;
}
.acc-meta i {
  width: 20px;
  height: 20px;
}
.acc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.acc-actions .btn i {
  width: 24px;
  height: 24px;
}

/* logged-out / error box */
.acc-gate {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 40px) clamp(20px, 4vw, 34px);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  animation: reveal-in 0.6s var(--ease-out) backwards;
}
.gate-ico {
  width: 96px;
  height: 96px;
}
.gate-ico i {
  width: 64px;
  height: 64px;
}
.acc-gate h1 {
  font-size: clamp(40px, 6vw, 54px);
}
.acc-gate p {
  color: var(--muted);
  max-width: 400px;
  margin-bottom: 6px;
}

/* ---------- stats ---------- */

.acc-section {
  padding-top: clamp(16px, 2.5vw, 26px);
}
.acc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-width: 0;
}
.stat > .slot {
  width: 58px;
  height: 58px;
  flex: none;
}
.stat > .slot i {
  width: 40px;
  height: 40px;
}
.stat-label {
  font-size: 13.5px;
  color: var(--muted);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  margin: 2px 0 3px;
  font-variant-numeric: tabular-nums;
}
.stat.is-rank .stat-value {
  color: #ffe58a;
}
.stat-sub {
  font-size: 13px;
  color: var(--dim);
}
.stat-sub .link {
  color: var(--ice);
}

/* ---------- panels ---------- */

.acc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.acc-panel {
  padding: clamp(18px, 3vw, 26px);
}
.acc-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 6px;
}
.acc-panel-head h2 {
  font-size: clamp(32px, 3.6vw, 38px);
}
.acc-h3 {
  margin: 18px 0 10px;
  font-size: 21px;
  color: var(--muted);
}
.acc-count {
  font-size: 14px;
  color: var(--muted);
}
.acc-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* item stack count, like in the inventory */
.count {
  position: absolute;
  right: 3px;
  bottom: -1px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
  pointer-events: none;
}

/* ---------- daily keys ---------- */

.claim-status {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.claim-status b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.claim-status .btn {
  margin-bottom: 4px;
}

.crate-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ct {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: #080d19;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.ct-slot {
  position: relative;
  width: 70px;
  height: 70px;
}
.ct-slot i {
  width: 50px;
  height: 50px;
}
.ct-slot .count {
  font-size: 26px;
  right: 4px;
}
.ct-name {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.1;
  color: var(--accent, var(--text));
}

.claims {
  list-style: none;
  margin: 0;
  padding: 0;
}
.claim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 2px solid var(--line);
}
.claim:first-child {
  border-top: 0;
  padding-top: 2px;
}
.claim-when b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.15;
}
.claim-when small {
  font-size: 13px;
  color: var(--dim);
}
.claim-keys {
  display: flex;
  gap: 4px;
  flex: none;
}
.stack-slot {
  position: relative;
}
.stack-slot.mini {
  width: 42px;
  height: 42px;
}
.stack-slot.mini i {
  width: 30px;
  height: 30px;
}
.stack-slot.mini .count {
  font-size: 19px;
  right: 2px;
}
.more-btn {
  margin-top: 12px;
  width: 100%;
}

/* ---------- purchases ---------- */

.orders {
  display: grid;
  gap: 12px;
}
.order {
  background: #080d19;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--line);
}
.order-id {
  font-family: var(--font-display);
  font-size: 20px;
  margin-right: 8px;
}
.order-top small {
  font-size: 13px;
  color: var(--dim);
  white-space: nowrap;
}
.status {
  flex: none;
  padding: 1px 9px;
  border: 2px solid;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.35;
  color: #aaaaaa;
  border-color: rgba(170, 170, 170, 0.3);
  background: rgba(170, 170, 170, 0.06);
}
.s-delivered {
  color: #55ff55;
  border-color: rgba(85, 255, 85, 0.3);
  background: rgba(85, 255, 85, 0.07);
}
.s-paid {
  color: #55ffff;
  border-color: rgba(85, 255, 255, 0.3);
  background: rgba(85, 255, 255, 0.07);
}
.s-pending {
  color: #ffff55;
  border-color: rgba(255, 255, 85, 0.3);
  background: rgba(255, 255, 85, 0.07);
}
.s-failed,
.s-cancelled {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.07);
}
.order-items {
  list-style: none;
  margin: 0;
  padding: 10px 14px;
  display: grid;
  gap: 8px;
}
.order-items li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.order-items .slot {
  width: 42px;
  height: 42px;
  flex: none;
}
.order-items .slot i {
  width: 30px;
  height: 30px;
}
.oi-text {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}
.oi-text b {
  font-weight: 500;
}
.oi-text small {
  font-size: 13px;
  color: var(--dim);
}
.oi-qty {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--muted);
}
.order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 14px 10px;
  border-top: 2px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.order-total b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--text);
}

/* ---------- empty states ---------- */

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
}
.empty .slot {
  width: 64px;
  height: 64px;
}
.empty .slot i {
  width: 44px;
  height: 44px;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .acc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .acc-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .acc-profile {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .acc-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 560px) {
  .acc-profile {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .acc-avatar {
    width: 96px;
    height: 96px;
  }
  .acc-avatar img,
  .acc-avatar .avatar {
    width: 76px;
    height: 76px;
  }
  .acc-actions .btn {
    flex: 1;
  }
  .acc-stats {
    gap: 10px;
  }
  .stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }
  .stat > .slot {
    width: 46px;
    height: 46px;
  }
  .stat > .slot i {
    width: 32px;
    height: 32px;
  }
  .stat-value {
    font-size: 30px;
  }
  .ct-slot {
    width: 58px;
    height: 58px;
  }
  .ct-slot i {
    width: 40px;
    height: 40px;
  }
  .ct {
    padding: 12px 2px 10px;
  }
  .ct-name {
    font-size: 14px;
  }
}

/* Live Minecraft link flow and receipts */
.acc-link-panel { margin-bottom: 22px; }
.acc-link-panel p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.acc-link-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
#link-result { color: var(--ice); overflow-wrap: anywhere; }
.acc-receipt-link { display: inline-flex; margin: 0 0 10px; color: var(--ice); font-size: 14px; text-decoration: underline; }

/* Responsive profile hero with a bottom fade for legible account information. */
.acc-hero:not(.is-centered) { min-height: clamp(325px, 27vw, 390px); }
.acc-hero .page-hero-bg img { object-position: center 43%; }
.acc-hero .page-hero-bg::after {
  background:
    linear-gradient(0deg, #050912 0%, rgba(5,9,18,.77) 29%, rgba(5,9,18,.29) 100%),
    linear-gradient(90deg, rgba(5,9,18,.42), transparent 85%);
}
.acc-id h1 { font-size: clamp(36px, 4.5vw, 60px); line-height: 1.03; }
@media (max-width: 820px) {
  .acc-hero:not(.is-centered) { min-height: 380px; }
}
@media (max-width: 560px) {
  .acc-hero:not(.is-centered) { min-height: 430px; }
  .acc-id h1 { font-size: clamp(34px, 9vw, 48px); }
}
