:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: rgba(13, 16, 24, .86);
  --panel-strong: #111621;
  --line: rgba(255, 255, 255, .13);
  --text: #f6f7fb;
  --muted: #9aa7bd;
  --red: #ef2f35;
  --gold: #f5b942;
  --blue: #52b8ff;
  --green: #35d08b;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: linear-gradient(90deg, rgba(8, 9, 13, .98), rgba(8, 9, 13, .72)), url("../../assets/images/background.png") center / cover fixed;
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, .09) 45%, transparent 52%),
    radial-gradient(circle at 18% 22%, rgba(239, 47, 53, .22), transparent 28%),
    radial-gradient(circle at 78% 70%, rgba(82, 184, 255, .16), transparent 30%);
  mix-blend-mode: screen;
  opacity: .7;
  transform: translateX(-8%);
  animation: ambientSweep 14s var(--ease-out) infinite alternate;
}

button,
input,
select,
textarea {
  font: inherit;
}

.rarity-select {
  position: relative;
}

.rarity-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}

.rarity-select-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s var(--ease-out);
}

.rarity-select.open .rarity-select-button::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.rarity-select-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
  z-index: 25;
}

.rarity-select.open .rarity-select-list {
  display: grid;
  gap: 4px;
}

.rarity-select-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.rarity-select-list button:hover,
.rarity-select-list button.active {
  background: rgba(255, 255, 255, .09);
}

.rarity-icon {
  width: auto;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .35));
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 13, .88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown .72s var(--ease-out) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(239, 47, 53, .35));
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span,
p {
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.nav-user-area,
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-user-area img,
.icon-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.icon-link img[src$="shop.gif"] {
  width: 28px;
  height: 28px;
}

.hidden {
  display: none !important;
}

.admin-nav-only {
  display: none;
}

.admin-nav-only.visible {
  display: inline-flex;
}

.menu-toggle,
.mobile-drawer,
.drawer-overlay {
  display: none;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, .12), transparent 35%),
    rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 28px rgba(0, 0, 0, .28);
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #fff);
  box-shadow: 0 0 12px rgba(245, 185, 66, .22);
  transition: transform .22s var(--ease-out), opacity .18s var(--ease-out), top .22s var(--ease-out), width .22s var(--ease-out);
}

.menu-toggle span:nth-child(1) {
  top: 14px;
}

.menu-toggle span:nth-child(2) {
  top: 21px;
  width: 14px;
}

.menu-toggle span:nth-child(3) {
  top: 28px;
}

.menu-toggle:hover span:nth-child(2) {
  width: 18px;
}

.drawer-open .menu-toggle span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.drawer-open .menu-toggle span:nth-child(2) {
  opacity: 0;
  transform: translateX(8px);
}

.drawer-open .menu-toggle span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.language-menu {
  position: relative;
}

.language-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-current img,
.language-list img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.language-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
  z-index: 1000;
}

.language-menu.open .language-list {
  display: grid;
  gap: 4px;
}

.language-list button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.language-list button.active,
.language-list button:hover {
  background: rgba(255, 255, 255, .08);
}

.ghost,
.primary {
  border: 0;
  border-radius: 6px;
  min-height: 40px;
  padding: 0 16px;
  color: var(--text);
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}

.ghost {
  background: rgba(255, 255, 255, .08);
}

.primary {
  background: var(--red);
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(239, 47, 53, .28);
}

.ghost:hover,
.primary:hover {
  transform: translateY(-2px);
}

.primary:hover {
  box-shadow: 0 16px 38px rgba(239, 47, 53, .38);
}

.full {
  width: 100%;
}

