:root {
  --bg-1: #1b0c0a;
  --bg-2: #2a100f;
  --accent-1: #ff8a1f;
  --accent-2: #ff4d2d;
  --accent-3: #ffb347;
  --text: #fff8ef;
  --muted: rgba(255, 248, 239, 0.78);
  --card: rgba(34, 14, 12, 0.72);
  --stroke: rgba(255, 187, 120, 0.22);
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden],
.is-hidden {
  display: none !important;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, #4a1510 0%, var(--bg-2) 35%, var(--bg-1) 100%);
  color: var(--text);
  overflow-x: hidden;
}

body {
  position: relative;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 85%);
  opacity: 0.35;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.45;
  mix-blend-mode: screen;
  animation: float 10s ease-in-out infinite;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 138, 31, 0.95) 0%, rgba(255, 77, 45, 0.2) 58%, transparent 70%);
  top: -110px;
  left: -120px;
}

.blob-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.85) 0%, rgba(255, 77, 45, 0.18) 55%, transparent 72%);
  bottom: -80px;
  right: -90px;
  animation-delay: -3s;
}

.blob-3 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 84, 46, 0.82) 0%, rgba(255, 138, 31, 0.18) 58%, transparent 72%);
  top: 25%;
  right: 20%;
  animation-delay: -6s;
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero {
  width: min(920px, 100%);
  text-align: center;
  padding: 44px 24px 36px;
  border: 1px solid var(--stroke);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 143, 52, 0.16), rgba(20, 8, 7, 0.78)),
    var(--card);
  box-shadow:
    0 22px 60px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    background 0.45s ease;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at top, rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.hero.is-loading {
  transform: scale(0.985);
  border-color: rgba(255, 210, 122, 0.34);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(255, 138, 31, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero.is-loading::before {
  opacity: 0.55;
}

.user-profile {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(260px, calc(100% - 36px));
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(255, 186, 120, 0.22);
  border-radius: 18px;
  background: rgba(18, 7, 6, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 12px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.profile-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 223, 144, 0.95), rgba(255, 138, 31, 0.82));
  box-shadow:
    0 8px 18px rgba(255, 110, 31, 0.22),
    inset 0 2px 0 rgba(255,255,255,0.25);
}

.profile-avatar::before,
.profile-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(58, 20, 12, 0.68);
}

.profile-avatar::before {
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.profile-avatar::after {
  bottom: 8px;
  width: 22px;
  height: 12px;
  border-radius: 12px 12px 8px 8px;
}

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(18, 7, 6, 0.92);
  border-radius: 50%;
  background: #8b8b8b;
}

.user-profile.is-online .status-dot {
  background: #35d06f;
  box-shadow: 0 0 12px rgba(53, 208, 111, 0.62);
}

.user-profile.is-offline .status-dot {
  background: #8b8b8b;
  box-shadow: none;
}

