.site-footer[data-astro-cid-sz7xmlte]{background:var(--color-surface-container);border-top:3px solid var(--color-accent);margin-top:auto;overflow:hidden}.footer-content[data-astro-cid-sz7xmlte]{max-width:1200px;margin:0 auto;padding:40px 24px 24px;overflow:hidden}.footer-main[data-astro-cid-sz7xmlte]{display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px;padding-bottom:32px;border-bottom:1px solid var(--color-surface-elevated)}.footer-brand[data-astro-cid-sz7xmlte]{display:flex;flex-direction:column;gap:12px}.footer-logo[data-astro-cid-sz7xmlte]{display:flex;align-items:center;gap:12px;text-decoration:none}.footer-logo-img[data-astro-cid-sz7xmlte]{width:48px;height:48px;object-fit:contain}.footer-logo-text[data-astro-cid-sz7xmlte]{font-size:24px;font-weight:800;color:var(--color-text-title);text-transform:uppercase;letter-spacing:1px}.footer-tagline[data-astro-cid-sz7xmlte]{font-size:14px;color:var(--color-text-dark);margin:0}.footer-links[data-astro-cid-sz7xmlte]{display:flex;flex-direction:column;gap:12px}.footer-heading[data-astro-cid-sz7xmlte]{font-size:14px;font-weight:700;color:var(--color-text-title);text-transform:uppercase;letter-spacing:1px;margin:0 0 4px 0}.footer-link[data-astro-cid-sz7xmlte]{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--color-text-dark);text-decoration:none;transition:color 0.2s ease}.footer-link[data-astro-cid-sz7xmlte]:hover{color:var(--color-accent)}.footer-bottom[data-astro-cid-sz7xmlte]{display:flex;justify-content:space-between;align-items:center;padding-top:24px;min-width:0}.footer-copyright[data-astro-cid-sz7xmlte]{font-size:13px;color:var(--color-text-muted);margin:0;min-width:0}.footer-creator[data-astro-cid-sz7xmlte]{display:flex;align-items:center;justify-content:center;text-decoration:none;transition:all 0.2s ease;flex-shrink:0;width:auto}.footer-creator[data-astro-cid-sz7xmlte] i[data-astro-cid-sz7xmlte]{font-size:28px;color:#ff3347;transition:transform 0.2s ease;display:block;width:auto}@media (max-width: 768px){.footer-content[data-astro-cid-sz7xmlte]{padding:32px 16px 20px}.footer-main[data-astro-cid-sz7xmlte]{grid-template-columns:1fr 1fr;gap:32px}.footer-brand[data-astro-cid-sz7xmlte]{grid-column:1 / -1}.footer-bottom[data-astro-cid-sz7xmlte]{flex-direction:column;gap:16px;text-align:center}}@media (max-width: 480px){.footer-main[data-astro-cid-sz7xmlte]{grid-template-columns:1fr;gap:24px}.footer-links[data-astro-cid-sz7xmlte]{align-items:center}.footer-brand[data-astro-cid-sz7xmlte]{align-items:center;text-align:center}}/* Pelops Theme */
* {
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Typography - Shared across themes */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 34px;
  --font-size-4xl: 45px;

  /* Chart Line Colors - Shared across themes */
  --chart-line-1: #ff8c42; /* Orange */
  --chart-line-1-bg: rgba(255, 140, 66, 0.2);
  --chart-line-2: #5a9fd4; /* Blue */
  --chart-line-2-bg: rgba(90, 159, 212, 0.2);
  --chart-line-3: #8e7cc3; /* Purple */
  --chart-line-3-bg: rgba(142, 124, 195, 0.2);
  --chart-line-4: #66bb6a; /* Green */
  --chart-line-4-bg: rgba(102, 187, 106, 0.2);
  --chart-line-5: #ef5350; /* Red */
  --chart-line-5-bg: rgba(239, 83, 80, 0.2);
  --chart-line-6: #ff9a76; /* Coral */
  --chart-line-6-bg: rgba(255, 154, 118, 0.2);
  --chart-line-7: #26c6da; /* Cyan */
  --chart-line-7-bg: rgba(38, 198, 218, 0.2);
  --chart-line-8: #ffca28; /* Yellow */
  --chart-line-8-bg: rgba(255, 202, 40, 0.2);
  --chart-line-9: #5c6bc0; /* Indigo */
  --chart-line-9-bg: rgba(92, 107, 192, 0.2);
  --chart-line-10: #ec407a; /* Pink */
  --chart-line-10-bg: rgba(236, 64, 122, 0.2);
}

/* Light Theme (Default) */
:root,
[data-theme="light"] {
  /* Primary Colors - Softer warm palette */
  --color-primary: #f5e6d3; /* Soft cream/beige background */
  --color-primary-light: #fff9f0; /* Very light cream */
  --color-primary-dark: #462b00; /* Dark brown */

  /* Accent Colors - Toned down but still warm */
  --color-accent: #ff8c42; /* Softer orange */
  --color-accent-light: #ffb86c; /* Muted peach */
  --color-accent-dark: #e67e22; /* Deep orange */
  --color-accent-blue: #5a9fd4; /* Softer blue */
  --color-accent-purple: #8e7cc3; /* Muted purple */
  --color-accent-coral: #ff9a76; /* Softer coral */
  --color-accent-peach: #ffb86c; /* Muted peach */

  /* Text Colors - High contrast for readability */
  --color-text: #2c1810; /* Very dark brown */
  --color-text-dark: #6b4423; /* Medium brown */
  --color-text-title: #1a0f08; /* Almost black brown */
  --color-text-white: #fff;
  --color-text-muted: #8b7355;

  /* Surface Colors - Softer peachy/cream tones */
  --color-surface: #ffffff; /* Clean white for cards */
  --color-surface-container: #fef5e7; /* Very light peach */
  --color-surface-elevated: #ffe6cc; /* Light peach */

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Margins */
  --margin-xs: 4px;
  --margin-sm: 8px;
  --margin-base: 12px;
  --margin-lg: 16px;
  --margin-xl: 20px;
  --margin-top-xs: 4px;
  --margin-top-sm: 8px;
  --margin-top-base: 12px;
  --margin-top-lg: 16px;
  --margin-top-xl: 20px;
  --margin-bottom-xs: 4px;
  --margin-bottom-sm: 8px;
  --margin-bottom-base: 12px;
  --margin-bottom-lg: 16px;
  --margin-bottom-xl: 20px;

  /* Chart Colors */
  --chart-bg: rgba(245, 230, 211, 0.3); /* Light cream background */
  --chart-border: #ffe6cc; /* Light peach border */
  --chart-grid: rgba(107, 68, 35, 0.15); /* Medium brown grid lines */
  --chart-text: #2c1810; /* Dark brown text */
  --chart-tooltip-bg: rgba(70, 43, 0, 0.95); /* Dark brown tooltip */
  --chart-tooltip-border: #ff8c42; /* Orange border */

  /* Background */
  --body-bg-overlay: linear-gradient(135deg, rgba(245, 230, 211, 0.5) 0%, rgba(255, 230, 204, 0.75) 100%);
}

/* Dark Theme */
[data-theme="dark"] {
  /* Primary Colors - Deep dark palette */
  --color-primary: #1a1a2e; /* Deep dark blue */
  --color-primary-light: #25253d; /* Slightly lighter */
  --color-primary-dark: #0f0f1a; /* Very dark */

  /* Accent Colors - Vibrant on dark */
  --color-accent: #ff8c42; /* Keep orange accent */
  --color-accent-light: #ffb86c; /* Muted peach */
  --color-accent-dark: #e67e22; /* Deep orange */
  --color-accent-blue: #64b5f6; /* Brighter blue for dark */
  --color-accent-purple: #b39ddb; /* Lighter purple */
  --color-accent-coral: #ff9a76; /* Softer coral */
  --color-accent-peach: #ffb86c; /* Muted peach */

  /* Text Colors - Light text for dark bg */
  --color-text: #e8e8e8; /* Light gray */
  --color-text-dark: #a0a0a0; /* Medium gray */
  --color-text-title: #ffffff; /* White */
  --color-text-white: #fff;
  --color-text-muted: #6b6b7b;

  /* Surface Colors - Dark surfaces */
  --color-surface: #242438; /* Dark card bg */
  --color-surface-container: #1e1e32; /* Darker container */
  --color-surface-elevated: #2d2d44; /* Elevated surface */

  /* Shadows - More pronounced for dark mode */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);

  /* Chart Colors */
  --chart-bg: rgba(30, 30, 50, 0.5);
  --chart-border: #2d2d44;
  --chart-grid: rgba(255, 255, 255, 0.1);
  --chart-text: #e8e8e8;
  --chart-tooltip-bg: rgba(36, 36, 56, 0.95);
  --chart-tooltip-border: #ff8c42;

  /* Background */
  --body-bg-overlay: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(15, 15, 26, 0.95) 100%);
}

