.screen--settings {
  background: rgb(var(--screen-bg));
  z-index: 20;
}

.settings__card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 12px calc(12px + env(safe-area-inset-bottom, 0px));
}

.settings__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.settings__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.settings__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(var(--text-secondary),0.6);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
  color: rgba(var(--text-secondary),0.7);
}

.settings__row:last-child { border-bottom: none; }

.settings__toggle {
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(var(--accent),0.2);
  background: rgba(var(--accent-dark),0.15);
  color: rgba(var(--text-secondary),0.6);
  cursor: pointer;
}

.settings__toggle--on {
  background: rgba(80,200,120,0.2);
  border-color: rgba(80,200,120,0.3);
  color: rgba(120,255,160,0.85);
}

.screen--about {
  background: rgb(var(--screen-bg));
  z-index: 22;
}

.about__card {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 12px calc(12px + env(safe-area-inset-bottom, 0px));
}

.about__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.about__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(var(--text-secondary),0.6);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__content {
  font-size: 13px;
  color: rgba(var(--text-secondary),0.7);
  line-height: 1.5;
}

.about__section-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(var(--text-primary),0.85);
  margin: 0 0 6px;
}

.about__note {
  margin: 0 0 14px;
  font-size: 12px;
  opacity: 0.6;
}

.about__credit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.about__credit:last-child { border-bottom: none; }

.about__link {
  color: rgba(var(--accent),0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.about__link:hover { text-decoration: underline; }

.about__author {
  font-size: 12px;
  color: rgba(var(--text-secondary),0.6);
}

.about__author strong {
  color: rgba(var(--text-secondary),0.8);
}

.about__license {
  font-size: 11px;
  color: rgba(var(--text-secondary),0.45);
}

.about__license a {
  color: rgba(var(--accent),0.6);
  text-decoration: none;
}

.about__license a:hover { text-decoration: underline; }

.screen--shop {
  background: rgb(var(--screen-bg));
  z-index: 20;
}

.shop__card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 12px calc(12px + env(safe-area-inset-bottom, 0px));
}

.shop__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.shop__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop__bal {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,215,0,0.85);
  margin-left: auto;
}

.shop__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(var(--text-secondary),0.6);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.shop-tab {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(var(--accent),0.2);
  border-radius: 8px;
  background: rgba(80,40,140,0.15);
  color: rgba(var(--text-secondary),0.6);
  cursor: pointer;
  transition: all 0.15s;
}

.shop-tab--active {
  background: rgba(var(--accent-dim),0.3);
  color: rgba(230,210,255,0.95);
  border-color: rgba(var(--accent),0.5);
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shop-card {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: left;
  transition: border-color 0.15s;
}

.shop-card--equipped {
  border-color: rgba(120,255,200,0.4);
  background: rgba(120,255,200,0.05);
}

.shop-card__name { font-size: 13px; font-weight: 700; color: rgba(230,210,255,0.9); margin-bottom: 2px; }
.shop-card__rarity { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.shop-card__rarity--common { color: rgba(180,200,255,0.5); }
.shop-card__rarity--rare   { color: rgba(160,120,255,0.7); }
.shop-card__rarity--epic      { color: rgba(255,180,60,0.8); }
.shop-card__rarity--legendary { color: rgba(255,80,80,0.9); }
.shop-card__desc { font-size: 11px; color: rgba(var(--text-muted),0.5); margin-bottom: 8px; }

.shop-card__btn {
  width: 100%;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(var(--accent),0.2);
  border-radius: 8px;
  background: rgba(var(--accent-dark),0.2);
  color: rgba(var(--text-primary),0.85);
  cursor: pointer;
}

.shop-card__btn:disabled { opacity: 0.4; cursor: default; }
.shop-card__btn--locked { background: rgba(60,30,100,0.2); }
.shop-card__btn--confirm {
  background: rgba(255,180,60,0.22);
  border-color: rgba(255,180,60,0.4);
  color: rgba(255,220,120,0.95);
}

.undo-toast {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(var(--bg-tint),0.9);
  border: 1px solid rgba(var(--accent),0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: slideUp 0.25s ease-out;
}

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

.undo-toast__text {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: rgba(var(--text-primary),0.85);
}

.undo-toast__btn {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255,180,60,0.3);
  background: rgba(255,180,60,0.2);
  color: rgba(255,220,100,0.95);
  cursor: pointer;
  flex-shrink: 0;
}

.overlay-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
}

.collection__counter {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(var(--text-secondary),0.5);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.screen--stats {
  background: rgb(var(--screen-bg));
}

.stats__card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 12px calc(12px + env(safe-area-inset-bottom, 0px));
}

.stats__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stats__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(var(--text-secondary),0.6);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.stats-row:last-child { border-bottom: none; }

.stats-row__label {
  font-size: 13px;
  color: rgba(var(--text-secondary),0.6);
}

.stats-row__value {
  font-size: 14px;
  font-weight: 700;
  color: rgba(var(--text-primary),0.9);
}