.profile-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.profile-name {
  overflow: hidden;
  color: #fff7ef;
  font-size: 0.95rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-status {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.profile-xp {
  color: #ffd966;
  font-size: 0.72rem;
  font-weight: 800;
  transition: color 0.3s ease, transform 0.3s ease;
}

.profile-xp.is-animating {
  color: #fff8cf;
  text-shadow: 0 0 20px rgba(255, 217, 102, 0.8);
  animation: xpPulse 0.3s ease infinite;
}

@keyframes xpPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.xp-token {
  position: fixed;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffd700 40%, #ff8c00 100%);
  box-shadow:
    0 0 32px rgba(255, 215, 0, 1),
    0 0 64px rgba(255, 140, 0, 0.8),
    inset 0 4px 8px rgba(255, 255, 255, 1);
  opacity: 1;
  pointer-events: none;
  transform: scale(0.3);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-token::before {
  content: "⬡";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.xp-token.faded {
  opacity: 0;
  transform: scale(0.2);
}

.user-profile.is-online .profile-status {
  color: #b8ffd1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 167, 76, 0.24), rgba(255, 76, 45, 0.12));
  border: 1px solid rgba(255, 189, 121, 0.28);
  color: #ffe8c8;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.title {
  margin: 20px 0 10px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 4px 0 rgba(92, 22, 14, 0.7),
    0 10px 30px rgba(0, 0, 0, 0.35);
}

.title span {
  display: inline-block;
  background: linear-gradient(180deg, #fff1d4 0%, #ffd16c 18%, #ff9020 45%, #ff5832 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 122, 45, 0.24));
}

.subtitle {
  margin: 0 auto 30px;
  max-width: 720px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--muted);
  line-height: 1.55;
  min-height: 2.1em;
  transition: color 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

.subtitle.is-loading-text {
  color: #ffe8c8;
  animation: loadingText 1.2s ease-in-out infinite;
}

.auth-panel,
.rewards-panel,
.admin-panel {
  width: min(680px, 100%);
  margin: 0 auto;
  animation: contentEnter 0.42s ease both;
}

.admin-panel {
  width: min(820px, 100%);
}

.auth-form {
  width: min(440px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  text-align: left;
}

.field label {
  color: rgba(255, 236, 215, 0.76);
  font-size: 0.9rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(255, 186, 120, 0.24);
  border-radius: 16px;
  background: rgba(18, 7, 6, 0.54);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  outline: none;
  padding: 0 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input:focus {
  border-color: rgba(255, 203, 103, 0.72);
  background: rgba(24, 9, 7, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.12);
}

.form-hint {
  margin: 2px 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.form-message {
  min-height: 1.4em;
  margin: 0;
  color: rgba(255, 236, 215, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-message[data-type="error"] {
  color: #ffd0bd;
}

.text-button {
  border: none;
  background: transparent;
  color: #ffe8c8;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 2px 0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 232, 200, 0.34);
  text-underline-offset: 4px;
}

.text-button:hover {
  color: #fff7ef;
}

.admin-empty {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(255, 186, 120, 0.2);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 156, 62, 0.14), rgba(255, 58, 34, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 16px 36px rgba(0, 0, 0, 0.2);
}

.admin-empty h2 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.admin-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-toolbar .subtitle {
  margin-bottom: 4px;
}

.admin-counter {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-reward-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 186, 120, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 156, 62, 0.16), rgba(255, 58, 34, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 14px 30px rgba(0, 0, 0, 0.2);
}

.admin-reward-rarity {
  height: 4px;
  background: #9e9e9e;
}

.admin-reward-body {
  padding: 16px;
}

.admin-reward-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-reward-icon,
.admin-reward-placeholder {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(18, 7, 6, 0.46);
}

.admin-reward-icon {
  object-fit: contain;
}

.admin-reward-placeholder {
  display: grid;
  place-items: center;
  color: #ffe8c8;
  font-weight: 900;
}

.admin-reward-info {
  min-width: 0;
  text-align: left;
}

.admin-reward-name {
  overflow: hidden;
  color: #fff7ef;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-reward-shortname {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-reward-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-tag {
  border-radius: 999px;
  background: rgba(18, 7, 6, 0.44);
  color: rgba(255, 236, 215, 0.8);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 5px 9px;
}

.admin-reward-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 191, 121, 0.22);
  border-radius: 50%;
  background: rgba(18, 7, 6, 0.48);
  color: #ffe8c8;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.icon-button:hover {
  border-color: rgba(255, 203, 103, 0.6);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.preview-panel {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 186, 120, 0.2);
  border-radius: 20px;
  background: rgba(18, 7, 6, 0.38);
}

.preview-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 186, 120, 0.14);
  color: #ffe8c8;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
}

.preview-code {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: rgba(255, 248, 239, 0.82);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  overflow: auto;
}

.editor-dialog {
  width: min(680px, 100%);
  max-height: min(760px, 92vh);
  max-height: min(760px, 92svh);
  overflow: auto;
  border: 1px solid rgba(255, 186, 120, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 143, 52, 0.13), rgba(20, 8, 7, 0.95)),
    var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  padding: 22px;
}

.editor-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.editor-dialog-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.editor-tab,
.rarity-opt {
  min-height: 42px;
  border: 1px solid rgba(255, 191, 121, 0.2);
  border-radius: 14px;
  background: rgba(18, 7, 6, 0.46);
  color: rgba(255, 236, 215, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}

.editor-tab.is-active,
.rarity-opt.is-active {
  border-color: rgba(255, 203, 103, 0.7);
  background: linear-gradient(180deg, rgba(255, 171, 78, 0.24), rgba(255, 77, 45, 0.14));
  color: #fff7ef;
}

.editor-body {
  display: grid;
  gap: 14px;
}

.editor-form {
  display: grid;
  gap: 14px;
}

.field select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(255, 186, 120, 0.24);
  border-radius: 16px;
  background: rgba(18, 7, 6, 0.54);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  outline: none;
  padding: 0 15px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.search-field {
  position: relative;
}

.search-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 35;
  display: none;
  max-height: 250px;
  overflow: auto;
  border: 1px solid rgba(255, 186, 120, 0.22);
  border-radius: 16px;
  background: rgba(22, 9, 7, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

.search-results.is-open {
  display: block;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}

.search-item:hover {
  background: rgba(255, 138, 31, 0.12);
}

.search-item img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(18, 7, 6, 0.5);
}

.search-item-name {
  color: #fff7ef;
  font-weight: 800;
}

.search-item-shortname {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.selected-preview {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 186, 120, 0.18);
  border-radius: 16px;
  background: rgba(18, 7, 6, 0.38);
  text-align: left;
}

.selected-preview img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
}

.selected-preview-empty {
  color: var(--muted);
  font-weight: 700;
}

.selected-preview-name {
  color: #fff7ef;
  font-weight: 900;
}

.selected-preview-sn {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.rarity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(360px, calc(100% - 44px));
  border: 1px solid rgba(255, 186, 120, 0.24);
  border-radius: 16px;
  background: rgba(18, 7, 6, 0.92);
  color: #fff7ef;
  font-weight: 800;
  padding: 13px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.rarity-common { background: #9e9e9e; }
.rarity-rare { background: #4caf50; }
.rarity-superrare { background: #4a90d9; }
.rarity-epic { background: #9b59b6; }
.rarity-legendary { background: #ff9800; }
.rarity-mythic { background: #e63946; }

.reward-card {
  width: min(680px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  padding: 22px 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 156, 62, 0.18), rgba(255, 58, 34, 0.08));
  border: 1px solid rgba(255, 186, 120, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 16px 36px rgba(0, 0, 0, 0.22);
  animation: contentEnter 0.42s ease both;
}

.reward-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(180deg, #ffdf90, #ff8a1f 55%, #ff4d2d);
  color: #fff9ed;
  box-shadow:
    0 10px 24px rgba(255, 110, 31, 0.35),
    inset 0 2px 0 rgba(255,255,255,0.25);
  transform: rotate(-8deg);
}

.reward-text h2 {
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.reward-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.player-rewards-grid {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  animation: contentEnter 0.42s ease both;
}

.player-reward-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 186, 120, 0.2);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 156, 62, 0.16), rgba(255, 58, 34, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 16px 34px rgba(0, 0, 0, 0.22);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    opacity 0.22s ease;
}

.player-reward-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 54%, rgba(255, 238, 174, 0.24), transparent 28%),
    linear-gradient(115deg, transparent 18%, rgba(255, 219, 128, 0.28) 45%, transparent 70%);
  opacity: 0;
  transform: translateX(-38%) scale(0.92);
  pointer-events: none;
}

.player-reward-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  border: 1px solid rgba(255, 226, 150, 0);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0);
  pointer-events: none;
}

.player-reward-card.is-claimed {
  opacity: 0.62;
  filter: saturate(0.68) brightness(0.86);
}

.player-reward-card.is-claiming {
  border-color: rgba(255, 223, 144, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 20px 42px rgba(255, 126, 37, 0.14),
    0 0 34px rgba(255, 203, 103, 0.16);
  animation: rewardCardFocus 0.62s cubic-bezier(0.18, 1.2, 0.28, 1) both;
}

.player-reward-card.is-claiming::before {
  animation: rewardLightSweep 0.92s ease-out both;
}

.player-reward-card.is-claiming::after {
  animation: rewardBorderTrace 0.9s ease-out both;
}

.player-reward-card.is-claiming .player-reward-icon,
.player-reward-card.is-claiming .player-reward-placeholder {
  animation: rewardIconFocus 0.78s cubic-bezier(0.2, 1.28, 0.3, 1) both;
}

.player-reward-card.is-claiming .claim-button {
  background: linear-gradient(180deg, #fff0a8, #ffb13a 42%, #ff5c35 100%);
  animation: claimButtonPress 0.58s ease both;
}

.player-reward-card.is-collected {
  animation: rewardCollectedDim 0.72s ease forwards;
}

.player-reward-card.is-collected .claim-button {
  background: linear-gradient(180deg, rgba(121, 255, 172, 0.32), rgba(53, 208, 111, 0.2));
}

.player-reward-rarity {
  height: 4px;
  background: #9e9e9e;
}

.player-reward-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.player-reward-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-align: left;
}

.player-reward-icon,
.player-reward-placeholder {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(18, 7, 6, 0.46);
}

.player-reward-icon {
  object-fit: contain;
}

.player-reward-placeholder {
  display: grid;
  place-items: center;
  color: #ffe8c8;
  font-weight: 900;
}

.player-reward-info {
  min-width: 0;
}

.player-reward-info h2 {
  overflow: hidden;
  margin: 0 0 5px;
  color: #fff7ef;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-reward-info p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-reward-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-tag {
  border-radius: 999px;
  border: 1px solid rgba(255, 186, 120, 0.18);
  background: rgba(18, 7, 6, 0.36);
  color: #ffe8c8;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 9px;
}

.reward-tag-done {
  color: #b8ffd1;
  border-color: rgba(53, 208, 111, 0.35);
}

.claim-button {
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
}

.reward-claim-message {
  margin-top: 12px;
}

.reward-claim-message[data-type="success"] {
  color: #b8ffd1;
}

.gift-stack {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  width: min(320px, calc(100vw - 36px));
  gap: 12px;
  pointer-events: none;
}

.gift-popup {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 132, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(26, 10, 8, 0.96), rgba(44, 18, 12, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 20px 42px rgba(0, 0, 0, 0.42);
  padding: 16px;
  pointer-events: auto;
  animation: contentEnter 0.32s ease both;
  transform-origin: 22% 82%;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    opacity 0.22s ease;
}

.gift-popup::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 36% 48%, rgba(255, 245, 185, 0.32), transparent 12%),
    conic-gradient(from 120deg, transparent, rgba(255, 202, 92, 0.26), transparent 32%);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.55) rotate(-18deg);
}

.gift-popup.is-claiming {
  border-color: rgba(255, 230, 150, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 24px 54px rgba(255, 128, 37, 0.2),
    0 0 38px rgba(255, 216, 123, 0.16);
  animation: giftClaimLift 0.58s cubic-bezier(0.18, 1.2, 0.28, 1) both;
}

.gift-popup.is-claiming::before {
  animation: giftSweep 0.72s ease-out both;
}

.gift-popup.is-claiming .gift-icon {
  animation: giftIconClaim 0.78s cubic-bezier(0.2, 1.35, 0.3, 1) both;
}

.gift-popup.is-claiming .gift-claim-button {
  animation: claimButtonPress 0.58s ease both;
}

.gift-popup.is-collected {
  pointer-events: none;
  animation: giftCollected 0.62s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

.gift-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gift-kicker {
  color: #fff7ef;
  font-size: 0.9rem;
  font-weight: 900;
}

.gift-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-align: left;
}

.gift-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 203, 103, 0.1);
  object-fit: contain;
}

.gift-info {
  min-width: 0;
}

.gift-info h2 {
  margin: 0 0 4px;
  color: #fff7ef;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}

.gift-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.gift-claim-button {
  width: 100%;
  margin-top: 14px;
  padding: 11px 15px;
  border-radius: 15px;
}

.reward-particles {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.reward-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 3px;
  background: linear-gradient(135deg, #fff8cf, #ffc857 58%, rgba(255, 85, 45, 0));
  box-shadow: 0 0 14px rgba(255, 217, 116, 0.76);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(0.2);
  animation: rewardParticleRise 0.92s cubic-bezier(0.14, 0.9, 0.25, 1) forwards;
}

.reward-particle:nth-child(3n) {
  border-radius: 999px;
  background: radial-gradient(circle, #fff8cf, #ffb13a 64%, rgba(255, 85, 45, 0));
}

.gift-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}

.gift-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: radial-gradient(circle, #fff7c6, #ffca5c 62%, rgba(255, 93, 43, 0));
  box-shadow: 0 0 12px rgba(255, 214, 111, 0.72);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  animation: giftParticleFly 0.86s cubic-bezier(0.14, 0.88, 0.24, 1) forwards;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.claim-all-container {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 18px auto 0;
}

.claim-all-btn {
  position: relative;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #ff4d2d 0%, #ff8a1f 100%);
  color: #fff7ef;
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 14px 32px rgba(255, 77, 45, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.claim-all-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.1);
}

.claim-all-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.claim-all-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.claim-all-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.8));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.claim-all-btn.is-holding::before {
  opacity: 1;
  animation: claimAllBorderTrace 2s linear forwards;
}

.claim-all-btn.is-holding {
  animation: claimAllPulse 2s ease forwards;
}

.claim-all-btn.is-holding .claim-all-text {
  animation: claimAllTextProgress 2s ease forwards;
}

.claim-all-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #fff8cf, #ffb13a, #fff8cf);
  border-radius: 0 0 15px 15px;
  width: 0%;
  transition: width 0.05s linear;
}

.claim-all-btn.is-holding .claim-all-progress {
  animation: claimAllProgress 2s ease forwards;
}

@keyframes claimAllBorderTrace {
  0% {
    box-shadow:
      inset 0 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 0 rgba(255, 255, 255, 0);
  }
  10% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.9),
      0 0 12px rgba(255, 255, 255, 0.4);
  }
  30% {
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(255, 200, 100, 0.5);
  }
  60% {
    box-shadow:
      inset 0 0 0 4px rgba(255, 255, 255, 0.7),
      0 0 28px rgba(255, 180, 80, 0.6);
  }
  85% {
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.9),
      0 0 35px rgba(255, 220, 120, 0.7);
  }
  100% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 1),
      0 0 45px rgba(255, 255, 200, 0.85);
  }
}