/* OLED Theme - Pure black for OLED displays */
[data-theme="oled"] {
  /* Primary Colors - Pure black palette */
  --color-primary: #000000; /* Pure black */
  --color-primary-light: #0a0a0a; /* Nearly black */
  --color-primary-dark: #000000; /* Pure black */

  /* Accent Colors - Vibrant on pure black */
  --color-accent: #ffa726; /* Brighter orange for OLED */
  --color-accent-light: #ffb74d; /* Lighter orange */
  --color-accent-dark: #f57c00; /* Deep orange */
  --color-accent-blue: #42a5f5; /* Bright blue */
  --color-accent-purple: #ab47bc; /* Vivid purple */
  --color-accent-coral: #ff8a65; /* Bright coral */
  --color-accent-peach: #ffb74d; /* Bright peach */

  /* Text Colors - High contrast for OLED */
  --color-text: #ffffff; /* Pure white */
  --color-text-dark: #b0b0b0; /* Light gray */
  --color-text-title: #ffffff; /* Pure white */
  --color-text-white: #ffffff;
  --color-text-muted: #808080;

  /* Surface Colors - Near black surfaces */
  --color-surface: #0a0a0a; /* Nearly black cards */
  --color-surface-container: #050505; /* Almost pure black */
  --color-surface-elevated: #121212; /* Slightly elevated */

  /* Shadows - Minimal for OLED */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.8);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.95);

  /* Chart Colors */
  --chart-bg: rgba(0, 0, 0, 0.8);
  --chart-border: #1a1a1a;
  --chart-grid: rgba(255, 255, 255, 0.15);
  --chart-text: #ffffff;
  --chart-tooltip-bg: rgba(10, 10, 10, 0.98);
  --chart-tooltip-border: #ffa726;

  /* Background */
  --body-bg-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
}