main {
  padding: clamp(24px, 5vw, 64px);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.auth-view {
  min-height: calc(100vh - 150px);
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(28px, 6vw, 80px);
}

.auth-view.active {
  display: grid;
}

.auth-copy {
  animation: fadeLift .85s var(--ease-out) both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 740px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: .96;
  text-shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

.auth-copy p:last-child {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
}

.auth-panel,
.account-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
  transition: transform .24s var(--ease-out), border-color .24s var(--ease-out), box-shadow .24s var(--ease-out);
}

.auth-stack {
  display: grid;
  gap: 10px;
  animation: fadeLift .85s var(--ease-out) .08s both;
}

.auth-mascot {
  display: flex;
  justify-content: center;
  height: 76px;
  overflow: hidden;
}

.auth-mascot img {
  width: 116px;
  height: 76px;
  object-fit: contain;
  image-rendering: auto;
  animation: mascotFloat 1.8s ease-in-out infinite;
}

.auth-panel {
  padding: 20px;
}

.text-button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.text-button:hover {
  color: var(--gold);
}

.auth-panel:hover,
.account-side:hover,
.plan-card:hover,
.credit-card:hover,
.stock-card:hover,
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, .24);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .44);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, .06);
  border-radius: 8px;
  margin-bottom: 18px;
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segmented button.active {
  background: var(--panel-strong);
  color: var(--text);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

select option {
  background: #111621;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(82, 184, 255, .75);
  box-shadow: 0 0 0 4px rgba(82, 184, 255, .13);
  background: rgba(255, 255, 255, .11);
}

.inline-note,
.form-message {
  margin: 4px 0 0;
  font-size: 14px;
}

.form-message[data-type="error"] {
  color: #ff777b;
}

.form-message[data-type="ok"] {
  color: var(--green);
}

.form-message[data-type="warn"] {
  color: var(--gold);
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 52px);
}

.section-head.compact h2 {
  font-size: 28px;
}

.icon-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-heading img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.plans-grid,
.credit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card,
.credit-card,
.stock-card,
.service-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .9);
  padding: 18px;
  animation: cardIn .58s var(--ease-out) both;
}

.plan-card {
  display: grid;
  grid-template-rows: auto 1fr 48px;
  gap: 18px;
}

.plan-card .primary {
  width: 100%;
  min-height: 48px;
  align-self: end;
}

.credit-title {
  margin-top: 34px;
}

.credit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.credit-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 14px;
}

.credit-amount strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 34px;
}

.credit-amount strong img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.credit-amount span {
  color: var(--muted);
}

.credit-bonus {
  margin: -4px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.plan-card.blue {
  border-top: 4px solid var(--blue);
}

.plan-card.gold {
  border-top: 4px solid var(--gold);
}

.plan-card.red {
  border-top: 4px solid var(--red);
}

.plan-card.entry {
  border-top: 4px solid var(--blue);
}

.plan-card.elite {
  border-top: 4px solid var(--red);
}

.plan-card.prestige {
  border-top: 4px solid var(--gold);
}

.plan-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.plan-rank-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}

.service-art {
  width: auto;
  max-width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 0 16px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}

.service-art-reroll {
  height: 132px;
}

.service-card > div:first-child {
  display: grid;
  grid-template-rows: 170px auto minmax(46px, auto);
}

.service-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
}

.service-card .service-art {
  align-self: end;
}

.service-card .full {
  width: 100%;
  align-self: end;
}

.plan-top strong,
.service-card > strong {
  color: var(--gold);
  font-size: 28px;
}

ul {
  margin: 0;
  padding-left: 18px;
  color: #c9d2e3;
  line-height: 1.7;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
}

.shop-layout {
  max-width: 1440px;
  margin: 0 auto;
}

.shop-head .icon-heading img {
  width: 46px;
  height: 46px;
}

.account-side {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 100px;
}

.account-side .account-avatar {
  width: 98px;
  height: 98px;
  object-fit: contain;
}

.dash-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.dash-email img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.account-identity {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.account-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  text-align: center;
}

.gender-inline {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.account-gender-icon {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  flex: 0 0 auto;
}

.dash-plan {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  text-align: right;
}

.dash-plan-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.dash-credits {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.dash-credit-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.account-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-main {
  display: grid;
  gap: 14px;
  align-self: start;
  max-width: 720px;
}

.dashboard-collapse {
  align-self: start;
  display: grid;
  padding: 22px;
  border: 1px solid rgba(239, 47, 53, .28);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239, 47, 53, .12), rgba(255, 255, 255, .04)),
    rgba(13, 16, 24, .84);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .28);
}

.dashboard-collapse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.dashboard-collapse summary::-webkit-details-marker {
  display: none;
}

.dashboard-collapse summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 900;
}

.dashboard-collapse[open] summary::after {
  content: "-";
}

.dashboard-collapse summary span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dashboard-collapse summary strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-collapse > p {
  margin: 14px 0 0;
  line-height: 1.55;
}

.nintendo-link-actions {
  margin-top: 18px;
}