@keyframes claimAllPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  25% {
    transform: scale(1.03);
    filter: brightness(1.12);
  }
  50% {
    transform: scale(0.98);
    filter: brightness(1.08);
  }
  75% {
    transform: scale(1.02);
    filter: brightness(1.15);
  }
}

@keyframes claimAllTextProgress {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  10% {
    opacity: 0.8;
    transform: scale(0.95);
  }
  90% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.6;
    transform: scale(0.92);
  }
}

@keyframes claimAllProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.claim-all-complete {
  animation: claimAllComplete 0.4s ease forwards;
}

@keyframes claimAllComplete {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 14px 22px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff7ef;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  filter: none;
}

.claim-button:disabled {
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(180deg, #ffcb67, #ff8e24 42%, #ff4c2d 100%);
}

.secondary {
  background: linear-gradient(180deg, rgba(255, 171, 78, 0.22), rgba(255, 77, 45, 0.18));
  border: 1px solid rgba(255, 191, 121, 0.22);
}

.footer-note {
  margin-top: 22px;
  font-size: 0.95rem;
  color: rgba(255, 236, 215, 0.7);
  animation: contentEnter 0.42s ease both;
}

.shine {
  animation: shine 0.9s ease-in-out 1;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10px, -16px) scale(1.03); }
}