body {
  background-color: var(--color-primary);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: 1.6;
  min-height: 100vh;
  background-image: var(--body-bg-overlay), url(https://res.cloudinary.com/tristangregory/image/upload/v1659379638/gbl/bg_pattern_1.jpg);
  background-size: auto;
  background-position: center;
  background-attachment: fixed;
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-elevated);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 18px;
}

.theme-toggle:hover {
  background: var(--color-accent);
  color: white;
  transform: translateY(-3px) rotate(15deg);
  box-shadow: 0 6px 16px rgba(255, 140, 66, 0.5);
  border-color: var(--color-accent);
}

.theme-toggle .fa-sun {
  display: none;
}

.theme-toggle .fa-moon {
  display: block;
}

.theme-toggle .fa-eclipse {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-eclipse {
  display: block;
}

[data-theme="oled"] .theme-toggle .fa-sun {
  display: block;
}

[data-theme="oled"] .theme-toggle .fa-moon {
  display: none;
}

[data-theme="oled"] .theme-toggle .fa-eclipse {
  display: none;
}

main {
  flex: 1;
}

/* Main Header (Desktop & Mobile) */
.main-header {
  background: var(--color-surface-container);
  border-bottom: 3px solid var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Support Banner */
.support-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #ff6b35 100%);
  color: var(--color-text-white);
  font-size: 14px;
  font-weight: 600;
}

.support-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-banner-text i {
  font-size: 16px;
}

.support-banner-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-text-white);
  color: var(--color-accent);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.support-banner-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.support-banner-btn i {
  font-size: 14px;
}

@media (max-width: 480px) {
  .support-banner {
    flex-direction: column;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
  }

  .support-banner-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-button {
  background: var(--color-surface-elevated);
  border: 2px solid transparent;
  color: var(--color-text);
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.back-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.back-button i {
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}

.back-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.2);
}

