/* WikiVaults — The Modern Museum Design System
   Clean Glassmorphism Vibe • Mobile-First Priority • 60fps GPU-Accelerated
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  /* Surface & Background (Bright, airy modern museum palette) */
  --surface: #faf8ff;
  --surface-bright: #faf8ff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f2f3ff;
  --surface-container: #eaedff;
  --surface-container-high: #e2e7ff;
  --surface-container-highest: #dae2fd;
  --surface-dim: #d2d9f4;
  --surface-variant: #dae2fd;

  /* Typography & Text */
  --on-surface: #131b2e;
  --on-surface-variant: #3f4753;
  --on-background: #131b2e;
  --outline: #707884;
  --outline-variant: #bfc7d5;
  --muted: #f2f3ff;
  --border: #dae2fd;
  --foreground: #131b2e;
  --primary-foreground: #ffffff;

  /* Brand Primary (Azure Blue) */
  --primary: #0061a5;
  --primary-container: #0d99ff;
  --primary-fixed: #d2e4ff;
  --primary-fixed-dim: #9fcaff;
  --on-primary: #ffffff;
  --on-primary-container: #002f55;

  /* Brand Secondary (Electric Orchid / Magenta) */
  --secondary: #a200ba;
  --secondary-container: #ea57ff;
  --secondary-fixed: #ffd6fd;
  --secondary-fixed-dim: #fbabff;
  --on-secondary: #ffffff;
  --on-secondary-container: #580066;

  /* Tertiary / Coins Gold */
  --tertiary: #855300;
  --tertiary-container: #d08500;
  --tertiary-fixed: #ffddb8;
  --tertiary-fixed-dim: #ffb95f;
  --on-tertiary: #ffffff;
  --on-tertiary-container: #432800;

  /* Contrast Inverses & Alerts */
  --inverse-surface: #283044;
  --inverse-on-surface: #eef0ff;
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error: #ffffff;

  /* Rarity Glow Tokens */
  --rarity-common-glow: rgba(148, 163, 184, 0.2);
  --rarity-uncommon-glow: rgba(16, 185, 129, 0.3);
  --rarity-rare-glow: rgba(13, 153, 255, 0.35);
  --rarity-epic-glow: rgba(234, 87, 255, 0.4);
  --rarity-legendary-glow: rgba(255, 185, 95, 0.45);

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.55rem;
  --radius-lg: 0.85rem;
  --radius-xl: 1.15rem;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-family);
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Museum Architectural Grid Background */
.bg-grid-museum {
  background-size: 24px 24px;
  background-position: -1px -1px;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
}

/* Safe Area Insets for Modern Mobile Screens (iOS & Android Notch/Pill) */
.pt-safe {
  padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
}

