/* =============================================
   SWORDIE PORTAL — portal.css
   MapleStory v232 Private Server
   ============================================= */

:root {
  --bg-deep: #050a14;
  --bg-card: rgba(10, 18, 35, 0.85);
  --bg-blur: rgba(15, 25, 50, 0.7);
  --gold: #f5c842;
  --gold2: #ffd700;
  --gold-dark: #c9a227;
  --blue: #4a9eff;
  --blue-dark: #1a5fcb;
  --red: #e05252;
  --green: #52c07e;
  --text: #e8eaf0;
  --text-dim: #8a9bb5;
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 200, 66, 0.3);
  --glow-blue: 0 0 30px rgba(74, 158, 255, 0.3);
  --glow-gold: 0 0 30px rgba(245, 200, 66, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Outfit', 'Noto Sans Thai', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- PARTICLES BG ---- */
#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(30, 80, 200, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(245, 200, 66, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(5, 10, 20, 1) 0%, transparent 100%);
  background-color: var(--bg-deep);
  animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    background-position: 0% 0%, 100% 100%, 50% 50%;
  }

  100% {
    background-position: 10% 10%, 90% 90%, 50% 50%;
  }
}

/* ---- NAVBAR ---- */
.portal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 10, 20, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

.logo-accent {
  color: var(--gold);
}

.nav-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex: 1;
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px; white-space: nowrap;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.2), rgba(74, 158, 255, 0.2));
  color: var(--gold);
  border: 1px solid var(--border-glow);
}

.nav-tab i {
  font-size: 0.95rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: rgba(224, 82, 82, 0.15);
  border: 1px solid rgba(224, 82, 82, 0.3);
  color: var(--red);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.btn-logout:hover {
  background: rgba(224, 82, 82, 0.3);
}

/* ---- MAIN ---- */
.portal-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
}

/* ---- PAGES ---- */
.portal-page {
  display: none;
}

.portal-page.active {
  display: block;
}

/* ---- HERO ---- */
.page-hero {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-hero.short-hero {
  height: 260px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) saturate(1.2);
  transform: scale(1.05);
  transition: transform 8s ease;
}

.page-hero:hover .hero-bg {
  transform: scale(1.0);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 10, 20, 0.3) 0%, var(--bg-deep) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1rem;
}

.maple-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.2), rgba(245, 200, 66, 0.05));
  border: 1px solid var(--border-glow);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  animation: fadeUp 0.6s ease both;
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  animation: fadeUp 0.7s 0.1s ease both;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.75rem;
  animation: fadeUp 0.7s 0.2s ease both;
}

.gradient-gold {
  background: linear-gradient(135deg, #f5c842, #ffd700, #e8a500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- FORM CONTAINER ---- */
.form-container {
  max-width: 520px;
  margin: -60px auto 0;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ---- GLASS CARD ---- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: cardIn 0.5s ease both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- FORM HEADER ---- */
.form-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.3), rgba(26, 95, 203, 0.2));
  border: 1px solid rgba(74, 158, 255, 0.3);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.2);
}

.form-icon.register-icon {
  background: linear-gradient(135deg, rgba(82, 192, 126, 0.3), rgba(30, 120, 70, 0.2));
  border-color: rgba(82, 192, 126, 0.3);
  box-shadow: 0 0 20px rgba(82, 192, 126, 0.2);
}

.form-icon.gift-icon {
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.3), rgba(200, 160, 30, 0.2));
  border-color: var(--border-glow);
  box-shadow: var(--glow-gold);
}

