:root {
  --bg-obsidian: #070911;
  --bg-card: #101423;
  --bg-card-2: #151b2f;
  --gold-1: #f7c948;
  --gold-2: #d9971a;
  --border-subtle: rgba(255, 255, 255, 0.09);
}

html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(247, 201, 72, 0.11), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(56, 189, 248, 0.09), transparent 34%);
  color: #eef2ff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

.mj-glass {
  background: rgba(12, 16, 29, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
}

.mj-card {
  background: linear-gradient(160deg, rgba(21, 27, 47, 0.94), rgba(11, 15, 27, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.mj-gold-text {
  background: linear-gradient(95deg, #fff3b0, #f7c948 45%, #e69d18);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mj-btn-gold {
  background: linear-gradient(135deg, #fbd34d, #d98e13);
  color: #0b0e17;
  font-weight: 800;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}
.mj-btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(247, 201, 72, 0.28); }

.mj-btn-tg {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  font-weight: 800;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.mj-btn-tg:hover { filter: brightness(1.08); transform: translateY(-1px); }

.mj-btn-line {
  background: linear-gradient(135deg, #22c55e, #059669);
  color: #ffffff;
  font-weight: 800;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.mj-btn-line:hover { filter: brightness(1.08); transform: translateY(-1px); }

.mj-btn-discord {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  color: #ffffff;
  font-weight: 800;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.mj-btn-discord:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* High-contrast Quick Links cards */
.ql-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 0.9rem 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ql-card:hover { transform: translateY(-3px); }
.ql-gold { background: linear-gradient(135deg, rgba(250, 204, 21, 0.25), rgba(180, 83, 9, 0.22)); border: 1px solid rgba(250, 204, 21, 0.55); box-shadow: 0 0 22px rgba(250, 204, 21, 0.15); }
.ql-cyan { background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(14, 116, 144, 0.24)); border: 1px solid rgba(34, 211, 238, 0.55); box-shadow: 0 0 22px rgba(34, 211, 238, 0.15); }
.ql-emerald { background: linear-gradient(135deg, rgba(52, 211, 153, 0.24), rgba(6, 95, 70, 0.24)); border: 1px solid rgba(52, 211, 153, 0.55); box-shadow: 0 0 22px rgba(52, 211, 153, 0.15); }
.ql-violet { background: linear-gradient(135deg, rgba(167, 139, 250, 0.26), rgba(91, 33, 182, 0.26)); border: 1px solid rgba(167, 139, 250, 0.58); box-shadow: 0 0 22px rgba(167, 139, 250, 0.15); }
.ql-rose { background: linear-gradient(135deg, rgba(251, 113, 133, 0.25), rgba(159, 18, 57, 0.24)); border: 1px solid rgba(251, 113, 133, 0.55); box-shadow: 0 0 22px rgba(251, 113, 133, 0.15); }
.ql-sky { background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(29, 78, 216, 0.24)); border: 1px solid rgba(56, 189, 248, 0.55); box-shadow: 0 0 22px rgba(56, 189, 248, 0.15); }

/* Rarity borders for game icons */
.rarity-common { border: 2px solid #94a3b8; background: radial-gradient(circle, rgba(148,163,184,0.22), rgba(15,23,42,0.9)); }
.rarity-uncommon { border: 2px solid #34d399; background: radial-gradient(circle, rgba(52,211,153,0.24), rgba(15,23,42,0.9)); }
.rarity-rare { border: 2px solid #38bdf8; background: radial-gradient(circle, rgba(56,189,248,0.26), rgba(15,23,42,0.9)); }
.rarity-epic { border: 2px solid #c084fc; background: radial-gradient(circle, rgba(192,132,252,0.28), rgba(15,23,42,0.9)); }
.rarity-mythic { border: 2px solid #facc15; background: radial-gradient(circle, rgba(250,204,21,0.32), rgba(15,23,42,0.9)); box-shadow: 0 0 14px rgba(250,204,21,0.28); }

/* Active tab buttons */
.calc-tab-btn.active {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(217, 151, 26, 0.2));
  border-color: rgba(250, 204, 21, 0.72) !important;
  color: #fde68a !important;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.18);
}

/* Horizontal pill scroller (hide scrollbar cleanly) */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Swipeable card screenshot carousel */
.mj-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.mj-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

/* Diagonal MJ LM watermark stamp for sold gallery */
.mj-wm-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 15;
}
.mj-wm-badge span {
  transform: rotate(-16deg);
  padding: 0.35rem 1.3rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(250, 204, 21, 0.75);
  background: rgba(7, 9, 17, 0.78);
  color: #fde047;
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

/* Floating Quick Contact Dock */
.mj-contact-dock {
  position: fixed;
  right: 0.65rem;
  bottom: 5.2rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.4rem;
  border-radius: 1rem;
  background: rgba(11, 15, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.48);
}
@media (min-width: 768px) {
  .mj-contact-dock { bottom: 1.5rem; right: 1rem; }
}

/* FAQ Accordion */
details.mj-faq summary {
  list-style: none;
  cursor: pointer;
}
details.mj-faq summary::-webkit-details-marker { display: none; }
details.mj-faq[open] .faq-plus { transform: rotate(45deg); }
.faq-plus { transition: transform 0.18s ease; }

/* Sticky Gem Bar */
.gem-sticky-bar {
  position: sticky;
  bottom: 4.5rem;
  z-index: 35;
}
@media (min-width: 768px) {
  .gem-sticky-bar { bottom: 1rem; }
}
/* Floating Bottom-Left Hire a Guildmate Widget */
.mj-guild-float {
  position: fixed;
  left: 0.65rem;
  bottom: 5.2rem;
  z-index: 45;
  max-width: 195px;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
@media (min-width: 768px) {
  .mj-guild-float { bottom: 1.5rem; left: 1rem; max-width: 225px; }
}
.mj-guild-hidden {
  opacity: 0 !important;
  transform: translateY(16px) !important;
  pointer-events: none !important;
}

/* Accounts Page One-Time Scroll-Up Hint Animation */
@keyframes mjSwipeUp {
  0%, 100% { transform: translateY(4px); opacity: 0.7; }
  50% { transform: translateY(-5px); opacity: 1; }
}
.mj-swipe-up-icon {
  animation: mjSwipeUp 1.25s ease-in-out infinite;
}
.mj-scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 5.3rem;
  transform: translateX(-50%);
  z-index: 46;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
@media (min-width: 768px) {
  .mj-scroll-hint { bottom: 1.6rem; }
}
.mj-scroll-hint-hide {
  opacity: 0 !important;
  transform: translate(-50%, 14px) !important;
  pointer-events: none !important;
}
/* Arabic RTL Typography & Direction Rules */
html[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  line-height: 1.72;
}
html[dir="rtl"] * {
  letter-spacing: 0 !important;
}
.mj-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
html[dir="rtl"] .mj-contact-dock {
  right: auto;
  left: 0.65rem;
}
html[dir="rtl"] .mj-guild-float {
  left: auto;
  right: 0.65rem;
}
@media (min-width: 768px) {
  html[dir="rtl"] .mj-contact-dock { left: 1rem; }
  html[dir="rtl"] .mj-guild-float { right: 1rem; }
}

/* Language Switcher Dropdown */
.mj-lang-menu {
  background: #0b1120 !important;
  border: 1px solid rgba(250,204,21,0.45) !important;
  box-shadow: 0 22px 55px rgba(0,0,0,0.94), 0 0 0 1px rgba(255,255,255,0.1) !important;
  max-height: 75vh; overflow-y: auto; z-index: 999 !important;
}
.mj-mob-nav-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.mj-mob-nav-scroll::-webkit-scrollbar { display: none; }

/* MJ_DOCK_AND_GEM_TOGGLE */
.mj-contact-dock {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.mj-contact-dock.is-idle-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(14px);
}
html[dir="rtl"] .mj-contact-dock.is-idle-hidden {
  transform: translateX(-14px);
}
.mj-contact-dock.is-dismissed {
  display: none !important;
}
.mj-dock-close {
  position: absolute;
  top: -9px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #dc2626;
  color: #ffffff;
  border: 1.5px solid #0b1120;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 46;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}
.mj-dock-close:hover { background: #ef4444; }
html[dir="rtl"] .mj-dock-close { right: auto; left: -7px; }

.gem-sticky-bar.is-collapsed {
  display: none !important;
}
.gem-sticky-close {
  position: absolute;
  top: -10px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #dc2626;
  color: #ffffff;
  border: 1.5px solid #0b1120;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 36;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.gem-sticky-close:hover { background: #ef4444; }
html[dir="rtl"] .gem-sticky-close { right: auto; left: 8px; }

.gem-sticky-reopen {
  position: sticky;
  bottom: 4.5rem;
  z-index: 35;
  display: none;
  width: fit-content;
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(11, 17, 32, 0.94);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.5);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
@media (min-width: 768px) {
  .gem-sticky-reopen { bottom: 1rem; }
}

/* MJ_GEM_STICKY_DUAL_ACTIONS */
.gem-sticky-actions {
  position: absolute;
  top: -12px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}
html[dir="rtl"] .gem-sticky-actions {
  right: auto;
  left: 8px;
}
.gem-sticky-btn {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  border: 2px solid #0b1120;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}
.gem-sticky-btn:active {
  transform: scale(0.92);
}
.gem-sticky-min {
  background: #0284c7;
  font-size: 13px;
}
.gem-sticky-min:hover {
  background: #0ea5e9;
}
.gem-sticky-dismiss {
  background: #dc2626;
  font-size: 16px;
}
.gem-sticky-dismiss:hover {
  background: #ef4444;
}