.nintendo-link-panel p {
  margin-bottom: 0;
}

.nintendo-link-actions {
  display: grid;
  gap: 10px;
}

.friend-code-panel {
  background:
    linear-gradient(135deg, rgba(72, 187, 120, .1), rgba(255, 255, 255, .035)),
    rgba(13, 16, 24, .84);
}

.friend-code-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.friend-code-actions label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.friend-code-actions input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  font-weight: 900;
  letter-spacing: .04em;
}

.friend-code-actions input:focus {
  outline: 2px solid rgba(72, 187, 120, .42);
  outline-offset: 2px;
}

.friend-code-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nintendo-start {
  justify-self: start;
  min-width: 190px;
}

.nintendo-unlink {
  border: 1px solid rgba(239, 47, 53, .42);
  color: #ffd8da;
}

.dash-friend-code {
  font-size: 13px;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
  text-align: right;
}

.nintendo-link-actions textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  line-height: 1.45;
}

.nintendo-link-actions textarea:focus {
  outline: 2px solid rgba(239, 47, 53, .42);
  outline-offset: 2px;
}

.nintendo-message {
  min-height: 22px;
  color: var(--muted);
  font-weight: 800;
}

.nintendo-message[data-type="error"] {
  color: #ff767c;
}

.nintendo-message[data-type="ok"] {
  color: var(--green);
}

.nintendo-message[data-type="warn"] {
  color: var(--gold);
}

.trade-history-panel {
  background:
    linear-gradient(135deg, rgba(72, 187, 120, .1), rgba(255, 255, 255, .035)),
    rgba(13, 16, 24, .84);
}

.trade-history-title {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
}

.trade-history-title img,
.trade-history-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.trade-history-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.trade-history-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.trade-history-item {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.trade-history-item div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.trade-history-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.trade-history-item strong,
.trade-history-item span,
.trade-history-item time {
  overflow-wrap: anywhere;
}

.trade-history-item span,
.trade-history-item time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.trade-history-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--text) !important;
  font-size: 14px !important;
}

.trade-history-card > img {
  width: 91px;
  height: 128px;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(255, 255, 255, .06);
  flex: 0 0 auto;
}

.trade-history-card > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.trade-history-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-history-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.trade-history-arrow {
  color: var(--green) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gender-field {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gender-field > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.gender-field label {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 82px;
  padding: 9px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  overflow: hidden;
}

.gender-field input {
  position: absolute;
  top: 10px;
  left: 9px;
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.gender-field img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.gender-field strong {
  width: 100%;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.stat-line span {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

#cardSearch {
  flex: 1 1 200px;
  min-width: 160px;
}

#raritySelect {
  flex: 0 0 170px;
}

.set-view-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 18, 28, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
  margin-left: auto;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.view-btn svg {
  display: block;
  stroke: currentColor;
}

.view-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.view-btn.active {
  background: var(--gold);
  color: #0b0e14;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(220, 175, 55, 0.35);
}

/* Pack Grid View Styles */
.pack-sets-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

@media (max-width: 1400px) {
  .pack-sets-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .pack-sets-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .pack-sets-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .pack-sets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

.pack-set-card {
  background: rgba(16, 21, 32, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.pack-set-card:hover {
  transform: translateY(-5px);
  border-color: rgba(220, 175, 55, 0.65);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(220, 175, 55, 0.2);
}

.pack-set-card.active {
  border-color: var(--gold);
  background: rgba(220, 175, 55, 0.09);
  box-shadow: 0 0 0 2px var(--gold), 0 10px 24px rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
}

.pack-img-wrap {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pack-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s ease;
}

.pack-set-card:hover .pack-img-wrap img {
  transform: scale(1.05);
}

.pack-count-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(220, 175, 55, 0.5);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  backdrop-filter: blur(4px);
}

.pack-info {
  width: 100%;
  text-align: center;
  margin-top: 6px;
}

.pack-code {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.pack-name {
  font-size: 11px;
  font-weight: 700;
  color: #e4e9f5;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pack-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(24, 30, 46, 0.9);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  gap: 10px;
}

.pack-active-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e2e8f0;
}

.pack-active-info strong {
  color: var(--gold);
}

.pack-active-info .set-badge.small {
  width: 24px;
  height: 24px;
}

.pack-hint-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 28px 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-top: 6px;
}

.pack-hint-bar svg {
  stroke: var(--gold);
  flex-shrink: 0;
}

.set-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  grid-column: 1 / -1;
  width: 100%;
}

.search-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(24, 30, 46, 0.9);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  gap: 10px;
  width: 100%;
}

.search-results-bar strong {
  color: var(--gold);
}

.admin-stock-toggle {
  display: none;
  align-items: center;
  grid-column: 1 / -1;
  width: fit-content;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(82, 184, 255, .26);
  border-radius: 6px;
  background: rgba(82, 184, 255, .09);
  color: #d8efff;
  font-size: 13px;
}

.admin-stock-toggle.visible {
  display: inline-flex;
}

.admin-stock-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0 8px 0 0;
  accent-color: var(--blue);
}

.card-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card-grid {
  grid-template-columns: 1fr;
}

.set-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .72);
  overflow: hidden;
}