.back-button:hover i {
  transform: translateX(-3px);
}

.back-button:active {
  transform: scale(0.95);
}

.back-button:active::before {
  opacity: 1;
}

.back-button:active {
  color: white;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: var(--color-text-title);
  text-decoration: none;
  font-size: var(--font-size-xl);
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.header-logo:hover {
  background: rgba(255, 140, 0, 0.1);
}

.header-logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.header-logo-text {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.header-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border: 2px solid transparent;
}

.header-link i {
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-link:hover {
  background: rgba(255, 140, 0, 0.15);
  color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.header-link:hover i {
  transform: scale(1.2) rotate(-5deg);
}

.header-link.active {
  background: rgba(255, 140, 0, 0.2);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.header-link.active::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent);
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-elevated);
  border-radius: 12px;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 18px;
  border: 2px solid transparent;
}

.header-icon-btn:hover {
  background: var(--color-accent-blue);
  color: white;
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 6px 16px rgba(76, 146, 255, 0.5);
  border-color: var(--color-accent-blue);
}

.page-title-bar {
  padding: 16px 24px 20px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text-title);
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
}

.page-title-underline {
  width: 60px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 10px var(--color-accent);
    transform: scaleX(1);
  }
  50% {
    box-shadow: 0 0 20px var(--color-accent), 0 0 30px rgba(255, 140, 0, 0.5);
    transform: scaleX(1.1);
  }
}

/* Mobile Bottom Navigation */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--color-surface-container);
  border-top: 1px solid rgba(255, 140, 0, 0.15);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px 12px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--color-text-dark);
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  max-width: 80px;
  position: relative;
  background: none;
  border: none;
}

.bottom-nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.bottom-nav-icon i {
  font-size: 20px;
  transition: all 0.3s ease;
}

.bottom-nav-link span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.bottom-nav-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 0 0 3px 3px;
  transition: transform 0.3s ease;
}

.bottom-nav-link:active {
  transform: scale(0.92);
}

.bottom-nav-link.active {
  color: var(--color-accent);
}

.bottom-nav-link.active .bottom-nav-icon {
  background: rgba(255, 140, 0, 0.15);
}

.bottom-nav-link.active .bottom-nav-icon i {
  transform: scale(1.1);
}

.bottom-nav-link.active .bottom-nav-indicator {
  transform: translateX(-50%) scaleX(1);
  animation: pulse 2s ease-in-out infinite;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Page Containers - Shared across multiple pages */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Error and Loading Cards - Used in units.astro, compare.astro, deck-builder.astro */
.error-card,
.loading-card {
  background: var(--color-surface);
  border: 2px solid var(--color-surface-elevated);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.error-card h2,
.loading-card h2 {
  color: var(--color-text-title);
  font-size: 28px;
  margin-bottom: 16px;
}

/* Unit Card - Base style used across multiple pages */
.unit-card {
  background: var(--color-surface);
  border: 3px solid var(--color-accent-coral);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(255, 162, 113, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.unit-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255, 140, 0, 0.5), 0 4px 12px rgba(76, 146, 255, 0.3);
  border-color: var(--color-accent);
}

.unit-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-title);
  margin-bottom: 0;
  text-align: center;
  line-height: 1.3;
}

/* Typography */
.title {
  font-size: clamp(28px, 5vw, var(--font-size-3xl));
  font-weight: 700;
  color: var(--color-text-title);
  text-align: center;
  margin: 32px 0 16px 0;
  letter-spacing: 0.25px;
}

.subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-dark);
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.small-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-title);
  text-align: center;
  letter-spacing: 0.15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  letter-spacing: 0.15px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent-light);
}

.btn-primary:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-3px) scale(1.02);
  border-color: var(--color-accent-peach);
}

.btn-secondary {
  background-color: var(--color-accent-blue);
  color: var(--color-text-white);
  border-color: var(--color-accent-blue);
}

.btn-secondary:hover {
  background-color: var(--color-accent-purple);
  transform: translateY(-3px) scale(1.02);
  border-color: var(--color-accent-purple);
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 3px solid var(--color-accent);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.15);
  border-radius: 16px;
  flex-wrap: wrap;
  row-gap: 25px;
  column-gap: 25px;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  max-width: 1250px;
  margin: 0 auto;
}