@keyframes shine {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}

@keyframes loadingText {
  0%, 100% { opacity: 0.68; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes contentEnter {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes claimButtonPress {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  28% { transform: translateY(2px) scale(0.97); filter: brightness(1.18); }
  64% { transform: translateY(-3px) scale(1.025); filter: brightness(1.1); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes rewardCardFocus {
  0% { transform: scale(1); filter: brightness(1); }
  38% { transform: scale(1.012); filter: brightness(1.12); }
  100% { transform: scale(1.006); filter: brightness(1.06); }
}

@keyframes rewardLightSweep {
  0% { opacity: 0; transform: translateX(-45%) scale(0.92); }
  32% { opacity: 1; }
  100% { opacity: 0; transform: translateX(38%) scale(1.08); }
}

@keyframes rewardBorderTrace {
  0% {
    border-color: rgba(255, 226, 150, 0);
    box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0);
  }
  45% {
    border-color: rgba(255, 226, 150, 0.82);
    box-shadow:
      inset 0 0 0 1px rgba(255, 226, 150, 0.28),
      0 0 26px rgba(255, 203, 103, 0.24);
  }
  100% {
    border-color: rgba(255, 226, 150, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0.1);
  }
}

@keyframes rewardIconFocus {
  0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
  34% { transform: scale(1.14) rotate(-4deg); filter: brightness(1.24) drop-shadow(0 0 12px rgba(255, 211, 99, 0.52)); }
  70% { transform: scale(0.98) rotate(2deg); }
  100% { transform: scale(1.02) rotate(0deg); filter: brightness(1.08); }
}

@keyframes rewardCollectedDim {
  0% {
    opacity: 1;
    filter: saturate(1) brightness(1.12);
    transform: scale(1.006);
  }
  52% {
    opacity: 0.86;
    filter: saturate(0.9) brightness(0.98);
  }
  100% {
    opacity: 0.62;
    filter: saturate(0.68) brightness(0.86);
    transform: scale(1);
  }
}

@keyframes giftClaimLift {
  0% { transform: translateY(0) scale(1); }
  44% { transform: translateY(-7px) scale(1.025); }
  100% { transform: translateY(-3px) scale(1.01); }
}

@keyframes giftIconClaim {
  0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
  30% { transform: scale(1.24) rotate(-8deg); filter: brightness(1.28) drop-shadow(0 0 14px rgba(255, 213, 99, 0.62)); }
  68% { transform: scale(0.94) rotate(5deg); }
  100% { transform: scale(1.04) rotate(0deg); filter: brightness(1.08); }
}

@keyframes giftSweep {
  0% { opacity: 0; transform: scale(0.5) rotate(-18deg); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.08) rotate(22deg); }
}

@keyframes giftCollected {
  0% {
    max-height: 260px;
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  55% {
    max-height: 260px;
    opacity: 0.9;
    transform: translateY(-14px) scale(0.96);
    filter: brightness(1.15);
  }
  100% {
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    opacity: 0;
    transform: translateY(18px) scale(0.86);
    filter: brightness(0.9);
  }
}

@keyframes rewardParticleRise {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.2);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0);
  }
}

@keyframes giftParticleFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0);
  }
}