.set-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 900;
  transition: background 0.2s ease;
}

.set-group summary:hover {
  background: rgba(220, 175, 55, 0.04);
}

.set-group summary strong {
  color: var(--gold);
  font-size: 13px;
}

.set-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
  font-size: 15px;
}

.set-badge {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease;
}

.set-group summary:hover .set-badge {
  transform: scale(1.08);
}

.set-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.card-art {
  display: grid;
  place-items: center;
  aspect-ratio: 367 / 512;
  border-radius: 6px;
  margin-bottom: 12px;
  padding: 6px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .25), transparent 34%),
    linear-gradient(145deg, rgba(239, 47, 53, .82), rgba(82, 184, 255, .72));
  font-size: 36px;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.card-art .rarity-icon {
  height: 46px;
  z-index: 1;
}

.card-art.real-card {
  background: rgba(255, 255, 255, .06);
}

.card-art.real-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.card-rarity-row {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin: 6px 0 8px;
}

.card-rarity-row .rarity-icon {
  height: 24px;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .35), transparent 60%);
  transform: translateX(-70%) rotate(10deg);
  animation: cardShine 4.5s ease-in-out infinite;
}

.stock-card h3,
.service-card h3 {
  font-size: 18px;
}

.stock-card p {
  margin: 6px 0 14px;
}

.stock-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.buy-card {
  margin-top: 14px;
}

.shop-message {
  min-height: 24px;
  margin: 12px 0 0;
  font-weight: 800;
}

.shop-message[data-type="error"] {
  color: #ff777b;
}

.shop-message[data-type="ok"] {
  color: var(--green);
}

.shop-message[data-type="warn"] {
  color: var(--gold);
}

.trade-status-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}

.trade-status-modal[hidden] {
  display: none;
}

.trade-status-card {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  max-height: min(540px, calc(100vh - 36px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 22, 33, .98), rgba(9, 11, 16, .98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62);
  pointer-events: auto;
}

.trade-status-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-weight: 900;
}

.trade-status-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 36px;
  margin-bottom: 14px;
}

.trade-status-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  background: url("/assets/images/logo.png") center / contain no-repeat;
}

.trade-status-head h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.trade-status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(53, 215, 126, .14);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-status-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.trade-status-item time {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.trade-status-item strong {
  display: block;
  color: var(--green);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.trade-status-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.trade-log-error {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 119, 123, .45);
  border-radius: 8px;
  background: rgba(255, 119, 123, .08);
  color: #ff9da1;
}

.trade-log-error pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
  font-size: 12px;
  color: #ffd4d6;
}

.stock-meta strong {
  color: var(--green);
}

.catalog-state {
  grid-column: 1 / -1;
  min-height: 90px;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .72);
  color: var(--muted);
  font-weight: 800;
}

.loading-state {
  gap: 10px;
}

.loading-state img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.all-rarity-icons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.all-rarity-icons .rarity-icon {
  height: 16px;
}

.admin-only,
.admin-panel {
  display: none;
}

.admin-only.visible {
  display: block;
}

.admin-panel.visible {
  display: block;
  margin-bottom: 28px;
}

.admin-users-grid {
  display: grid;
  gap: 10px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) 160px 150px 140px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .9);
}

.admin-user-card.rank-basic {
  border-left: 4px solid #fff;
}

.admin-user-card.rank-entry {
  border-left: 4px solid var(--red);
}

.admin-user-card.rank-elite {
  border-left: 4px solid var(--gold);
}