.leader-card {
  border-color: var(--color-accent-blue);
  box-shadow: 0 4px 12px rgba(76, 146, 255, 0.4);
}

.leader-card:hover {
  border-color: var(--color-accent-blue);
  box-shadow: 0 8px 24px rgba(76, 146, 255, 0.6), 0 4px 12px rgba(255, 140, 0, 0.3);
}

/* Tags */
.tag {
  background: var(--color-accent);
  color: var(--color-text-white);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.15px;
  text-transform: uppercase;
  border-radius: 5px;
  text-align: center;
  position: absolute;
  top: 0%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  padding: 4px 15px;
  z-index: 9;
}

.unit-name {
  background: var(--color-accent-coral);
  color: var(--color-text-white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15px;
  text-transform: uppercase;
  text-align: center;
  position: absolute;
  bottom: 0;
  padding: 8px 15px;
  z-index: 9;
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 0 0 13px 13px;
  box-shadow: 0 -2px 8px rgba(255, 162, 113, 0.3);
}

.leader .unit-name,
.leader-card .unit-name {
  background: var(--color-accent-blue);
  box-shadow: 0 -2px 8px rgba(76, 146, 255, 0.3);
}

.ace .unit-name,
.ace-card .unit-name {
  background: var(--color-accent-purple);
  box-shadow: 0 -2px 8px rgba(102, 97, 222, 0.3);
}

/* Unit Image */
.unit-img-cont {
  max-width: 300px;
  max-height: 180px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.unit-img-cont img {
  max-height: 190px;
  max-width: 95%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  display: block;
}

.unit-image {
  width: 100%;
  height: 160px;
  background-color: var(--color-surface-container);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.unit-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.unit-image i {
  font-size: 48px;
  color: var(--color-accent);
  opacity: 0.6;
}

/* Rarity Stars */
.rarity {
  color: var(--color-text);
  font-size: var(--font-size-xs);
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

.rarity i {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

/* Stat Badges */
.stat-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-badge.rarity-badge {
  background-color: var(--color-accent);
  color: var(--color-text-white);
}

.stat-badge.cost-badge {
  background-color: var(--color-surface-elevated);
  color: var(--color-text-white);
}

.stat-badge.type-badge {
  background-color: var(--color-accent-light);
  color: var(--color-text-white);
}

.stat-badge.hp-badge {
  background-color: #4caf50;
  color: var(--color-text-white);
}

.stat-badge.attack-badge {
  background-color: #ff5722;
  color: var(--color-text-white);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.game-card {
  background: var(--color-surface);
  border: 2px solid var(--color-surface-elevated);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.game-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text-title);
  margin-bottom: 8px;
}

.game-description {
  color: var(--color-text-dark);
  margin-bottom: 24px;
  line-height: 1.5;
}

.game-tag {
  background-color: var(--color-accent);
  color: var(--color-text-white);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 5px;
  padding: 4px 8px;
  position: absolute;
  top: 16px;
  right: 16px;
}

/* Rarity colors for game tags */
.game-tag.bronze,
.game-tag.rarity-1 {
  background: #8b7355;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.4);
}

.game-tag.silver,
.game-tag.rarity-2 {
  background: #c0c0c0;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.game-tag.gold,
.game-tag.rarity-3 {
  background: #ffd700;
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.game-tag.purple,
.game-tag.rarity-4 {
  background: #9b59b6;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.4);
}

/* Unit/Game Image Styles */
.game-image,
.unit-image {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  background-color: var(--color-surface-container);
  border-radius: 12px;
}

.game-image img,
.unit-image img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.game-image i,
.unit-image i {
  font-size: 48px;
  color: var(--color-accent);
  opacity: 0.5;
}

/* Filter button styles */
.filter-btn,
.type-filter-btn {
  background-color: var(--color-surface-elevated);
  color: var(--color-text);
  border: 2px solid var(--color-surface-elevated);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 12px;
}

.filter-btn:hover,
.type-filter-btn:hover {
  background-color: var(--color-surface-container);
  border-color: var(--color-accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.filter-btn.active,
.type-filter-btn.active {
  background-color: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent-light);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.5);
  transform: scale(1.05);
}

/* Rarity-specific filter colors */
.filter-btn.rarity-1 {
  border-color: #8b7355;
}

.filter-btn.rarity-1.active {
  background: #8b7355;
  border-color: #8b7355;
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
}

.filter-btn.rarity-2 {
  border-color: #c0c0c0;
}

.filter-btn.rarity-2.active {
  background: #c0c0c0;
  border-color: #c0c0c0;
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.filter-btn.rarity-3 {
  border-color: #ffd700;
}

.filter-btn.rarity-3.active {
  background: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  color: #1a1a1a;
}

.filter-btn.rarity-4 {
  border-color: #9b59b6;
}

.filter-btn.rarity-4.active {
  background: #9b59b6;
  border-color: #9b59b6;
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

/* Hero Section */
.hero {
  background: var(--color-surface-container);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  margin: 32px 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-primary-dark);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 64px 0;
}

.feature {
  background: var(--color-surface);
  border: 2px solid var(--color-surface-elevated);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.feature:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.feature i {
  font-size: 48px;
  color: var(--color-accent);
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.feature:nth-child(2n) i {
  color: var(--color-accent-light);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.feature h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text-title);
  margin-bottom: 12px;
}

.feature p {
  color: var(--color-text-dark);
  line-height: 1.5;
}

/* Credit Image */
.credit-img {
  position: absolute;
  height: 50px;
  display: block;
  bottom: 5px;
  right: 5px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 1));
  z-index: 100;
  opacity: 0.55;
}

/* Utility Classes */
.full {
  width: 100%;
}

.half {
  width: 50%;
}

.centered {
  display: flex;
  justify-content: center;
  align-items: center;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 16px;
}

.mt-2 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 16px;
}

.mb-2 {
  margin-bottom: 32px;
}

.p-1 {
  padding: 16px;
}

.p-2 {
  padding: 32px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    padding-bottom: 72px;
  }

  .page-container {
    padding: 16px;
  }

  .header-nav {
    display: none;
  }

  .header-dropdown {
    display: none;
  }

  .header-content {
    padding: 12px 16px;
    justify-content: center;
  }

  .header-left {
    flex: 1;
    justify-content: center;
  }

  .header-right {
    position: absolute;
    right: 16px;
  }

  .back-button {
    position: absolute;
    left: 16px;
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .header-logo-text {
    display: none;
  }

  .header-logo-img {
    width: 36px;
    height: 36px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .page-title {
    font-size: var(--font-size-lg);
  }

  .page-title-underline {
    width: 40px;
    height: 2px;
  }

  .page-title-bar {
    padding: 12px 16px 16px;
  }

  .bottom-nav {
    display: flex;
  }

  .container {
    padding: 16px;
  }

  .hero {
    padding: 32px 24px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .card {
    padding: 16px;
    gap: 16px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  /* Compact cards on mobile */
  .game-image,
  .unit-image {
    height: 100px;
  }

  .game-image img,
  .unit-image img {
    max-height: 90px;
  }

  .game-card .game-title,
  .unit-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .container,
  .page-container {
    padding: 12px;
  }

  .title {
    font-size: 28px;
  }

  .card {
    padding: 12px;
    gap: 12px;
  }

  .hero {
    padding: 24px 16px;
  }

  .feature {
    padding: 24px 16px;
  }

  .bottom-nav-link span {
    font-size: 9px;
  }

  .bottom-nav-icon i {
    font-size: 18px;
  }

  .bottom-nav-icon {
    width: 32px;
    height: 32px;
  }

  .page-title {
    font-size: var(--font-size-base);
  }

  .page-title-underline {
    width: 32px;
  }

  .page-title-bar {
    padding: 8px 12px 12px;
  }

  .back-button {
    position: absolute;
    left: 12px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 14px;
    border-radius: 8px;
  }

  .header-content {
    padding: 8px 12px;
    justify-content: center;
  }

  .header-left {
    flex: 1;
    justify-content: center;
  }

  .header-right {
    position: absolute;
    right: 12px;
  }

  .header-logo-img {
    width: 32px;
    height: 32px;
  }

  .header-icon-btn {
    width: 36px;
    height: 36px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 8px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus and Accessibility */
.btn:focus-visible,
.sidebar-link:focus-visible,
.bottom-nav-link:focus-visible,
.back-button:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.hidden {
  display: none !important;
}
/* Tools Dropdown (Desktop) */
.header-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 12px;
  margin-left: 2px;
  transition: transform 0.3s ease;
}

.dropdown-toggle:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  overflow: hidden;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-surface-elevated);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--color-accent);
  color: var(--color-text-white);
}

.dropdown-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* Mobile Tools Menu */
.mobile-tools-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-tools-menu.show {
  opacity: 1;
  visibility: visible;
}

.mobile-tools-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.mobile-tools-content {
  position: relative;
  width: 100%;
  background: var(--color-surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 70vh;
  overflow-y: auto;
}

.mobile-tools-menu.show .mobile-tools-content {
  transform: translateY(0);
}

.mobile-tools-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-accent);
}

.mobile-tools-header h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-title);
  margin: 0;
}

.mobile-tools-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-elevated);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 20px;
}

.mobile-tools-close:hover {
  background: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent);
  transform: rotate(90deg);
}

.mobile-tools-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-tool-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--color-surface-container);
  border: 2px solid var(--color-surface-elevated);
  border-radius: 12px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-tool-item:active {
  transform: scale(0.97);
}

