/* Card Details page — redesign */
:root {
  --bg: #08090c;
  --bg-gradient-top: #142042;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-blue: rgba(74, 124, 255, 0.4);
  --text: #f5f6f8;
  --text-muted: #8a92a8;
  --text-dim: #4f6080;
  --gold: #d4af6a;
  --gold-bright: #e8c47e;
  --blue: #4a7cff;
  --blue-bright: #6b94ff;
  --red-bright: #ff7878;
  --green-bright: #5ed4a3;
  --tg-safe-area-inset-bottom: 0px;
  --tg-content-safe-area-inset-bottom: 0px;
  --app-safe-area-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px)
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* ============ PHONE SHELL ============ */
.phone {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--bg-gradient-top) 0%, var(--bg) 60%);
  position: relative;
  overflow: hidden;
  padding-bottom: 95px;
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  z-index: 1;
}

/* ============ HERO COVER ============ */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center center;
  background-color: #6a0a0a;
  border-radius: 7px;
  margin-top: -4px;
  margin-bottom: 3px;
  overflow: hidden;
  transition: background-image 0.3s ease;
}

/* ============ CONTENT ============ */
.content {
  position: relative;
  z-index: 2;
  padding: 26px 20px 120px;
  margin-top: -26px;
  border-radius: 24px 24px 0 0;
  background: radial-gradient(ellipse at top, var(--bg-gradient-top) 0%, var(--bg) 60%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 -1px 0 rgba(0, 0, 0, 0.5) inset;
}

/* ============ TITLE ============ */
.game-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 4px;
}

.game-edition-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============ PRICE ============ */
.price-current {
  font-family: "Geist", sans-serif;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: "tnum";
}

.price-current .currency {
  margin-left: 4px;
}

.price-current .sep {
  display: inline-block;
  width: 0.2em;
}

.price-block {
  margin-bottom: 20px;
  padding: 4px 2px;
}

.price-block .price-current {
  font-size: 38px;
}

/* ============ NOMINAL CAROUSEL ============ */
.editions {
  margin-bottom: 22px;
}

.editions-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.editions-wrap {
  position: relative;
}

.editions-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.editions-track::-webkit-scrollbar {
  display: none;
}

.editions-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 30px;
  border-radius: 6px;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}

.editions-arrow:hover {
  color: var(--blue-bright);
  border-color: var(--border-blue);
}

.editions-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.editions-arrow.left {
  left: -10px;
}

.editions-arrow.right {
  right: -10px;
}

.editions-arrow svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.edition-chip {
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: calc((100% - 16px) / 3);
  scroll-snap-align: start;
  padding: 12px 10px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.015) 50%,
    rgba(255, 255, 255, 0.005) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.12) inset;
}

.edition-chip:hover {
  border-color: var(--border-blue);
}

.edition-chip.active {
  border-color: var(--blue);
  background: rgba(74, 124, 255, 0.08);
}

.edition-chip-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  min-height: 2.4em;
  max-height: 2.4em;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.edition-chip-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.edition-chip-price {
  font-family: "Geist", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

.edition-chip.active .edition-chip-price {
  color: var(--blue-bright);
}

/* ============ CTA ============ */
.cta {
  position: fixed;
  bottom: calc(96px + var(--app-safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 380px;
  z-index: 20;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--blue);
  border-radius: 14px;
  font-family: "Geist", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #cfe0ff;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.25s;
}

.cta-btn:hover {
  background: rgba(74, 124, 255, 0.1);
  color: #fff;
}

.cta-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ============ BOTTOM SHEET ============ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, #1a2240 0%, #0d1227 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(28px + var(--app-safe-area-bottom));
  z-index: 101;
  transition: transform 0.3s cubic-bezier(0.3, 0.8, 0.3, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}

.sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.sheet-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 22px;
}

.sheet-sub .num {
  color: var(--text);
  font-weight: 600;
}

.sheet-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.sheet-btn {
  width: 54px;
  height: 54px;
  background: rgba(74, 124, 255, 0.15);
  border: 1px solid rgba(74, 124, 255, 0.35);
  border-top: 1px solid rgba(74, 124, 255, 0.5);
  border-bottom: 1px solid rgba(30, 50, 120, 0.4);
  color: #fff;
  font-size: 26px;
  font-weight: 400;
  border-radius: 14px;
  cursor: pointer;
  font-family: "Geist", sans-serif;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(74, 124, 255, 0.15);
}

.sheet-btn:hover {
  background: rgba(74, 124, 255, 0.25);
}

.sheet-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sheet-val {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  font-family: "Geist", sans-serif;
  font-feature-settings: "tnum";
  min-width: 80px;
  text-align: center;
  letter-spacing: -0.02em;
}

.sheet-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 14px;
}

.sheet-total-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.sheet-total-val {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  font-family: "Geist", sans-serif;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

.sheet-confirm {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-bright) 100%);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Geist", sans-serif;
  box-shadow: 0 6px 20px rgba(74, 124, 255, 0.35);
  transition: all 0.2s;
}

.sheet-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(74, 124, 255, 0.45);
}

.sheet-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