.pb-safe {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

/* Clean Scrollbar Suppression */
::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Material Symbols alignment */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* Primary Action Gradient Button (Refined sleek radius) */
.btn-stadium-gradient {
  background: linear-gradient(135deg, var(--secondary-container) 0%, var(--primary-container) 50%, var(--secondary-fixed) 100%);
  color: var(--on-primary-fixed, #001c37);
  box-shadow: 0 8px 24px -4px rgba(234, 87, 255, 0.32), 0 4px 14px rgba(13, 153, 255, 0.22);
  border-radius: var(--radius-lg);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-stadium-gradient:active {
  transform: scale(0.97);
}

.btn-stadium-gradient:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Glassmorphism Surface Base */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Bottom Tab Navigation Bar — Full-Fill Segmented Frosted Capsule */
.bottom-nav-container {
  pointer-events: auto;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: 9999px;
  box-shadow: 
    0 14px 38px -6px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.04),
    inset 0 1px 2px rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: stretch;
  padding: 4px;
  gap: 2px;
}

.nav-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  border-radius: 9999px;
  color: #64748b; /* slate-500 */
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  position: relative;
  user-select: none;
}

.nav-tab-btn:hover {
  color: #0f172a;
}

.nav-tab-btn.active {
  color: #0061a5;
  background: rgba(0, 97, 165, 0.1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.nav-tab-btn .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-tab-btn.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
  transform: scale(1.08);
}

.nav-tab-btn .tab-label {
  font-size: 0.6875rem; /* 11px */
  letter-spacing: 0.02em;
  font-weight: 600;
  margin-top: 3px;
  line-height: 1;
}

.nav-tab-btn.active .tab-label {
  font-weight: 800;
  color: #0061a5;
}

/* Global Toast Notification */
#toast-container {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.toast {
  background: rgba(40, 48, 68, 0.92);
  color: #ffffff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: toastSlideUp 0.25s ease-out forwards;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Holographic Rotating Rings & Animations */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinSlowReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.animate-spin-slow {
  animation: spinSlow 32s linear infinite;
}

.animate-spin-slow-rev {
  animation: spinSlowReverse 22s linear infinite;
}

/* Responsive Desktop Wrapper Constraints */
@media (min-width: 1025px) {
  #view-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Modal and Scale-up Transitions */
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-scaleUp {
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btn-primary {
  background: linear-gradient(135deg, #0061a5 0%, #0d99ff 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Hyper-Realistic Glassmorphism & Translucent Acrylic Pack System (Image 1 & 2) */
.glass-acrylic-pod {
  position: relative;
  border-radius: 2.25rem;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 
    0 24px 48px -12px rgba(15, 23, 42, 0.08),
    0 12px 24px -8px rgba(15, 23, 42, 0.04),
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(15, 23, 42, 0.03);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

/* Architectural Daylight Window Blind Stripes (from User Reference Render) */
.bg-studio-stripes {
  background-image: repeating-linear-gradient(
    130deg,
    transparent 0px,
    transparent 45px,
    rgba(15, 23, 42, 0.025) 45px,
    rgba(15, 23, 42, 0.025) 85px
  );
}

/* Unisex Modern Museum Pouch (Matching Reference Render 1:1) */
.unisex-pack-pouch {
  position: relative;
  width: 100%;
  max-width: 275px;
  aspect-ratio: 1 / 1.48;
  margin: 0 auto;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.18) 40%, rgba(255, 255, 255, 0.58) 100%);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(15, 23, 42, 0.1); /* Single clean hairline border ONLY on the outer edge */
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 
    inset 0 1.5px 2px rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  user-select: none;
}

/* Top & Bottom Clear Heat-Seal Crimp Bands (Completely borderless, seamless plastic ridges) */
.pouch-heat-seal-top,
.pouch-heat-seal-bottom {
  width: 100%;
  height: 11px;
  border-radius: 0.35rem;
  background: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.6) 0px,
    rgba(255, 255, 255, 0.6) 2px,
    transparent 2px,
    transparent 6px
  );
  border: none;
  box-shadow: none;
  pointer-events-none;
  z-index: 25;
}

/* Vibrant Neon Liquid Gel Cushion (Floating Pillow Core) */
.pouch-gel-cushion {
  position: relative;
  width: 100%;
  flex: 1;
  margin: 4px 0;
  border-radius: 1.3rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 
    inset 0 2.5px 5px rgba(255, 255, 255, 0.8),
    inset 0 -2.5px 5px rgba(0, 0, 0, 0.2),
    0 8px 24px -4px rgba(0, 0, 0, 0.15);
}

/* Inset Frosted Matte-Glass Window Plate */
.pouch-frosted-window {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.1),
    0 6px 20px -2px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  z-index: 20;
}

/* Upper Specular Glass Glare across the Frosted Window */
.window-glass-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  pointer-events-none;
  z-index: 18;
}

/* Diagonal Specular Glass Reflection Glare across the Pouch (from Reference) */
.pouch-specular-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.1) 28%, transparent 55%);
  pointer-events-none;
  z-index: 30;
}