.mobile-tool-item i {
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-text-white);
  border-radius: 8px;
}

.mobile-tool-item:hover {
  background: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent);
  transform: translateX(8px);
}

.mobile-tool-item:hover i {
  background: var(--color-text-white);
  color: var(--color-accent);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Memory Filter Buttons */
.memory-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.memory-filter-btn {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--color-surface-elevated);
  background: var(--color-surface-container);
  color: var(--color-text-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.memory-filter-btn:hover {
  background: var(--color-surface-elevated);
  color: var(--color-text);
}

.memory-filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.memory-filter-btn[data-memory-filter="hp"].active {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  border-color: #4caf50;
}

.memory-filter-btn[data-memory-filter="attack"].active {
  background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
  border-color: #ef5350;
}

.memory-filter-btn[data-memory-filter="speed"].active {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  border-color: #2196f3;
}

.memory-filter-btn[data-memory-filter="leader"].active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
}

.memory-filter-btn[data-memory-filter="cooldown"].active {
  background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
  border-color: #9c27b0;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 2px solid var(--color-surface-elevated);
  background: var(--color-surface-container);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--color-accent);
}

.filter-btn.active {
  background: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent);
}

.filter-dropdowns {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 2px solid var(--color-surface-elevated);
  background: var(--color-surface-container);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
  flex: 1;
}

