/* Shared CSS Resets and Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.8s ease, color 0.8s ease;
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

/* Dynamic themes based on active view */
body.theme-home, body.theme-lunas {
  background-color: #faf9f6;
  color: #111;
  cursor: default;
}
body.theme-home ::selection, body.theme-lunas ::selection {
  background: #1a2ac4;
  color: #fff;
}

body.theme-transitions {
  background-color: #050008;
  color: #fff;
  cursor: default;
}
body.theme-transitions ::selection {
  background: #8b5cf6;
  color: #fff;
}

body.theme-gaming {
  background-color: #05000c;
  color: #fff;
  cursor: crosshair;
}
body.theme-gaming ::selection {
  background: #00f5ff;
  color: #000;
}

/* Custom Scrollbars */
body.theme-home::-webkit-scrollbar, body.theme-lunas::-webkit-scrollbar {
  width: 6px;
}
body.theme-home::-webkit-scrollbar-track, body.theme-lunas::-webkit-scrollbar-track {
  background: #faf9f6;
}
body.theme-home::-webkit-scrollbar-thumb, body.theme-lunas::-webkit-scrollbar-thumb {
  background: rgba(26,42,143,.2);
  border-radius: 3px;
}

body.theme-transitions::-webkit-scrollbar {
  width: 5px;
}
body.theme-transitions::-webkit-scrollbar-track {
  background: #050008;
}
body.theme-transitions::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.3);
}

body.theme-gaming::-webkit-scrollbar {
  width: 4px;
}
body.theme-gaming::-webkit-scrollbar-track {
  background: #05000c;
}
body.theme-gaming::-webkit-scrollbar-thumb {
  background: #00f5ff;
  box-shadow: 0 0 10px #00f5ff;
}

/* View transitions */
.spa-view {
  display: none;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.98) translateY(10px);
}
.spa-view.active {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Shared Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(26,42,143,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  padding: 14px 32px;
  font-size: 12px;
  letter-spacing: .06em;
  z-index: 9999;
  transition: all .5s cubic-bezier(.25,.1,.25,1);
  border-radius: 8px;
}
body.theme-transitions .toast {
  background: rgba(139,92,246,.2);
  border-color: rgba(139,92,246,.3);
}
body.theme-gaming .toast {
  background: rgba(5,0,12,.95);
  border-color: #00f5ff;
  color: #00f5ff;
  box-shadow: 0 0 20px rgba(0,245,255,.15);
  font-family: 'Share Tech Mono', monospace;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   SVG SIZING CONSTRAINTS & LAYOUT SAFETY NET
   ========================================================================== */

/* Navigation Logos & Brands */
.nav-logo, .nav__logo-img {
  max-height: 38px !important;
  width: auto !important;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* Global SVG defaults inside buttons, links, and arrow indicators */
svg {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Button & Action Link SVGs */
.nav-btn svg, 
.nav-cta svg, 
.nav-back svg, 
.nav-back-gaming svg,
.hero-btn svg, 
.sec-cta svg, 
.cta-link svg, 
.cm-cta svg, 
.btn-neon svg {
  width: 1.15rem !important;
  height: 1.15rem !important;
  margin-right: 8px;
}

.portal-arrow svg {
  width: 1.5rem !important;
  height: 1.5rem !important;
}

.cm-cta svg:last-child {
  margin-left: 6px;
  margin-right: 0 !important;
}

.comp-handle svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  margin: 0 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cm-feat-icon svg {
  width: 1.5rem !important;
  height: 1.5rem !important;
  margin: 0 !important;
}