.admin-user-card.rank-prestige {
  border-left: 4px solid #a855f7;
}

.admin-user-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
}

.admin-user-card p,
.admin-user-meta span {
  margin: 4px 0 0;
  font-size: 13px;
}

.admin-user-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.catalog-state.error {
  color: #ff777b;
}

.admin-stock-note {
  margin: 8px 0 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.service-head {
  margin-top: 34px;
}

.services-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-order-layout {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.service-order-summary,
.service-order-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 16, 24, .9);
  padding: 18px;
}

.service-order-summary {
  position: sticky;
  top: 96px;
}

.service-order-summary .service-art {
  margin: 0 auto 16px;
}

.service-order-summary h3 {
  margin-top: 0;
}

.service-order-summary > strong {
  display: block;
  color: var(--gold);
  font-size: 24px;
  margin: 12px 0 0;
}

.service-order-total {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 12px 0 16px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(53, 215, 126, .1);
  font-weight: 900;
}

.service-order-form {
  display: grid;
  gap: 14px;
}

.service-order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .auth-view,
  .dashboard-layout,
  .service-order-layout,
  .plans-grid,
  .credit-grid {
    grid-template-columns: 1fr;
  }

  .service-order-summary {
    position: static;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .set-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-card {
    grid-template-columns: 1fr 1fr;
  }

  .account-side {
    position: static;
  }

  .trade-history-card > img {
    width: 64px;
    height: 90px;
  }

  .trade-history-title img,
  .trade-history-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .topbar {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    padding: 14px;
  }

  .top-actions {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .drawer-overlay {
    position: fixed;
    inset: 0;
    display: block;
    pointer-events: none;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    transition: opacity .24s var(--ease-out);
    z-index: 40;
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(86vw, 360px);
    padding: 16px;
    border-left: 1px solid var(--line);
    background: rgba(8, 9, 13, .98);
    box-shadow: -28px 0 90px rgba(0, 0, 0, .48);
    transform: translateX(104%);
    transition: transform .28s var(--ease-out);
    z-index: 50;
  }

  .drawer-open {
    overflow: hidden;
  }

  .drawer-open .drawer-overlay {
    pointer-events: auto;
    opacity: 1;
  }

  .drawer-open .mobile-drawer {
    transform: translateX(0);
  }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .drawer-close {
    width: 40px;
    padding: 0;
    font-size: 24px;
  }

  .drawer-link {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    min-height: 48px;
  }

  .drawer-lang {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .drawer-lang button {
    display: grid;
    place-items: center;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
  }

  .drawer-lang button.active {
    outline: 2px solid rgba(82, 184, 255, .75);
  }

  .drawer-lang img {
    width: 24px;
    height: 17px;
    object-fit: cover;
    border-radius: 2px;
  }

  .drawer-lang span {
    display: none;
  }

  main {
    padding: 16px;
  }

  h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .auth-view {
    min-height: auto;
    gap: 22px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .toolbar,
  .card-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .set-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .stock-card {
    padding: 10px;
  }

  .stock-card h3 {
    font-size: 14px;
    line-height: 1.2;
  }

  .stock-card p,
  .stock-meta {
    font-size: 12px;
  }

  .stock-meta {
    display: grid;
    gap: 4px;
  }

  .buy-card {
    min-height: 36px;
    margin-top: 10px;
    padding: 0 10px;
  }

  .admin-user-card {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mascotFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes cardShine {
  0%, 55% {
    transform: translateX(-70%) rotate(10deg);
  }
  78%, 100% {
    transform: translateX(70%) rotate(10deg);
  }
}

@keyframes ambientSweep {
  from {
    transform: translateX(-8%) scale(1);
  }
  to {
    transform: translateX(8%) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* ==========================================================================
   UNIFIED PKMN ROCKET: FLOW CONTROL & BOT FLEET DATABASE STYLES
   ========================================================================== */

/* Flow Layout & Cards */
.flow-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.flow-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.flow-card {
  background: rgba(17, 22, 33, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.flow-card:hover {
  border-color: rgba(239, 47, 53, 0.4);
  transform: translateY(-2px);
  background: rgba(22, 28, 42, 0.95);
}

.flow-card.active {
  border-color: var(--red);
  background: rgba(30, 20, 25, 0.95);
  box-shadow: 0 0 20px rgba(239, 47, 53, 0.25);
}

.flow-card.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.flow-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flow-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.flow-card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}

.flow-card small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flow-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* Controls Panel */
.flow-controls-panel {
  background: rgba(17, 22, 33, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.flow-settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.flow-settings-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.flow-settings-row select,
.flow-settings-row input[type="text"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.flow-settings-row select:focus,
.flow-settings-row input[type="text"]:focus {
  border-color: var(--red);
}

.flow-settings-row input[type="range"] {
  accent-color: var(--red);
  height: 6px;
  margin-top: 10px;
  cursor: pointer;
}

.flow-actions-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.flow-btn {
  min-height: 42px;
  padding: 0 20px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.flow-btn.stop-btn {
  border-color: rgba(239, 47, 53, 0.5);
  color: var(--red);
}

.flow-btn.stop-btn:hover:not(:disabled) {
  background: rgba(239, 47, 53, 0.2);
}

.flow-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.flow-status-pill-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.status-indicator {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.status-indicator.idle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid var(--line);
}

.status-indicator.running {
  background: rgba(53, 208, 139, 0.2);
  color: var(--green);
  border: 1px solid rgba(53, 208, 139, 0.4);
  box-shadow: 0 0 10px rgba(53, 208, 139, 0.3);
  animation: pulseGreen 2s infinite;
}

.status-indicator.stopped {
  background: rgba(239, 47, 53, 0.2);
  color: var(--red);
  border: 1px solid rgba(239, 47, 53, 0.4);
}

.status-text {
  font-size: 13px;
  color: var(--muted);
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Terminal Console Box */
.flow-terminal-card {
  background: #06080c;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-title {
  font-size: 12px;
  font-family: monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auto-scroll-box {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.terminal-body {
  margin: 0;
  padding: 16px;
  min-height: 260px;
  max-height: 440px;
  overflow-y: auto;
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: #a6e22e;
  white-space: pre-wrap;
  word-break: break-all;
  background: #07090e;
}

/* Accounts Layout & Stats */
.accounts-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: rgba(17, 22, 33, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.stat-card strong {
  font-size: 26px;
  color: var(--text);
}

.text-green { color: var(--green) !important; }
.text-blue { color: var(--blue) !important; }
.text-red { color: var(--red) !important; }

/* Accounts Toolbar */
.accounts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(17, 22, 33, 0.6);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.search-box input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 14px;
  font-size: 14px;
  min-width: 280px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--red);
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

/* Accounts Table */
.accounts-table-container {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 22, 33, 0.85);
}

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.accounts-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.accounts-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.accounts-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Badges */
.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-status.completed,
.badge-status.full_flow {
  background: rgba(53, 208, 139, 0.18);
  color: var(--green);
  border: 1px solid rgba(53, 208, 139, 0.35);
}

.badge-status.in_progress,
.badge-status.active {
  background: rgba(82, 184, 255, 0.18);
  color: var(--blue);
  border: 1px solid rgba(82, 184, 255, 0.35);
}

.badge-status.banned {
  background: rgba(239, 47, 53, 0.25);
  color: var(--red);
  border: 1px solid rgba(239, 47, 53, 0.5);
  box-shadow: 0 0 8px rgba(239, 47, 53, 0.3);
}

.action-buttons {
  display: flex;
  gap: 6px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: all 0.15s ease;
}

.btn-sm:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm.btn-ban-check:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-sm.btn-update:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-sm.btn-view-cards:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Pagination */
.accounts-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

/* Account Modal */
.account-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.account-modal-overlay[hidden] {
  display: none !important;
}

.account-modal-card {
  background: #111621;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-head small {
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.modal-card-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
}

.modal-card-item img {
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  object-fit: cover;
  border-radius: 6px;
}

.modal-card-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.modal-card-item strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}


/* ==========================================================================
   GLOBAL LOADING SPLASH SCREEN OVERLAY
   ========================================================================== */
.loading-splash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 20, 30, 0.94) 0%, rgba(8, 9, 13, 0.98) 100%),
              url("../../assets/images/background.png") center / cover no-repeat;
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loading-splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.splash-pikachu-loader {
  width: 220px;
  max-width: 80vw;
  height: auto;
  filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.5));
  margin-bottom: 24px;
  animation: mascotFloat 2.6s ease-in-out infinite;
}

.splash-loader-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 6px 0;
  text-shadow: 0 0 20px rgba(239, 47, 53, 0.5);
}

.splash-loader-subtitle {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin: 0 0 24px 0;
}

.splash-progress-track {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.splash-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, #ff2e3b, #ff7a00);
  border-radius: 999px;
  box-shadow: 0 0 10px #ff2e3b;
  animation: splashProgressIndeterminate 1.4s infinite ease-in-out;
}

@keyframes splashProgressIndeterminate {
  0% { left: -40%; width: 30%; }
  50% { left: 30%; width: 50%; }
  100% { left: 100%; width: 30%; }
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}


/* ==========================================================================
   GAMING MODE SELECTION UI (SCREENSHOT 1)
   ========================================================================== */
.mode-selection-header {
  margin-bottom: 24px;
}

.mode-red-dash {
  width: 44px;
  height: 4px;
  background: #ff2e3b;
  border-radius: 2px;
  margin-bottom: 8px;
  box-shadow: 0 0 10px rgba(255, 46, 59, 0.75);
}

.mode-title-slanted {
  font-size: 2.2rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 4px 0;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.mode-subtitle {
  font-size: 1rem;
  font-weight: 500;
  font-style: italic;
  color: #8c97aa;
  margin: 0;
}

.gaming-modes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 1400px) {
  .gaming-modes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .gaming-modes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gaming-modes-grid {
    grid-template-columns: 1fr;
  }
}

.gaming-mode-card {
  display: flex;
  flex-direction: column;
  background: rgba(14, 18, 27, 0.78);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
  user-select: none;
}

.gaming-mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Selected state: glowing red neon border */
.gaming-mode-card.active {
  border: 2px solid #ff2e3b;
  box-shadow: 0 0 30px rgba(255, 46, 59, 0.45), inset 0 0 15px rgba(255, 46, 59, 0.15);
  background: rgba(20, 24, 36, 0.88);
}

/* Preview Box: ~58% of card height */
.mode-preview-box {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 160px;
  border-radius: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #080a10;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-red .mode-preview-box .preview-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 46, 59, 0.32) 0%, transparent 72%);
  pointer-events: none;
}

.mode-blue .mode-preview-box .preview-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 168, 255, 0.3) 0%, transparent 72%);
  pointer-events: none;
}

.mode-gold .mode-preview-box .preview-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 184, 0, 0.3) 0%, transparent 72%);
  pointer-events: none;
}

.mode-purple .mode-preview-box .preview-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.3) 0%, transparent 72%);
  pointer-events: none;
}

