/* ==========================================================================
   MapleWorld — High-Ticket Dark Fantasy UI & Boutique Glassmorphism
   ========================================================================== */

:root {
  --bg-obsidian: #090913;
  --surface-card: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --calc-accent: #f43f5e;
  --calc-accent-soft: rgba(244, 63, 94, 0.14);
  --calc-border: rgba(244, 63, 94, 0.35);
}

* {
  box-sizing: border-box;
}

/* Subtle Arcane Grid Background */
.arcane-grid {
  background-size: 48px 48px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 45%, transparent 100%);
}

/* Navigation Pills */
.nav-link {
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.09);
}

/* Mobile Menu */
.mobile-nav-menu {
  position: relative;
}

.mobile-nav-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-icon {
  display: grid;
  gap: 3px;
  width: 14px;
}

.mobile-nav-icon i {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-menu[open] .mobile-nav-icon i:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.mobile-nav-menu[open] .mobile-nav-icon i:nth-child(2) {
  opacity: 0;
}

.mobile-nav-menu[open] .mobile-nav-icon i:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

.mobile-nav-links {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  padding: 0.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(13, 14, 28, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: grid;
  gap: 2px;
  z-index: 50;
}

.mobile-nav-links a {
  padding: 0.6rem 0.85rem;
  border-radius: 0.65rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: background-color 0.16s ease;
}

.mobile-nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Hero Artwork Carousel & Floating Motion */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

.hero-carousel-image {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-carousel-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-switch-btn {
  color: #94a3b8;
}

.hero-switch-btn:hover {
  color: #ffffff;
}

.hero-switch-btn.is-active {
  background: rgba(139, 92, 246, 0.3);
  color: #ffffff;
  border: 1px solid rgba(167, 139, 250, 0.45);
}

/* Bento Service Cards */
.bento-card {
  position: relative;
  border-radius: 1.5rem;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
}

.bento-card:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 3px;
}

.bento-rose:hover {
  border-color: rgba(251, 113, 133, 0.45);
  box-shadow: 0 20px 45px -15px rgba(244, 63, 94, 0.22);
}

.bento-emerald:hover {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 20px 45px -15px rgba(16, 185, 129, 0.2);
}

.bento-violet:hover {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 20px 45px -15px rgba(139, 92, 246, 0.25);
}

.bento-amber:hover {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 20px 45px -15px rgba(245, 158, 11, 0.2);
}

/* Calculator Dynamic Service Accent Tokens */
.calculator-layout[data-service="mesos"] {
  --calc-accent: #fb7185;
  --calc-accent-soft: rgba(244, 63, 94, 0.14);
  --calc-border: rgba(251, 113, 133, 0.45);
}

.calculator-layout[data-service="leveling"] {
  --calc-accent: #34d399;
  --calc-accent-soft: rgba(16, 185, 129, 0.14);
  --calc-border: rgba(52, 211, 153, 0.45);
}

.calculator-layout[data-service="bossing"] {
  --calc-accent: #a78bfa;
  --calc-accent-soft: rgba(139, 92, 246, 0.16);
  --calc-border: rgba(167, 139, 250, 0.5);
}

/* Calculator Tabs */
.calc-tab-btn {
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.calc-tab-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.calc-tab-btn.active-tab {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Custom Range Slider */
input[type="range"].maple-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

input[type="range"].maple-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fb7185;
  border: 3px solid #090913;
  box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.55), 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"].maple-slider::-webkit-slider-thumb:hover {
  transform: scale(1.14);
  background: #f43f5e;
}

input[type="range"].maple-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fb7185;
  border: 3px solid #090913;
  box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.55);
}

/* Selectable Leveling Option Cards */
.maple-check-card {
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.maple-check-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  background-color: rgba(255, 255, 255, 0.055);
}

.maple-check-card.selected {
  border-color: var(--calc-border) !important;
  background-color: var(--calc-accent-soft) !important;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
}

/* Boss Filter & Cards */
.boss-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: all 0.16s ease;
}

.boss-filter-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.boss-filter-btn.is-active {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.55);
  color: #ffffff;
}

.boss-choice-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  padding: 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.boss-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(255, 255, 255, 0.055);
}

.boss-choice-card.is-selected {
  border-color: rgba(167, 139, 250, 0.75);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.24), rgba(99, 102, 241, 0.12));
  box-shadow: 0 8px 20px -6px rgba(139, 92, 246, 0.35);
}

/* Boss Pilot Toggle Switch */
.boss-pilot-toggle {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.boss-pilot-toggle .boss-pilot-switch {
  background: rgba(255, 255, 255, 0.22);
}

.boss-pilot-toggle.is-enabled {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.boss-pilot-toggle.is-enabled .boss-pilot-switch {
  background: #10b981;
}

/* Custom Scrollbar for Order Summary */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

/* Infinite Smooth Reviews Marquee */
.reviews-viewport {
  overflow: hidden;
  padding: 0.5rem 0 1rem;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.reviews-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  animation: reviews-marquee var(--review-scroll-duration, 65s) linear infinite;
}

.reviews-carousel:hover .reviews-track {
  animation-play-state: paused;
}

.review-slide {
  flex: 0 0 clamp(300px, 30vw, 370px);
}

.rv-card {
  min-height: 215px;
  padding: 1.35rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rv-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.4);
}

.rv-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rv-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  position: relative;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.18);
}

.rv-avatar img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 155%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

.rv-user {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rv-user b {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
}

.rv-user small {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.rv-flag {
  width: 18px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.rv-stars {
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fbbf24;
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.rv-quote {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.rv-foot span {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: #c4b5fd;
}

@keyframes reviews-marquee {
  to {
    transform: translateX(calc(-1 * var(--review-scroll-distance, 50%)));
  }
}

/* FAQ Accordion */
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] .faq-chevron {
  transform: rotate(45deg);
}

/* Toast Active State */
#toast-notification.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .reviews-track {
    animation: none !important;
  }
  .hero-carousel-image {
    transition: none;
  }
}