/* Top-Left to Bottom-Right Sweeping Optical Glass Sheen Animation (Subtle & Relaxed Pace) */
@keyframes glassSheenGlide {
  0% {
    transform: translate3d(-100%, -100%, 0) rotate(32deg);
    opacity: 0;
  }
  16% {
    opacity: 0.42;
  }
  46% {
    transform: translate3d(120%, 120%, 0) rotate(32deg);
    opacity: 0;
  }
  100% {
    transform: translate3d(120%, 120%, 0) rotate(32deg);
    opacity: 0;
  }
}

.glass-shine-sweep {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 28%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.06) 60%,
    transparent 72%,
    transparent 100%
  );
  animation: glassSheenGlide 9s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events-none;
  z-index: 35;
}

/* Translucent molded glass lip / pouch margin (legacy support) */
.glass-pouch-sleeve {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px;
  border-radius: 2.2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.25) 45%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    inset 0 2.5px 4px rgba(255, 255, 255, 0.98),
    inset 0 -2px 4px rgba(15, 23, 42, 0.08),
    0 20px 48px -10px rgba(15, 23, 42, 0.16);
}

/* Diagonal glass specular reflection streak across upper pack */
.glass-specular-streak {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54%;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.35) 30%, rgba(255, 255, 255, 0.04) 58%, transparent 72%);
  pointer-events-none;
  z-index: 15;
}

/* Upper oval glass caustic bloom */
.glass-top-caustic {
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 40%;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 35% at 50% 0%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.15) 60%, transparent 100%);
  pointer-events-none;
  z-index: 16;
}

/* Bottom upward glass refraction rim */
.glass-bottom-refraction {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28%;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  pointer-events-none;
  z-index: 16;
}

/* Ambient sweeping glass light sheen that glides across the pack */
@keyframes glassSheenGlide {
  0% { transform: translateX(-160%) rotate(25deg); opacity: 0; }
  15% { opacity: 0.7; }
  45% { transform: translateX(180%) rotate(25deg); opacity: 0; }
  100% { transform: translateX(180%) rotate(25deg); opacity: 0; }
}

.glass-ambient-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  animation: glassSheenGlide 7.5s ease-in-out infinite;
  pointer-events-none;
  z-index: 17;
}

/* Floating Frosted Glass Lens Pill (from Image 1) */
.glass-lens-pill {
  position: relative;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(32px) saturate(220%);
  -webkit-backdrop-filter: blur(32px) saturate(220%);
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  box-shadow: 
    0 16px 36px -4px rgba(15, 23, 42, 0.14),
    0 4px 12px -2px rgba(15, 23, 42, 0.06),
    inset 0 2.5px 3.5px rgba(255, 255, 255, 1),
    inset 0 -1.5px 2px rgba(15, 23, 42, 0.04);
}

.glass-lens-pill::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 8%;
  right: 8%;
  height: 48%;
  border-radius: 9999px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events-none;
}

/* Connected Glass Dock Track */
.glass-connected-dock {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 8px 24px -4px rgba(15, 23, 42, 0.05),
    inset 0 1px 2px rgba(255, 255, 255, 0.95);
}

/* Glass Action Button with Specular Sheen */
.glass-action-btn {
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 12px 28px -4px rgba(0, 0, 0, 0.15),
    inset 0 2px 3px rgba(255, 255, 255, 0.6),
    inset 0 -2px 3px rgba(0, 0, 0, 0.1);
}
.glass-action-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent);
  pointer-events-none;
  border-radius: inherit;
}

/* Twinkling Micro-Sparkles for Luminous Modern Museum Packs (Image 1 reference) */
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1.35); }
}

.animate-twinkle {
  animation: sparkleTwinkle 2.8s ease-in-out infinite;
}

.animate-twinkle-delay-1 {
  animation: sparkleTwinkle 2.8s ease-in-out infinite 0.9s;
}

.animate-twinkle-delay-2 {
  animation: sparkleTwinkle 2.8s ease-in-out infinite 1.8s;
}

.hidden {
  display: none !important;
}

