.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn-danger {
  background: rgba(59, 180, 255, 0.25);
  border-color: rgba(59, 180, 255, 0.5);
  color: var(--red-text);
}

.region-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.region-NA {
  background: rgba(59, 180, 255, 0.2);
  color: #9edcff;
}

.region-EU {
  background: rgba(52, 152, 219, 0.2);
  color: #82cfff;
}

.region-AS {
  background: rgba(46, 204, 113, 0.2);
  color: #7be2a8;
}

.region-SA {
  background: rgba(243, 156, 18, 0.2);
  color: #ffd580;
}

.region-OC {
  background: rgba(46, 204, 113, 0.2);
  color: #7be2a8;
}

.tier-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.tier-chip-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chip-ht1 {
  background: rgba(240, 165, 0, 0.18);
  color: #f0c040;
  border: 1px solid rgba(240, 165, 0, 0.3);
}

.chip-ht2 {
  background: rgba(212, 133, 15, 0.18);
  color: #e8a830;
  border: 1px solid rgba(212, 133, 15, 0.3);
}

.chip-ht3 {
  background: rgba(184, 108, 26, 0.18);
  color: #d89020;
  border: 1px solid rgba(184, 108, 26, 0.3);
}

.chip-ht4 {
  background: rgba(154, 85, 32, 0.18);
  color: #c87828;
  border: 1px solid rgba(154, 85, 32, 0.3);
}

.chip-ht5 {
  background: rgba(125, 68, 38, 0.18);
  color: #b06830;
  border: 1px solid rgba(125, 68, 38, 0.3);
}

.chip-lt1 {
  background: rgba(79, 195, 247, 0.15);
  color: #7dd8f8;
  border: 1px solid rgba(79, 195, 247, 0.25);
}

.chip-lt2 {
  background: rgba(41, 182, 246, 0.15);
  color: #5ec8f7;
  border: 1px solid rgba(41, 182, 246, 0.25);
}

.chip-lt3 {
  background: rgba(2, 136, 209, 0.18);
  color: #48b0e8;
  border: 1px solid rgba(2, 136, 209, 0.25);
}

.chip-lt4 {
  background: rgba(121, 134, 203, 0.18);
  color: #aab4e8;
  border: 1px solid rgba(121, 134, 203, 0.25);
}

.chip-lt5 {
  background: rgba(90, 96, 140, 0.22);
  color: #8b92c4;
  border: 1px solid rgba(121, 134, 203, 0.2);
}

.tier-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg4);
  margin-right: 4px;
  font-size: 11px;
  font-weight: 600;
}

.pvp-type-icon {
  display: block;
  object-fit: contain;
}

.pvp-type-icon--chip {
  width: 14px;
  height: 14px;
}

.pvp-type-icon--modal {
  width: 24px;
  height: 24px;
}

.pvp-icon-fallback {
  font-size: 12px;
  line-height: 1;
  opacity: 0.85;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform 0.25s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text2);
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--surface);
  color: var(--text);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.overlay.open {
  opacity: 1;
  pointer-events: all;
}

.dialog {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.dialog h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.chk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text2);
}

.chk-row input {
  width: auto;
}

.muted {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 24px;
}

.err {
  color: var(--red-text);
  font-size: 13px;
  margin-top: 10px;
}

.empty {
  text-align: center;
  color: var(--text3);
  padding: 40px;
}

.warn {
  background: var(--red-muted);
  border: 1px solid rgba(59, 180, 255, 0.3);
  color: var(--red-text);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 24px;
}

.site-footer {
  position: relative;
  margin-top: auto;
  padding: 48px 0 28px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 180, 255, 0.18), transparent 48%),
    radial-gradient(circle at 82% 15%, rgba(79, 195, 247, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(20, 20, 26, 0.9), rgba(12, 12, 16, 0.95)),
    var(--bg2);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(130deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 12px);
  opacity: 0.08;
  pointer-events: none;
}

.footer-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(0, 2fr);
  gap: 32px;
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text);
}

.footer-logo img {
  height: clamp(40px, 4vw, 56px);
  width: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

.footer-tagline {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text2);
  max-width: 360px;
}

.footer-badges {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}

.footer-badge.glow {
  background: rgba(59, 180, 255, 0.2);
  border-color: rgba(59, 180, 255, 0.45);
  color: var(--red-text);
  box-shadow: 0 0 18px var(--red-glow);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.footer-link {
  display: block;
  padding: 5px 0;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.18s, transform 0.18s;
}

.footer-link:hover {
  color: var(--text);
  transform: translateX(2px);
}

.footer-divider {
  height: 1px;
  background: var(--border);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text3);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(123, 226, 168, 0.5);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social-link {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all 0.18s;
}

.footer-social-link:hover {
  color: var(--text);
  border-color: rgba(59, 180, 255, 0.45);
  box-shadow: 0 0 16px var(--red-glow);
  transform: translateY(-1px);
}

.footer-copy {
  color: var(--text3);
}

@media (max-width: 900px) {
  .site-footer {
    padding: 40px 16px 20px;
  }

  .footer-inner {
    padding: 0 10px;
    gap: 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-columns {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-tagline {
    margin-top: 10px;
    font-size: 12px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .footer-status {
    width: 100%;
    justify-content: center;
  }

  .footer-social {
    width: 100%;
    justify-content: center;
  }

  .footer-copy {
    order: 3;
    font-size: 11px;
    opacity: 0.7;
  }
}

@media (max-width: 400px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  color: #fff;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 1000;
  margin-bottom: 10px;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  background: rgba(15, 15, 20, 0.9);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    toast-out 0.4s 2.6s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.toast.success {
  border-left-color: #7be2a8;
}

.toast.error {
  border-left-color: #ff5c5c;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.9);
  }

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

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(30px) scale(0.9);
  }
}