.form-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.form-header p {
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* ---- FIELDS ---- */
.field-group {
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.portal-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.portal-input:focus {
  border-color: rgba(74, 158, 255, 0.5);
  background: rgba(74, 158, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}

.portal-input::placeholder {
  color: rgba(138, 155, 181, 0.6);
}

.portal-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8L0 0h12z' fill='%238a9bb5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.portal-select option {
  background: #0d1b35;
  color: var(--text);
}

.code-input {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.15em;
  font-size: 1.1rem;
  text-align: center;
  text-transform: uppercase;
}

.input-eye-wrap {
  position: relative;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}

.eye-btn:hover {
  color: var(--text);
}

.input-addon-wrap {
  display: flex;
}

.input-addon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 1rem;
  color: var(--gold);
}

.input-addon-wrap .portal-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ---- BUTTONS ---- */
.btn-portal {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-glow {
  background: linear-gradient(135deg, #1a5fcb, #4a9eff);
  color: #fff;
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.35);
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, #2068d8, #5aaeff);
  box-shadow: 0 6px 28px rgba(74, 158, 255, 0.55);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.btn-gold {
  background: linear-gradient(135deg, #c9a227, #f5c842);
  color: #1a1200;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245, 200, 66, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #dab52e, #ffd700);
  box-shadow: 0 6px 28px rgba(245, 200, 66, 0.5);
  transform: translateY(-1px);
}

/* ---- DIVIDER ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- ALERTS ---- */
.portal-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  animation: alertIn 0.3s ease;
}

@keyframes alertIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.portal-alert.error {
  background: rgba(224, 82, 82, 0.15);
  border-color: rgba(224, 82, 82, 0.3);
  color: #ff9999;
}

.portal-alert.success {
  background: rgba(82, 192, 126, 0.15);
  border-color: rgba(82, 192, 126, 0.3);
  color: #90f0b8;
}

.portal-alert.info {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.3);
  color: #90c8ff;
}

/* ---- STATS BAR ---- */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 400px;
  margin: 0 auto 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 14px 32px;
  animation: fadeUp 0.8s 0.4s ease both;
}

.stat-item {
  text-align: center;
  padding: 0 24px;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ---- AUTH GUARD ---- */
.auth-guard {
  max-width: 420px;
  margin: 3rem auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.auth-guard h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.auth-guard p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.auth-guard .btn-portal {
  max-width: 220px;
  margin: 0 auto;
}

/* ---- REDEEM SUCCESS ---- */
.redeem-success {
  text-align: center;
  padding: 2.5rem 2rem;
}

.success-burst {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.burst-ring {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.6;
  animation: burstRing 1.5s ease-out infinite;
}

@keyframes burstRing {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.burst-icon {
  font-size: 3rem;
  position: relative;
  z-index: 1;
  animation: bounce 0.8s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }
}

.redeem-success h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
}

.redeem-success p {
  color: var(--text);
  margin: 0.5rem 0;
}

.hint-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---- HISTORY LIST ---- */
.section-mini-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dim);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.history-item .h-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.history-item .h-info {
  flex: 1;
}

.history-item .h-name {
  font-weight: 600;
}

.history-item .h-date {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.history-item .h-qty {
  color: var(--gold);
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
}

/* ---- TOPUP ---- */
.first-refill-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(224, 82, 82, 0.1), rgba(245, 200, 66, 0.05));
  border: 1px solid rgba(224, 82, 82, 0.2);
  border-left: 4px solid var(--red);
}

.banner-icon {
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.banner-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.banner-body p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.topup-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.75rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(12px);
  overflow: hidden;
  border-radius: 20px;
}

.package-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--tier-color), transparent 70%);
  opacity: 0.1;
  transition: var(--transition);
}

.package-card:hover {
  transform: translateY(-12px) scale(1.03);
  border-color: var(--tier-color, var(--gold));
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(var(--tier-color-rgb), 0.25);
}

.package-icon-main {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 15px var(--tier-color));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.package-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--tier-color, var(--red));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.package-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--tier-color, var(--text-dim));
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.package-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.package-nx {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  width: 100%;
}

.nx-total {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--tier-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(var(--tier-color-rgb), 0.5));
}

.nx-breakdown {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.section-title-wrap {
  width: 100%;
}

/* ---- ADMIN PANEL ---- */
.form-icon.admin-icon {
  background: linear-gradient(135deg, rgba(165, 100, 255, 0.3), rgba(100, 50, 200, 0.2));
  border-color: rgba(165, 100, 255, 0.4);
  box-shadow: 0 0 20px rgba(165, 100, 255, 0.25);
}

.gen-code-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px dashed rgba(245, 200, 66, 0.4);
  margin: 1.5rem 0;
  text-shadow: 0 0 15px rgba(245, 200, 66, 0.3);
}