@media (max-width: 900px) {
  .page {
    place-items: start center;
    padding: 18px;
  }

  .hero {
    width: 100%;
  }

  .rewards-panel,
  .admin-panel {
    width: 100%;
  }

  .admin-rewards-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .editor-dialog {
    width: min(680px, calc(100vw - 24px));
  }

  .preview-code {
    max-height: 220px;
  }
}

@media (max-width: 700px) {
  .user-profile {
    position: relative;
    top: auto;
    right: auto;
    justify-content: center;
    width: min(280px, 100%);
    margin: 0 auto 16px;
  }

  .hero {
    padding: 34px 16px 26px;
    border-radius: 26px;
  }

  .title {
    margin: 16px 0 10px;
    font-size: clamp(2.35rem, 13vw, 4.25rem);
    line-height: 0.96;
  }

  .badge {
    padding: 9px 13px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  .subtitle {
    min-height: auto;
    margin-bottom: 20px;
    font-size: 1rem;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar .btn {
    width: 100%;
  }

  .admin-empty {
    padding: 18px;
    border-radius: 18px;
  }

  .admin-rewards-grid,
  .player-rewards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-reward-body {
    padding: 50px 14px 14px;
  }

  .admin-reward-main,
  .player-reward-main {
    align-items: flex-start;
  }

  .preview-panel,
  .admin-reward-card,
  .player-reward-card {
    border-radius: 18px;
  }

  .reward-card {
    flex-direction: column;
    text-align: center;
    padding: 18px;
  }

  .reward-icon {
    transform: rotate(0deg);
  }

  .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 18px;
  }

  .actions .btn {
    width: 100%;
  }

  .editor-modal {
    align-items: start;
    padding: 10px;
  }

  .editor-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100svh - 20px);
    padding: 16px;
    border-radius: 18px;
  }

  .editor-dialog-head {
    gap: 10px;
    margin-bottom: 14px;
  }

  .editor-dialog-head h2 {
    font-size: 1.18rem;
  }

  .editor-tabs {
    grid-template-columns: repeat(4, minmax(106px, 1fr));
    margin-bottom: 14px;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-results {
    position: static;
    max-height: 180px;
    margin-top: 8px;
  }

  .rarity-grid {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  }

  .editor-actions {
    flex-direction: column-reverse;
  }

  .editor-actions .btn {
    width: 100%;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }

  .gift-stack {
    left: 14px;
    bottom: 14px;
    width: min(286px, calc(100vw - 28px));
    gap: 10px;
  }

  .gift-popup {
    padding: 12px;
    border-radius: 18px;
  }

  .gift-copy {
    margin-bottom: 10px;
  }

  .gift-kicker {
    font-size: 0.82rem;
  }

  .gift-main {
    gap: 10px;
  }

  .gift-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .gift-info h2 {
    font-size: 0.9rem;
  }

  .gift-info p {
    font-size: 0.76rem;
  }

  .gift-claim-button {
    margin-top: 10px;
    padding: 10px 13px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 10px;
  }

  .hero {
    padding: 24px 10px 18px;
    border-radius: 22px;
  }

  .title {
    font-size: clamp(2rem, 12.5vw, 3rem);
    letter-spacing: 0.01em;
  }

  .auth-form {
    gap: 12px;
  }

  .field input,
  .field select {
    min-height: 44px;
    border-radius: 14px;
    padding: 0 12px;
  }

  .btn {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .user-profile {
    width: min(260px, 100%);
    padding: 8px 10px 8px 8px;
  }

  .profile-avatar {
    width: 34px;
    height: 34px;
  }

  .profile-avatar::before {
    top: 7px;
    width: 11px;
    height: 11px;
  }

  .profile-avatar::after {
    bottom: 7px;
    width: 20px;
    height: 11px;
  }

  .admin-empty {
    padding: 15px;
  }

  .admin-reward-body,
  .player-reward-body {
    padding: 12px;
  }

  .admin-reward-body {
    padding-top: 48px;
  }

  .admin-reward-icon,
  .admin-reward-placeholder,
  .player-reward-icon,
  .player-reward-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .admin-reward-name,
  .player-reward-info h2 {
    font-size: 0.92rem;
  }

  .admin-reward-shortname,
  .player-reward-info p {
    font-size: 0.72rem;
  }

  .admin-tag,
  .reward-tag {
    font-size: 0.7rem;
    padding: 5px 8px;
  }

  .preview-code {
    max-height: 190px;
    padding: 12px;
    font-size: 0.74rem;
  }

  .editor-dialog {
    padding: 12px;
    border-radius: 16px;
  }

  .editor-tabs {
    grid-template-columns: repeat(4, minmax(96px, 1fr));
  }

  .editor-tab,
  .rarity-opt {
    min-height: 38px;
    border-radius: 12px;
    font-size: 0.76rem;
  }
}

/* ===== ADMIN TABS ===== */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-tab {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 191, 121, 0.2);
  border-radius: 14px;
  background: rgba(18, 7, 6, 0.46);
  color: rgba(255, 236, 215, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  transition: all 0.2s ease;
}

.admin-tab.is-active {
  border-color: rgba(255, 203, 103, 0.7);
  background: linear-gradient(180deg, rgba(255, 171, 78, 0.24), rgba(255, 77, 45, 0.14));
  color: #fff7ef;
}

.admin-tab:hover:not(.is-active) {
  border-color: rgba(255, 203, 103, 0.4);
  color: #fff7ef;
}

/* ===== GIFTS LIST ===== */
.admin-gifts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-gift-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 186, 120, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 156, 62, 0.16), rgba(255, 58, 34, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 14px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.admin-gift-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-gift-player {
  color: #fff7ef;
  font-size: 1rem;
  font-weight: 900;
}

.admin-gift-time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-gift-amount {
  color: #ffe8c8;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-gift-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
}

.is-given {
  background: rgba(53, 208, 111, 0.2);
  color: #b8ffd1;
}

.is-active {
  background: rgba(255, 171, 78, 0.25);
  color: #ffd98a;
}

/* ===== GIFT MODAL ===== */
#giftForm {
  display: grid;
  gap: 14px;
}

  .rarity-grid {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  }

  .search-line {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .selected-preview {
    align-items: flex-start;
    padding: 10px;
  }

  .gift-stack {
    left: 11px;
    bottom: 11px;
    width: min(260px, calc(100vw - 22px));
  }

  .gift-popup {
    padding: 11px;
  }

  .gift-icon {
    width: 42px;
    height: 42px;
  }

  .gift-info h2 {
    font-size: 0.84rem;
  }
}