.filter-select:hover {
  border-color: var(--color-accent);
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Color Badge Classes - Shared across battle-memories and deck-builder */
.color-red {
  background: #ef5350;
  color: white;
}

.color-blue {
  background: #42a5f5;
  color: white;
}

.color-green {
  background: #66bb6a;
  color: white;
}

.color-yellow {
  background: #ffeb3b;
  color: #1a1a1a;
}

.color-purple {
  background: #ab47bc;
  color: white;
}

.color-orange {
  background: #ff8c42;
  color: white;
}

.color-gray {
  background: #757575;
  color: white;
}

/* Modal Styles - Shared across multiple pages */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--color-surface);
  border: 3px solid var(--color-accent);
  border-radius: 16px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid var(--color-surface-elevated);
}

.modal-header h2,
.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-title);
  margin: 0;
}

.modal-header h2 {
  font-size: var(--font-size-2xl, 24px);
}

.modal-close {
  background: var(--color-surface-elevated);
  border: 2px solid transparent;
  color: var(--color-text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 24px 32px;
  border-top: 2px solid var(--color-surface-elevated);
  background: var(--color-surface-container);
}

/* Modal animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal scrollbar styling */
.modal-body::-webkit-scrollbar {
  width: 12px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--color-surface);
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--color-surface-elevated);
  border-radius: 10px;
  border: 2px solid var(--color-surface);
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Memory Info Modal - Shared styling */
.memory-info-modal-content {
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0;
}

.memory-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid var(--color-surface-elevated);
}

.memory-info-header h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-title);
  margin: 0;
}

.memory-info-body {
  padding: 24px;
  font-size: 13px;
}