.marketplace-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.market-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
}

.market-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
}

.filter-chip.active {
  background: rgba(245, 200, 66, 0.18);
  border-color: var(--border-glow);
  color: var(--gold);
}

.filter-chip.coming-soon {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge-soon {
  font-size: 0.65rem;
  background: var(--gold);
  color: #14100a;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

.market-search-wrap {
  flex: 1;
  position: relative;
  min-width: 180px;
}

.market-search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.market-search {
  padding-left: 42px !important;
}

.market-controls .btn-portal {
  width: auto;
  flex-shrink: 0;
  padding: 10px 20px;
}

/* ---- LISTINGS GRID ---- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
  animation: cardIn 0.4s ease both;
}

.listing-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow-gold);
  transform: translateY(-3px);
}

.listing-banner {
  height: 120px;
  position: relative;
  background: linear-gradient(135deg, #0d2060, #1a5fcb);
  overflow: hidden;
}

.listing-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.listing-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(245, 200, 66, 0.9);
  color: #14100a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.listing-body {
  padding: 1.25rem;
}

.listing-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

.listing-amount span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 4px;
}

.listing-seller {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 4px 0 12px;
}

.listing-seller strong {
  color: var(--text);
}

.listing-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
}

.listing-rate {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.listing-actions {
  display: flex;
  gap: 8px;
}

.listing-actions .btn-portal {
  flex: 1;
  padding: 9px;
  font-size: 0.85rem;
}

.btn-cancel-listing {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.25);
  color: rgba(224, 82, 82, 0.85);
  font-weight: 600;
  border-radius: 8px;
  padding: 9px;
  flex: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  font-family: var(--font);
}

.btn-cancel-listing:hover {
  background: rgba(224, 82, 82, 0.25);
  color: var(--red);
}

.empty-market {
  text-align: center;
  padding: 4rem 1rem;
  width: 100%;
}

.empty-market img {
  width: 120px;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-market h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-market p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.empty-market .btn-portal {
  display: inline-flex;
  width: auto;
}

/* ---- PRICE PREVIEW ---- */
.price-preview {
  background: rgba(245, 200, 66, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 1rem;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin: 4px 0;
}

.preview-row.bold {
  font-weight: 700;
  border-top: 1px solid var(--border-glow);
  padding-top: 8px;
  margin-top: 8px;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay[style*="display:none"] {
  display: none !important;
}

.modal-box {
  max-width: 480px;
  width: 100%;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close,
.buy-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(224, 82, 82, 0.2);
  color: var(--red);
  border-color: rgba(224, 82, 82, 0.3);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 1.25rem;
}

.modal-actions .btn-portal {
  flex: 1;
}

.buy-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ---- TOAST ---- */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 240px;
  max-width: 340px;
  font-size: 0.875rem;
  pointer-events: all;
  animation: toastIn 0.4s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.toastOut {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

.toast.success {
  border-color: rgba(82, 192, 126, 0.4);
}

.toast.error {
  border-color: rgba(224, 82, 82, 0.4);
}

.toast-icon {
  margin-right: 8px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 680px) {
  .nav-inner {
    gap: 0.75rem;
  }

  .nav-tab span {
    display: none;
  }

  .nav-tab {
    padding: 8px 12px;
    flex: none;
  }

  .nav-tabs {
    flex: none;
  }

  .page-hero {
    height: 320px;
  }

  .page-hero.short-hero {
    height: 200px;
  }

  .market-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .market-controls .btn-portal {
    width: auto;
    align-self: flex-end;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }
}

/* ---- USER META & BALANCES ---- */
.user-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.user-balances {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.user-balances>span {
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.balance-nx {
  color: var(--gold);
}

.balance-cash {
  color: #52c07e;
}

.user-balances>span:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* =============================================
   MAPLESTORY MMORPG GAMING UI STYLES
   ============================================= */

/* ---- GAME HUD WINDOW FRAME ---- */
.ms-window-frame {
  background: rgba(8, 16, 32, 0.92);
  border: 1px solid rgba(245, 200, 66, 0.3);
  box-shadow: 
    0 0 20px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(245, 200, 66, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ms-window-frame:hover {
  border-color: rgba(245, 200, 66, 0.5);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.9),
    0 0 25px rgba(245, 200, 66, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ms-window-header {
  background: linear-gradient(180deg, rgba(28, 48, 80, 0.95) 0%, rgba(14, 25, 45, 0.95) 100%);
  border-bottom: 1px solid rgba(245, 200, 66, 0.3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ms-window-title {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(245, 200, 66, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.ms-window-controls {
  display: flex;
  gap: 6px;
}

.ms-win-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ms-win-dot.dot-red { background: #e05252; box-shadow: 0 0 6px rgba(224, 82, 82, 0.5); }
.ms-win-dot.dot-yellow { background: #f5c842; box-shadow: 0 0 6px rgba(245, 200, 66, 0.5); }
.ms-win-dot.dot-green { background: #52c07e; box-shadow: 0 0 6px rgba(82, 192, 126, 0.5); }

.ms-window-body {
  padding: 20px;
}

/* ---- GAMING BUTTONS ---- */
.btn-game-primary {
  background: linear-gradient(180deg, #ffd700 0%, #c9a227 100%);
  color: #050a14;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid #ffe566;
  box-shadow: 
    0 4px 15px rgba(245, 200, 66, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.btn-game-primary:hover {
  background: linear-gradient(180deg, #fff066 0%, #d4ae2d 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(245, 200, 66, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-game-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(245, 200, 66, 0.4);
}

.btn-game-secondary {
  background: linear-gradient(180deg, rgba(30, 50, 85, 0.9) 0%, rgba(15, 25, 45, 0.9) 100%);
  color: #e8eaf0;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid rgba(74, 158, 255, 0.4);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-game-secondary:hover {
  border-color: rgba(74, 158, 255, 0.8);
  background: linear-gradient(180deg, rgba(40, 70, 115, 0.95) 0%, rgba(20, 35, 60, 0.95) 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(74, 158, 255, 0.4);
}

/* ---- GAMING CHAT / COMMAND TERMINAL BOX ---- */
.ms-chat-box {
  background: rgba(5, 12, 24, 0.95);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.ms-chat-box:hover {
  background: rgba(10, 20, 38, 0.98);
  border-left-color: #3fc2ff;
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(63, 194, 255, 0.2);
}

.ms-cmd-name {
  font-family: 'Space Mono', monospace, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--gold);
  background: rgba(245, 200, 66, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(245, 200, 66, 0.3);
}

.ms-cmd-desc {
  color: #b0c4de;
  font-size: 0.9rem;
}

/* ---- GAMING BADGES ---- */
.ms-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ms-badge-patch {
  background: rgba(74, 158, 255, 0.15);
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.4);
}

.ms-badge-event {
  background: rgba(245, 200, 66, 0.15);
  color: #ffd700;
  border: 1px solid rgba(245, 200, 66, 0.4);
}

.ms-badge-maintenance {
  background: rgba(224, 82, 82, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(224, 82, 82, 0.4);
}

.ms-badge-online {
  background: rgba(82, 192, 126, 0.2);
  color: #52c07e;
  border: 1px solid rgba(82, 192, 126, 0.5);
  box-shadow: 0 0 10px rgba(82, 192, 126, 0.3);
}


/* ════ GACHAPON REEL SPINNER ════ */
.gacha-spinner-card {
  background: radial-gradient(circle at 50% 50%, rgba(20, 30, 55, 0.9), rgba(8, 12, 22, 0.95)) !important;
  border: 1px solid rgba(245, 200, 66, 0.3) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 200, 66, 0.15) !important;
}

.gacha-reel-container {
  position: relative;
  width: 100%;
  height: 150px;
  background: #060a12;
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9);
}

.gacha-center-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: linear-gradient(180deg, #ff0055, #ffd700, #ff0055);
  box-shadow: 0 0 15px #ffd700, 0 0 30px #ff0055;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.gacha-reel-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  padding: 0 50%;
  will-change: transform;
}

.gacha-card {
  width: 110px;
  height: 130px;
  margin: 0 5px;
  background: rgba(18, 25, 45, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.gacha-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.gacha-card .gacha-card-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e0e5f0;
  line-height: 1.1;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gacha-card.tier-godly {
  border-color: #ffd700;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.25), rgba(18, 25, 45, 0.95));
  box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.3);
}

.gacha-card.tier-legendary {
  border-color: #00f0ff;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2), rgba(18, 25, 45, 0.95));
}

.gacha-card.tier-epic {
  border-color: #c77dff;
}

.gacha-card.tier-rare {
  border-color: #4a9eff;
}

.gacha-item-pool-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pool-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  color: #cfd6e6;
}

.pool-item-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.pool-item-pill.god-tier {
  border-color: #ffd700;
  color: #ffd700;
  font-weight: 700;
}

.win-pop-anim {
  animation: winPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes winPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}


/* ════ 7-TIER PYRAMID MINI-GAME STYLES ════ */
.pyramid-board-card {
  background: radial-gradient(circle at 50% 10%, rgba(35, 25, 10, 0.95), rgba(8, 10, 18, 0.98)) !important;
  border: 2px solid rgba(255, 215, 0, 0.4) !important;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.2), 0 15px 50px rgba(0, 0, 0, 0.9) !important;
  border-radius: 16px;
}

.pyramid-canvas-wrap {
  background: rgba(5, 7, 14, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9);
}

#pyramid-canvas {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

.pity-counter-box {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
}

.pyramid-slots-legend {
  font-size: 0.75rem;
}


/* ════ TRUE STEP PYRAMID GRID ════ */
.pyramid-grid-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: radial-gradient(circle at 50% 0%, rgba(40, 28, 12, 0.95), rgba(6, 8, 15, 0.98));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 14px;
  padding: 20px 10px;
  overflow-x: auto;
}

.pyramid-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.pyr-block {
  width: 64px;
  min-height: 64px;
  background: rgba(15, 20, 35, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  user-select: none;
}

.pyr-block .item-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.pyr-block .pyr-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #c5cee0;
  line-height: 1;
  text-align: center;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pyr-block.apex-block {
  width: 120px;
  min-height: 85px;
  border-color: #ffd700;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3), rgba(20, 25, 45, 0.95));
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.3);
}

.pyr-crown {
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.pyr-block.gutter-block {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.15);
}

.gutter-icon {
  font-size: 1.2rem;
  line-height: 1;
  margin-bottom: 2px;
}

/* Active Highlight animation during climb */
.pyr-block.highlight-step {
  transform: scale(1.15);
  border-color: #00f0ff !important;
  background: rgba(0, 240, 255, 0.4) !important;
  box-shadow: 0 0 25px #00f0ff !important;
  z-index: 5;
}

.pyr-block.win-target {
  transform: scale(1.25);
  border-color: #ffd700 !important;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.6), rgba(15, 20, 35, 0.95)) !important;
  box-shadow: 0 0 35px #ffd700, 0 0 70px rgba(255, 215, 0, 0.8) !important;
  z-index: 10;
  animation: winPulse 0.8s infinite alternate;
}

.pyr-block.gutter-hit {
  transform: scale(1.2);
  border-color: #ff0055 !important;
  background: rgba(255, 0, 85, 0.4) !important;
  box-shadow: 0 0 25px #ff0055 !important;
}

@keyframes winPulse {
  0% { transform: scale(1.2); }
  100% { transform: scale(1.32); }
}


/* ════ PLAYERS RANKING & INSPECTOR STYLES ════ */
.ranking-table th.cursor-pointer {
  cursor: pointer;
  user-select: none;
}
.ranking-table th.cursor-pointer:hover {
  color: var(--gold);
}
.ranking-table tbody tr {
  cursor: pointer;
  transition: background 0.2s;
}
.ranking-table tbody tr:hover {
  background: rgba(245, 200, 66, 0.1) !important;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
}
.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}
.rank-badge.rank-2 {
  background: linear-gradient(135deg, #e0e5f0, #a0b0c5);
  color: #000;
}
.rank-badge.rank-3 {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: #fff;
}

.inspect-equips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

.inspect-equip-card {
  background: rgba(15, 22, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s;
}
.inspect-equip-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}
.inspect-equip-card img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  margin-bottom: 4px;
}
.inspect-equip-card .eq-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e0e5f0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspect-equip-card .eq-stats {
  font-size: 0.65rem;
  color: var(--gold);
}


/* ---- WIDE REDEEM CODE CONTAINER ---- */
#page-redeem .container {
  max-width: 1100px !important;
  width: 100%;
}
#redeem-content {
  width: 100% !important;
  max-width: 1100px !important;
}

.package-gift-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 200, 66, 0.12);
  border: 1px dashed rgba(245, 200, 66, 0.4);
  color: #ffd875;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  max-width: 95%;
  line-height: 1.3;
}

/* ---- FIRST REFILL x2 CARD HIGHLIGHT ---- */
.package-card.first-refill-card {
  border: 2px solid #ff4d4d;
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.12), rgba(245, 200, 66, 0.08));
  box-shadow: 0 0 25px rgba(255, 77, 77, 0.35), inset 0 0 15px rgba(245, 200, 66, 0.15);
  animation: glowPulse 2.5s infinite alternate;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3), inset 0 0 10px rgba(245, 200, 66, 0.1);
    border-color: #ff4d4d;
  }
  100% {
    box-shadow: 0 0 35px rgba(255, 77, 77, 0.6), 0 0 15px rgba(245, 200, 66, 0.4), inset 0 0 20px rgba(255, 77, 77, 0.2);
    border-color: #f5c842;
  }
}

.package-card.first-refill-card .package-tag.first-refill-tag {
  background: linear-gradient(90deg, #ff3b30, #ff9500);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.5);
  animation: tagShimmer 1.8s infinite;
}

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

/* ---- RICH GACHAPON-STYLE GIFT BOX ---- */
.package-gift-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 200, 66, 0.3);
  border-radius: 12px;
  padding: 8px 12px;
  width: 100%;
  max-width: 100%;
  margin-top: 14px;
  transition: all 0.3s ease;
}

.package-gift-box:hover {
  background: rgba(245, 200, 66, 0.1);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.gift-icon-frame {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.gift-icon-frame img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.gift-text-wrap {
  text-align: left;
  overflow: hidden;
}

.gift-badge {
  font-size: 0.68rem;
  color: #f5c842;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 2px;
}

.gift-name {
  font-size: 0.76rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
  text-align: left;
}

.package-gift-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

.package-gift-box .gift-icon-frame {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.package-gift-box .gift-icon-frame img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.package-gift-box .gift-text-wrap {
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* ════════════════════════════════════════════════════════════════
   STITCH-INSPIRED LUXURY TOP-UP CARDS & DYNAMIC GLOW EFFECTS
   ════════════════════════════════════════════════════════════════ */
.topup-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  width: 100%;
}

.package-card.stitch-pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.2rem 1.4rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(26, 32, 48, 0.85), rgba(13, 16, 26, 0.95));
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.package-card.stitch-pack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--tier-color), transparent 65%);
  opacity: 0.12;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.package-card.stitch-pack-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--tier-color, var(--gold));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 200, 66, 0.2);
}

.package-card.stitch-pack-card:hover::before {
  opacity: 0.25;
}

/* Dynamic x2 Monthly Refill Glowing Neon Card */
.package-card.stitch-pack-card.first-refill-card {
  border: 2px solid #ff7700;
  background: linear-gradient(160deg, rgba(40, 20, 15, 0.9), rgba(20, 12, 18, 0.95));
  box-shadow: 0 10px 35px rgba(255, 119, 0, 0.3), inset 0 0 20px rgba(255, 77, 77, 0.15);
  animation: stitchFireGlow 3s infinite alternate ease-in-out;
}

@keyframes stitchFireGlow {
  0% {
    border-color: #ff4d4d;
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.25), inset 0 0 15px rgba(245, 200, 66, 0.1);
  }
  50% {
    border-color: #ff9500;
    box-shadow: 0 12px 40px rgba(255, 149, 0, 0.4), 0 0 20px rgba(255, 77, 77, 0.2), inset 0 0 25px rgba(255, 149, 0, 0.18);
  }
  100% {
    border-color: #ffd700;
    box-shadow: 0 14px 45px rgba(255, 215, 0, 0.45), 0 0 25px rgba(255, 149, 0, 0.25), inset 0 0 30px rgba(255, 215, 0, 0.2);
  }
}

.package-card.stitch-pack-card .package-tag.first-refill-tag {
  background: linear-gradient(90deg, #ff3b30, #ff9500);
  color: #fff;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.8px;
  padding: 5px 14px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.6);
  animation: tagShimmer 1.8s infinite;
}

.stitch-btn-glow {
  background: linear-gradient(135deg, #ff9500, #ff3b30) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(255, 149, 0, 0.4) !important;
  transition: all 0.25s ease !important;
}

.stitch-btn-glow:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.6) !important;
}


/* ════════════════════════════════════════════════════════════════
   MAPLE PASS AAA GAMER UX/UI STYLES & GLOWING BUTTONS
   ════════════════════════════════════════════════════════════════ */
.pass-highlight-card {
  background: rgba(13, 18, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1rem;
  transition: all 0.3s ease;
}
.pass-highlight-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.2);
}

.pass-day-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pass-day-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.25);
  border-color: var(--cyan) !important;
}

.pass-day-card.milestone-day {
  border-color: #ffd700 !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.pass-day-card {
  width: 165px !important;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(15, 20, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  padding: 10px;
}

.btn-pass-free-claim {
  background: linear-gradient(135deg, #00f0ff, #00ff88) !important;
  color: #04121d !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.5px !important;
  border: 2px solid #ffffff !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.6) !important;
  transition: all 0.2s ease !important;
  display: block;
  width: 100%;
  text-align: center;
  cursor: pointer;
  animation: pulseClaimBtn 1.8s infinite alternate ease-in-out;
}
.btn-pass-free-claim:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 6px 25px rgba(0, 255, 136, 0.95), inset 0 0 12px #fff !important;
}

@keyframes pulseClaimBtn {
  0% { transform: scale(0.98); box-shadow: 0 4px 14px rgba(0, 240, 255, 0.7); }
  100% { transform: scale(1.02); box-shadow: 0 6px 22px rgba(0, 255, 136, 0.95); }
}
.btn-pass-free-claim:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.9) !important;
  background: linear-gradient(135deg, #70f7ff, #00c3ff) !important;
}

.btn-pass-vip-claim {
  background: linear-gradient(135deg, #ffd700, #ff9500) !important;
  color: #14100a !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.5px !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 5px 8px !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5) !important;
  transition: all 0.2s ease !important;
}
.btn-pass-vip-claim:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.8) !important;
}

.badge-focus-flame {
  background: linear-gradient(90deg, #ff3b30, #ff9500);
  color: #fff;
  font-weight: 800;
  font-size: 0.62rem;
  border-radius: 6px;
  padding: 2px 6px;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.6);
  animation: flamePulse 1.5s infinite alternate;
}

@keyframes flamePulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(1.05); opacity: 1; box-shadow: 0 2px 14px rgba(255, 149, 0, 0.8); }
}


.package-gift-box {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(255, 215, 0, 0.08) !important;
  border: 1px solid rgba(255, 215, 0, 0.3) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.gift-name {
  font-size: 0.78rem !important;
  color: #fff !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  word-break: break-word !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  text-align: left !important;
}

.rank-job-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 18, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}
.rank-job-badge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}


/* ════════════════════════════════════════════════════════════════
   2D CHARACTER SPRITE AVATAR & RANKING PRESENTATION
   ════════════════════════════════════════════════════════════════ */
.rank-avatar-frame {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, rgba(30, 42, 68, 0.9), rgba(12, 16, 28, 0.95));
  border: 1.5px solid rgba(245, 200, 66, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  position: relative;
}

.rank-avatar-frame img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-top: 4px;
}