.mode-emerald .mode-preview-box .preview-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.32) 0%, transparent 72%);
  pointer-events: none;
}

.mode-preview-gif {
  width: 88%;
  height: 88%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  transition: transform 0.25s var(--ease-out);
}

.gaming-mode-card:hover .mode-preview-gif {
  transform: scale(1.06);
}

/* Info Box */
.mode-info-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 6px 6px 6px;
  flex: 1;
}

.mode-info-content {
  flex: 1;
  min-width: 0;
}

.mode-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mode-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.mode-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-desc {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #8c97aa;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Arrow Button: circular with icon */
.mode-arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out);
}

.mode-arrow-btn svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
}

.gaming-mode-card.active .mode-arrow-btn {
  background: #ff2e3b;
  border-color: #ff2e3b;
  box-shadow: 0 0 15px rgba(255, 46, 59, 0.6);
}

.gaming-mode-card.active .mode-arrow-btn svg {
  stroke: #ffffff;
}

/* Inline check label */
.check-label-inline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer;
}
.check-label-inline input {
  width: auto !important;
  margin: 0 !important;
}

/* Advanced Settings Accordion */
.advanced-settings-details {
  background: rgba(14, 18, 27, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin: 18px 0;
  overflow: hidden;
  transition: all 0.2s var(--ease-out);
}

.advanced-settings-details[open] {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(14, 18, 27, 0.88);
}

.advanced-settings-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}

.advanced-settings-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-icon {
  font-size: 1.1rem;
}

.summary-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 215, 0, 0.12);
  color: #f5b942;
  border: 1px solid rgba(255, 215, 0, 0.25);
}

.advanced-settings-body {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.adv-group h4 {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.adv-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.adv-grid-2 label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

.adv-checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.adv-checks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.adv-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.adv-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

.adv-save-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.save-cfg-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
}

.save-notice {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
}