.memory-effects-summary {
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--color-text);
  line-height: 1.6;
}

.effect-level {
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--color-surface-container);
  border-radius: 10px;
  border: 2px solid var(--color-surface-elevated);
}

.effect-level:last-child {
  margin-bottom: 0;
}

.level-label {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}

.no-data-message {
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Memory Card Styling - Shared */
.memory-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.memory-overlay,
.memory-modal-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  padding: 16px 12px 12px;
}

.memory-modal-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
  padding: 10px;
}

.memory-name,
.memory-list-name {
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.memory-list-name {
  font-size: 11px;
  line-height: 1.2;
}

/* Modal Memory Cards (Deck Builder) */
.modal-memory-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.memory-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-memory-card {
  position: relative;
  border-radius: 10px;
  background: var(--color-surface-container);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  border: 2px solid var(--color-surface-elevated);
  aspect-ratio: 0.65;
  display: flex;
  flex-direction: column;
}

.modal-memory-card:hover:not(.disabled):not(.no-data) {
  transform: scale(1.02);
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(255, 162, 113, 0.4);
}

.modal-memory-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-memory-card.no-data {
  opacity: 0.4;
  cursor: pointer;
  filter: grayscale(1);
}

.modal-memory-card.no-data:hover {
  opacity: 0.5;
  filter: grayscale(0.8);
}

.modal-memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-memory-card .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-elevated);
}

.modal-memory-card .no-image i {
  font-size: 40px;
  color: var(--color-accent);
  opacity: 0.5;
}

.memory-info-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--color-surface-container);
  color: var(--color-text);
  border: 2px solid var(--color-surface-elevated);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.memory-info-btn i {
  font-size: 12px;
  color: var(--color-accent);
}

.memory-info-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-white);
}

.memory-info-btn:hover i {
  color: var(--color-text-white);
}

.memory-info-btn:active {
  transform: scale(0.98);
}

.memory-list-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 5px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Memory Modal Search */
.modal-search-and-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.modal-search-wrapper {
  flex: 1;
  position: relative;
}

.modal-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
  font-size: 16px;
  pointer-events: none;
}

.modal-search-input,
#memory-search {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border-radius: 12px;
  border: 2px solid var(--color-surface-elevated);
  background: var(--color-surface-container);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
}

#memory-search {
  padding: 12px 16px;
  margin-bottom: 12px;
}

.modal-search-input:focus,
#memory-search:focus {
  outline: none;
  border-color: var(--color-accent);
}

@media (max-width: 540px) {
  .memory-info-modal-content {
    max-width: 95%;
    max-height: 85vh;
  }

  .memory-effects-summary {
    font-size: 12px;
  }

  .effect-level {
    margin-bottom: 10px;
    padding: 10px;
  }

  .level-label {
    min-width: 28px;
    font-size: 13px;
  }

  .memory-info-header h4 {
    font-size: 14px;
  }
}

/* Toggle Switch Components - Material Design 3 */
.toggle-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-surface-container);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-option:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-accent);
}

.toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  user-select: none;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 100px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px) translateY(-50%);
  background: white;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  height: 18px;
  width: 18px;
  left: 0;
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.2);
}

/* Shared filter panel controls */
.search-and-toggle-row {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.search-and-toggle-row .search-wrapper,
.search-and-toggle-row .search-input-wrapper {
  flex: 1;
}

.toggle-filters-btn {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 2px solid var(--color-surface-elevated);
  background-color: var(--color-surface-container);
  color: var(--color-text);
  transition: all 0.2s ease;
  cursor: pointer;
}

.toggle-filters-btn:hover {
  border-color: var(--color-accent);
  background-color: var(--color-surface);
}

.toggle-filters-btn i {
  color: var(--color-accent);
}

.filters-container {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--color-surface-elevated);
}

.filters-container.show {
  display: flex;
}

@media (min-width: 769px) {
  .filters-container {
    display: flex;
  }

  .toggle-filters-btn {
    display: none;
  }
}

/* Shared text button style */
.btn-text {
  background: transparent;
  border: none;
  color: var(--color-accent);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-family: inherit;
}

.btn-text:hover {
  background: var(--color-surface-elevated);
  color: var(--color-accent-dark);
}
