:root {
  /* Brand Palette - Minimalist Red, Black, Brown */
  --color-primary-red: #C52222;
  --color-primary-gold: #FFD700;
  /* FAB Red */
  --color-primary-black: #121212;
  /* Deep background */
  --color-primary-brown: #4A3B32;
  /* Earthy/Leather tone */

  --color-bg-dark: #0A0A0A;
  --color-bg-card: #1E1E1E;
  --color-text-main: #EAEAEA;
  --color-text-muted: #A0A0A0;

  /* FAB Game Mechanics Colors (Pitch) */
  --color-pitch-red: #D32F2F;
  --color-pitch-yellow: #FBC02D;
  --color-pitch-blue: #0288D1;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-family-base: 'Inter', system-ui, sans-serif;
}



/* Specific Light Mode Fixes */
[data-theme='light'] h1,
[data-theme='light'] h2,
[data-theme='light'] h3 {
  color: #1a1a1a;
  /* Ensure headers are dark black */
}

[data-theme='light'] .hero-title,
[data-theme='light'] .hero-subtitle {
  text-shadow: none;
  /* Remove shadows if they look muddy on white */
  color: #1a1a1a;
}

[data-theme='light'] .title-highlight {
  color: var(--color-primary-red);
  /* Keep the red accent */
}

/* Light Mode Overrides */


/* Specific component overrides for Light Mode in Navbar to ensure visibility against white */
[data-theme='light'] .navbar-item {
  color: #444;
  /* Darker grey for nav items */
}

[data-theme='light'] .navbar-item:hover,
[data-theme='light'] .navbar-item.active {
  color: var(--color-primary-red);
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  /* Improve mobile scrolling feel */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

#root {
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;

  /* Native App Feel */
  -webkit-tap-highlight-color: transparent;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent text selection in UI elements for app-like feel */
/* Prevent scroll when modal is open */
body.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
  width: 100% !important;
  position: fixed !important;
}

.navbar,
button,
.card-grid,
.sidebar {
  user-select: none;
  -webkit-user-select: none;
}



a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 4px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--color-primary-red);
  color: #ffffff;
  /* Always white text on red button, regardless of theme */
}

.btn-outline {
  border: 1px solid var(--color-primary-brown);
  color: var(--color-text-main);
  background: transparent;
}

/* Banned Cards Grid - Responsive */
.bans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.ban-card-info {
  padding: 1rem;
}

@media (max-width: 600px) {
  .bans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .bans-grid .ban-card h3 {
    font-size: 0.75rem !important;
  }

  .ban-card-info {
    padding: 0.5rem;
  }
}

/* Markdown Content Styling */
.markdown-content {
  line-height: 1.6;
}

.markdown-content p {
  margin-bottom: 1rem;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content strong {
  color: #fff;
  font-weight: 700;
}

.markdown-content em {
  font-style: italic;
  opacity: 0.9;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-gold);
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.markdown-content li {
  margin-bottom: 0.5rem;
}

/* FAB Icons in Markdown */
.fab-icon {
  margin: 0 2px;
  display: inline-block;
  vertical-align: middle;
}

.power-icon {
  color: var(--color-primary-gold);
}

.defense-icon {
  color: #a0a0a0;
}

.resource-icon {
  color: var(--color-primary-red);
}.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: toast-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1), toast-fade-in 0.4s ease-out;
    min-width: 300px;
    max-width: 90vw;
}

.toast-success {
    border-left: 4px solid var(--color-primary-green, #10b981);
}

.toast-error {
    border-left: 4px solid var(--color-primary-red, #ef4444);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    color: var(--color-primary-green, #10b981);
}

.toast-error .toast-icon {
    color: var(--color-primary-red, #ef4444);
}

.toast-message {
    color: var(--color-text-main, #fff);
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted, #9ca3af);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main, #fff);
}

@keyframes toast-slide-up {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes toast-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}.navbar {
    background-color: var(--color-primary-black);
    border-bottom: 1px solid var(--color-primary-brown);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: z-index 0.3s ease;
}

/* Relegate navbar to background when a modal is open */
body.no-scroll .navbar {
    z-index: 0;
    pointer-events: none;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
    /* Professional, distinct from Cinzel */
    font-size: 1.5rem;
    font-weight: 800;
    /* Bold/Heavy */
    color: var(--color-text-main);
    letter-spacing: -0.03em;
    /* Tight tracking for modern look */
    text-transform: uppercase;
}

[data-theme='light'] .logo-text {
    color: #1a1a1a;
    /* Dark text for light mode */
}

/* Light Mode specific logo handling */
[data-theme='light'] .logo-image {
    /* No special filters needed for the new logo if it works on both backgrounds */
    /* If contrast is needed later, we can add it here. */
    filter: none;
    mix-blend-mode: normal;
}

.text-red {
    color: var(--color-primary-red);
}

.navbar-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Language Selector */
.navbar-start {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Removed margin-left: auto to keep it next to logo */
}

@media (max-width: 768px) {
    .language-selector {
        margin-left: 1rem;
    }
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 2px;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.lang-btn:hover {
    filter: grayscale(0%);
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.navbar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.navbar-item:hover,
.navbar-item.active {
    color: var(--color-primary-red);
}

.navbar-register-btn {
    background-color: var(--color-primary-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin-left: 0.5rem;
}

.navbar-register-btn:hover {
    background-color: #b91c1c;
    /* Darker red */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.navbar-login-btn {
    background-color: transparent;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme='light'] .navbar-login-btn {
    color: var(--color-primary-red);
    border-color: var(--color-primary-red);
    font-weight: 700;
}

.navbar-login-btn:hover {
    border-color: var(--color-primary-red);
    color: var(--color-primary-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.navbar-toggle {
    display: none;
    color: var(--color-text-main);
}

.mobile-menu {
    display: none;
    background-color: var(--color-primary-black);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-bottom: 2px solid var(--color-primary-red);
    padding: var(--spacing-md);
    flex-direction: column;
    gap: var(--spacing-md);
}

.mobile-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-main);
    padding: var(--spacing-sm);
    border-radius: 4px;
}

.mobile-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }

    .desktop-only {
        display: none !important;
    }

    .navbar-toggle {
        display: flex;
        align-items: center;
        margin-right: 0.75rem;
    }

    .mobile-menu {
        display: flex;
        transform: translateY(-100%);
        /* Hidden */
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
        z-index: -1;
    }

    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* Dropdown Styles */
.navbar-item-dropdown {
    position: relative;
    /* Ensure dropdown is positioned relative to this item */
}

/* Increased specificity */
.navbar-item-dropdown .dropdown-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.98), rgba(18, 18, 18, 0.95));
    backdrop-filter: blur(15px);
    min-width: 180px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    border-radius: 12px;
    padding: 0.5rem;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Hover bridge to prevent closing */
.navbar-item-dropdown .dropdown-content::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: transparent;
}

.navbar-item-dropdown .dropdown-content.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    white-space: nowrap;
    font-weight: 500;
}

.dropdown-link:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.08));
    color: var(--color-primary-red);
    transform: translateX(2px);
}

/* Light Mode Overrides for Dropdown */
[data-theme='light'] .dropdown-content {
    background-color: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

[data-theme='light'] .dropdown-link:hover {
    background-color: #f3f4f6;
}

/* Mini Search Dropdown Styles */
.search-dropdown {
    min-width: 280px !important;
    /* Override default min-width */
    padding: 1rem !important;
    left: 0 !important;
    transform: translate(0, 10px) !important;
}

.search-dropdown.show {
    transform: translate(0, 0) !important;
}

.mini-search-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mini-search-toggles {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-mode-toggle {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 0.4rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mini-mode-toggle.active {
    background: var(--color-primary-red);
    color: white;
}

[data-theme='light'] .mini-search-toggles {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

[data-theme='light'] .mini-mode-toggle {
    color: #6b7280;
}

[data-theme='light'] .mini-mode-toggle.active {
    background: var(--color-primary-red);
    color: white;
}

.mini-search-form {
    display: flex;
    position: relative;
    align-items: center;
}

.mini-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--color-text-main);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.mini-search-input:focus {
    border-color: var(--color-primary-red);
    background: rgba(255, 255, 255, 0.12);
}

[data-theme='light'] .mini-search-input {
    background: #fff;
    border-color: #e5e7eb;
    color: #111;
}

[data-theme='light'] .mini-search-input:focus {
    border-color: var(--color-primary-red);
}

.mini-search-submit {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-search-submit:hover {
    color: var(--color-primary-red);
}

/* User Profile Chip Styles */
.user-profile-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary-red), #991b1b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.user-avatar.active-ring {
    box-shadow: 0 0 0 2px var(--color-primary-red), 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-main);
    padding-right: 0.25rem;
}

[data-theme='light'] .user-profile-chip {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

[data-theme='light'] .user-profile-chip:hover {
    background: #ffffff;
    border-color: var(--color-primary-red);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .user-name {
    color: #111;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
        align-items: center;
    }
}

/* Search Suboptions Buttons */
.mini-search-suboptions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
    justify-content: center;
}

.sub-filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8rem;
    /* Standardized to match mini-mode-toggles */
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.sub-filter-btn.active {
    background: var(--color-primary-red);
    color: white;
    border-color: var(--color-primary-red);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    font-weight: 700;
}

[data-theme='light'] .sub-filter-btn {
    border-color: #e5e7eb;
    color: #6b7280;
}

[data-theme='light'] .sub-filter-btn:hover {
    background: #e5e7eb;
    color: #111;
}

[data-theme='light'] .sub-filter-btn.active {
    background: var(--color-primary-red);
    color: white;
}/* Ad Banner Styles */

.ad-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Horizontal banners (top/bottom) */
.ad-banner-horizontal {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

/* Vertical/Sidebar banners */
.ad-banner-vertical {
    width: 300px;
    min-height: 250px;
}

/* Inline content banners */
.ad-banner-inline {
    width: 100%;
    max-width: 336px;
    min-height: 280px;
}

/* Placeholder styling */
.ad-placeholder {
    position: relative;
    background: repeating-linear-gradient(45deg,
            rgba(30, 30, 30, 0.95),
            rgba(30, 30, 30, 0.95) 10px,
            rgba(25, 25, 25, 0.95) 10px,
            rgba(25, 25, 25, 0.95) 20px);
}

.ad-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 3px;
    position: absolute;
    top: 4px;
    left: 4px;
}

.ad-placeholder-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ad-banner-horizontal {
        max-width: 100%;
        min-height: 60px;
    }

    .ad-banner-vertical {
        width: 100%;
        max-width: 300px;
        min-height: 100px;
    }

    .ad-banner-inline {
        max-width: 100%;
        min-height: 100px;
    }
}

/* Hide ads on very small screens (optional - uncomment if needed) */
/*
@media (max-width: 480px) {
    .ad-banner {
        display: none;
    }
}
*/.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: var(--spacing-lg) 0;
}

.footer {
    background-color: var(--color-primary-black);
    border-top: 1px solid var(--color-primary-brown);
    padding: var(--spacing-lg) 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}/* CardAutocomplete.css */

.card-autocomplete-container {
    position: relative;
    width: 100%;
}

.card-autocomplete-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    /* Matched with CustomSelect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 0.75rem;
    gap: 0.5rem;
    /* Add gap between icon and input */
    transition: all 0.2s ease;
    height: 40px;
    /* Matched with CustomSelect */
}

.card-autocomplete-input-wrapper:focus-within {
    border-color: var(--color-primary-red, #dc2626);
    box-shadow: 0 0 0 1px var(--color-primary-red, #dc2626);
    background: rgba(0, 0, 0, 0.4);
}

.card-autocomplete-input-wrapper.unstyled {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    height: auto !important;
    box-shadow: none !important;
}

.card-autocomplete-input.unstyled {
    padding: 0 !important;
}


.card-autocomplete-input-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.card-autocomplete-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 0.95rem;
    padding: 0.5rem 0;
    /* Only vertical padding */
    width: 100%;
    outline: none;
}

.card-autocomplete-input::placeholder {
    color: var(--color-text-muted);
}

.autocomplete-search-icon {
    color: var(--color-text-muted);
    min-width: 18px;
}

.clear-search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-left: 0.5rem;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-text);
}

/* Dropdown Styles */
.card-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    /* Dark background */
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    /* Ensure dropdown appears above other content */
    max-height: 300px;
    overflow-y: auto;
    border-top: none;
    /* Make it look connected? Optional */
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.autocomplete-loading {
    padding: 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: rgba(255, 255, 255, 0.1);
}

.autocomplete-card-name {
    font-weight: 500;
    color: var(--color-text);
}

.autocomplete-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.pitch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.pitch-1 {
    background-color: var(--color-pitch-red, #ff4d4d);
    box-shadow: 0 0 4px var(--color-pitch-red, #ff4d4d);
}

.pitch-2 {
    background-color: var(--color-pitch-yellow, #ffd700);
    box-shadow: 0 0 4px var(--color-pitch-yellow, #ffd700);
}

.pitch-3 {
    background-color: var(--color-pitch-blue, #4da6ff);
    box-shadow: 0 0 4px var(--color-pitch-blue, #4da6ff);
}

.card-class-info {
    opacity: 0.7;
    font-style: italic;
}.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 0;
    position: relative;
    overflow: visible;
    /* Allow autocomplete dropdown to show */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    z-index: 10;
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Search Bar Styles */
.hero-search {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
}

.hero-search-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 10;
}

.hero-search-input {
    width: 100%;
    padding: 1.125rem 1.25rem 1.125rem 3.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.hero-search-input:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.25);
}

.hero-search-input:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: rgba(220, 38, 38, 0.6);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15), 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.hero-search-button {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.625rem 1.75rem;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border: none;
    border-radius: 999px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    z-index: 10;
}

.hero-search-button:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

[data-theme='light'] .hero-search-button {
    color: #000000;
    font-weight: 700;
    /* User requested black text. To ensure contrast, we might want a lighter background, 
       or if we keep red, black text is what they asked for. 
       Let's keep the brand red but ensure the text is black as explicitly requested. */
    background-color: var(--color-primary-yellow);
    /* Yellow bg with black text = high visibility/contrast "Pitch Yellow" style? Or just standard Red? */
    /* Let's stick to Red bg with Black text if they insisted, but Yellow is a FAB color too. 
       Actually, let's just follow instructions: Text Black. */
    background-color: var(--color-primary-red);
    /* Warning: Red bg + Black text might be weird, but I'll add a border to define it */
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
}

/* Light Mode Overrides for Hero */
[data-theme='light'] .hero-title {
    background: none !important;
    /* Force removal of gradient */
    -webkit-text-fill-color: #111 !important;
    /* Force solid dark color */
    color: #111;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtle depth */
}

[data-theme='light'] .hero-title .text-red {
    color: var(--color-primary-red);
    -webkit-text-fill-color: var(--color-primary-red) !important;
}

[data-theme='light'] .hero-subtitle {
    color: #4b5563;
    /* Slate-600 equivalent for good readability */
    font-weight: 500;
}

[data-theme='light'] .hero-search-input {
    background-color: #ffffff;
    /* pure white background */
    border: 1px solid #e5e7eb;
    /* Subtle border */
    color: #111;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* Soft shadow for lift */
}

[data-theme='light'] .hero-search-input:focus {
    border-color: var(--color-primary-red);
    box-shadow: 0 0 0 4px rgba(197, 34, 34, 0.1);
    /* Red glow, very soft */
}

[data-theme='light'] .hero-search-icon {
    color: #6b7280;
    /* Neutral grey icon */
}

/* Search Mode Toggles */
.hero-search-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    gap: 1.25rem;
}

.search-mode-toggles {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mode-toggle:hover {
    color: var(--text-primary);
}

.mode-toggle.active {
    background: var(--color-primary-red);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

[data-theme='light'] .search-mode-toggles {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

[data-theme='light'] .mode-toggle {
    color: #6b7280;
}

[data-theme='light'] .mode-toggle:hover {
    color: #111;
}

[data-theme='light'] .mode-toggle.active {
    background: var(--color-primary-red);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.hero-search {
    width: 100%;
    /* Ensure it fills wrapper */
}

/* Hero Search Suboptions Buttons */
.hero-search-suboptions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0;
    /* Removed margin to rely solely on flex gap (1.25rem) for perfect symmetry */
    width: 100%;
    /* Ensure full width for centering */
}

.hero-sub-filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    /* Standardized to match mode toggles */
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    letter-spacing: 0.5px;
}

.hero-sub-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

.hero-sub-filter-btn.active {
    background: var(--color-primary-red);
    color: white;
    border-color: var(--color-primary-red);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
    font-weight: 700;
}

[data-theme='light'] .hero-sub-filter-btn {
    border-color: #d1d5db;
    color: #4b5563;
}

[data-theme='light'] .hero-sub-filter-btn:hover {
    color: #111;
    border-color: #111;
    background: transparent;
}

[data-theme='light'] .hero-sub-filter-btn.active {
    background: var(--color-primary-red);
    color: white;
    border-color: var(--color-primary-red);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}


/* Ensure the search container allows the dropdown to be visible */
.hero-search {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    overflow: visible;
    /* CRITICAL for dropdown */
    z-index: 20;
}

/* Minimal adjustment for the autocomplete container to span full width correctly */
.hero-search .card-autocomplete-container {
    width: 100%;
}.card-item {
    background-color: rgba(30, 30, 30, 0.7);
    /* Translucent dark background */
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    border-radius: 12px;
    /* Softer corners */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Smooth spring-like transition */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
}

[data-theme='light'] .card-item {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.card-item:hover {
    transform: translateY(-8px) scale(1.02);
    /* More pronouced lift */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary-brown);
    z-index: 10;
}

[data-theme='light'] .card-item:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.05);
}

.card-image-container {
    aspect-ratio: 63/88;
    background-color: #2a2a2a;
    position: relative;
    border-top: 4px solid transparent;
    overflow: hidden;
}

/* Shine effect on hover */
.card-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.card-item:hover .card-image-container::after {
    left: 200%;
    transition: 0.7s;
}

/* Pitch Colors Borders */
.card-image-container.pitch-red {
    border-top-color: var(--color-pitch-red);
}

.card-image-container.pitch-yellow {
    border-top-color: var(--color-pitch-yellow);
}

.card-image-container.pitch-blue {
    border-top-color: var(--color-pitch-blue);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-item:hover .card-image {
    transform: scale(1.05);
    /* Subtle zoom on image */
}

.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: var(--color-text-muted);
    background: linear-gradient(to bottom right, #2a2a2a, #1a1a1a);
}

.card-info {
    padding: 0.75rem 1rem;
    /* More balanced padding */
}

.card-name {
    font-size: 1rem;
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}.card-skeleton {
    background-color: var(--color-bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.skeleton-image {
    aspect-ratio: 63/88;
    background-color: #2a2a2a;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-info {
    padding: var(--spacing-sm) var(--spacing-md);
}

.skeleton-line {
    height: 12px;
    background-color: #2a2a2a;
    border-radius: 4px;
    margin-bottom: var(--spacing-xs);
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-line.title {
    width: 80%;
}

.skeleton-line.meta {
    width: 50%;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.6;
    }
}.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.no-cards {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-muted);
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}/**
 * Estilos para las páginas de Wants (Lista de Cartas Buscadas)
 * Incluye estilos para: Wants.jsx, AddToWantsModal.jsx, SharedWantsList.jsx
 */

/* ========================================
   LAYOUT PRINCIPAL - WANTS PAGE
   ======================================== */

.wants-page {
    display: flex;
    min-height: calc(100vh - 60px);
    background: var(--color-bg);
}

/* Sidebar */
.wants-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--color-card-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-primary-gold);
}

.btn-icon-primary {
    background: var(--color-primary-red);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-primary:hover {
    background: var(--color-primary-brown);
    transform: scale(1.05);
}

/* Lista de listas */
.lists-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.list-item.active {
    background: rgba(197, 34, 34, 0.15);
    border: 1px solid var(--color-primary-red);
}

.list-item .list-name {
    flex: 1;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item .list-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.list-item .list-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.list-item:hover .list-actions {
    opacity: 1;
}

.list-item .list-actions button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-muted);
    border-radius: 4px;
    transition: all 0.2s;
}

.list-item .list-actions button:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.1);
}

.list-item .list-actions .delete-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 100, 100, 0.15);
}

.list-item .shared-indicator {
    color: var(--color-primary-gold);
}

/* Edición inline */
.edit-inline {
    display: flex;
    gap: 0.25rem;
    width: 100%;
}

.edit-inline input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--color-text);
    font-size: 0.9rem;
}

.edit-inline button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-muted);
}

/* ========================================
   CONTENIDO PRINCIPAL
   ======================================== */

.wants-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.content-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Card Quick Search */
.card-quick-search {
    position: relative;
    margin-right: 0.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0 0.75rem;
    width: 200px;
    transition: all 0.2s;
}

.search-input-wrapper:focus-within {
    width: 280px;
    border-color: var(--color-primary-gold);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.search-input-wrapper .search-icon {
    color: var(--color-text-muted);
}

.search-input-wrapper input {
    background: none;
    border: none;
    padding: 0.5rem 0.5rem;
    color: var(--color-text);
    font-size: 0.85rem;
    width: 100%;
}

.search-input-wrapper input:focus {
    outline: none;
}

.search-input-wrapper .spinner {
    color: var(--color-primary-gold);
    animation: spin 1s linear infinite;
}

.search-input-wrapper .clear-search {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.search-input-wrapper .clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item img {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
}

.search-result-item .result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-item .result-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.search-result-item .result-details {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.search-result-item .add-icon {
    color: var(--color-primary-gold);
    opacity: 0.5;
    transition: all 0.2s;
}

.search-result-item:hover .add-icon {
    opacity: 1;
    transform: scale(1.1);
}

.no-results-hint {
    padding: 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-brown);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-secondary.danger {
    border-color: rgba(255, 100, 100, 0.3);
    color: #ff6b6b;
}

.btn-secondary.danger:hover {
    background: rgba(255, 100, 100, 0.15);
}

/* Grid de cartas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.wants-card {
    position: relative;
    background: var(--color-card-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.wants-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-red);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wants-card .card-image-container {
    position: relative;
    aspect-ratio: 0.715;
    overflow: hidden;
}

.wants-card .card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wants-card .quantity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-primary-red);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.wants-card .card-info {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wants-card .card-name {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wants-card .card-set {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.wants-card .remove-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.wants-card:hover .remove-btn {
    opacity: 1;
}

.wants-card .remove-btn:hover {
    background: rgba(255, 100, 100, 0.3);
}

/* Estados vacíos */
.empty-state,
.empty-content,
.no-list-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-text-muted);
}

.empty-state svg,
.empty-content svg,
.no-list-selected svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p,
.empty-content p,
.no-list-selected p {
    margin: 0.5rem 0 1rem;
    max-width: 300px;
}

.empty-content h3,
.no-list-selected h2 {
    margin: 0;
    color: var(--color-text);
}

/* Loading */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--color-text-muted);
}

.loading-state.small {
    padding: 1rem;
}

/* ========================================
   ADD TO WANTS MODAL
   ======================================== */

.add-to-wants-overlay {
    z-index: 1100;
}

.add-to-wants-modal {
    max-width: 450px;
    width: 90%;
    padding: 2rem;
    position: relative;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.add-to-wants-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.add-to-wants-modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.add-to-wants-modal .text-red {
    color: var(--color-primary-red);
}

/* Card preview */
.card-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card-preview img {
    width: 60px;
    border-radius: 4px;
}

.card-placeholder-small {
    width: 60px;
    height: 84px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    text-align: center;
    padding: 4px;
}

.card-preview-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.card-preview-info .card-name {
    font-weight: 600;
    font-size: 1rem;
}

.card-preview-info .card-set {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Quantity selector */
.quantity-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.quantity-selector label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.quantity-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-controls span {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Lists section */
.lists-section {
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.btn-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--color-primary-gold);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

/* New list inline */
.new-list-inline {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.new-list-inline input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

.new-list-inline input::placeholder {
    color: var(--color-text-muted);
}

.new-list-inline button {
    background: var(--color-primary-gold);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: black;
    cursor: pointer;
    transition: all 0.2s;
}

.new-list-inline button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* List options */
.list-options {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.list-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.list-option.selected {
    background: rgba(197, 34, 34, 0.15);
    border-color: var(--color-primary-red);
}

.list-option input[type="radio"] {
    accent-color: var(--color-primary-red);
}

.list-option .list-name {
    flex: 1;
}

.list-option .list-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.no-lists-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    text-align: center;
}

.no-lists-hint svg {
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.no-lists-hint p {
    margin: 0;
    font-size: 0.85rem;
}

/* Modal actions */
.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ========================================
   SHARED WANTS LIST PAGE
   ======================================== */

.shared-wants-page {
    min-height: calc(100vh - 60px);
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.shared-wants-page.loading,
.shared-wants-page.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.shared-wants-page .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.shared-wants-page .error-icon {
    color: var(--color-text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.shared-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.shared-header .btn-back {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.shared-header .btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.shared-header .header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.shared-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.shared-header .cards-count {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.shared-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.empty-shared-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}

.empty-shared-list svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ========================================
   MODAL PEQUEÑO PARA NUEVA LISTA
   ======================================== */

.modal-content.small {
    max-width: 420px;
    width: 95%;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content.small h2 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.modal-content.small input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--color-text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s;
}

.modal-content.small input:focus {
    outline: none;
    border-color: var(--color-primary-gold);
    background: rgba(255, 255, 255, 0.1);
}

.modal-content.small input::placeholder {
    color: var(--color-text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .wants-page {
        flex-direction: column;
    }

    .wants-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        max-height: 200px;
        position: relative;
        top: 0;
    }

    .sidebar-header {
        padding: 1rem;
    }

    .lists-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .list-item {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        min-width: 120px;
    }

    .list-item .list-actions {
        display: none;
    }

    .wants-content {
        padding: 1rem;
    }

    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .cards-grid,
    .shared-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .shared-wants-page {
        padding: 1rem;
    }

    .shared-header {
        flex-wrap: wrap;
    }
}/* 
 * Premium Card Modal Styles
 * Focus on whitespace, hierarchy, and high-fidelity visuals.
 */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(3, 3, 5, 0.9);
    /* Slightly more transparent for second-plane feel */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Above everything including navbar AND floating buttons */
    padding: 2rem;
    backdrop-filter: blur(20px);
    animation: overlayFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(145deg, #16161a 0%, #0f0f12 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    max-height: 800px;
    overflow: hidden;
    /* Clips children to rounded corners */
    position: relative;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    animation: contentSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Technical fixes for perfect border clipping (prevents "pico" effect) */
    isolation: isolate;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@keyframes contentSlideIn {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Close Button - Premium Floating Style */
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    backdrop-filter: blur(8px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: rotate(90deg);
}

/* Modal Body Split */
.modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

/* Image Section - Dark & Focused */
.modal-image-section {
    width: 42%;
    background-color: #08080a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;

    /* Sync with parent rounding to prevent pixel bleeding */
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
}

.modal-card-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 18px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-image-section:hover .modal-card-image {
    transform: scale(1.02) translateY(-5px);
}

/* Image Main Wrapper - Holds image + zoom btn */
.image-main-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

/* Zoom Button Overlay */
.zoom-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    z-index: 5;
}

.zoom-btn:hover {
    background: var(--color-primary-gold);
    color: black;
    transform: translateY(-2px);
}

/* Version Selector Dropdown */
.version-selector-container {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 10;
    max-width: 200px;
    width: auto;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 10px;
    border-radius: 8px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.version-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    font-weight: 700;
    margin: 0;
}

.version-dropdown {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 26px;
}

.version-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--color-primary-gold);
}

.version-dropdown option {
    background-color: #1a1a1a;
    color: white;
}

/* Details Section - Right Side */
.modal-details-section {
    flex: 1;
    padding: 4rem 3.5rem;
    background-color: #0f0f12;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Prevents overflow bounce from breaking borders */

    /* Sync with parent rounding for desktop (right side) */
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

/* Custom Scrollbar for Details */
.modal-details-section::-webkit-scrollbar {
    width: 6px;
}

.modal-details-section::-webkit-scrollbar-track {
    background: transparent;
}

.modal-details-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* Header Info */
.modal-header-main {
    margin-bottom: 2.5rem;
}

.modal-card-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.modal-card-type {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Stats Dashboard - The Core Grid */
.modal-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.dashboard-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-align: center;
}

.dashboard-stat:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper.cost {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
}

.stat-icon-wrapper.power {
    background: rgba(255, 183, 3, 0.1);
    color: #ffb703;
}

.stat-icon-wrapper.defense {
    background: rgba(0, 180, 216, 0.1);
    color: #00b4d8;
}

.stat-icon-wrapper.pitch {
    padding: 0;
}

.stat-icon-wrapper.pitch.pitch-1 {
    background: rgba(230, 57, 70, 0.1);
    color: #e63946;
}

.stat-icon-wrapper.pitch.pitch-2 {
    background: rgba(255, 183, 3, 0.1);
    color: #ffb703;
}

.stat-icon-wrapper.pitch.pitch-3 {
    background: rgba(67, 97, 238, 0.1);
    color: #4361ee;
}

.pitch-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
    height: 18px;
    justify-content: center;
    align-items: center;
}

.pitch-dot {
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

/* Card Text Content Area */
.modal-text-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    flex: 1;
    min-height: 150px;
    max-height: 300px;
    /* Constrain height to force scroll if needed */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: center;
}

/* Custom Scrollbar for Text Area */
.modal-text-content::-webkit-scrollbar {
    width: 4px;
}

.modal-text-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-text-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.text-scroll-area {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    width: 100%;
    margin: auto;
    /* Centers content vertically/horizontally if smaller than container */
}

.text-scroll-area p {
    margin: 0.5rem 0;
}

.text-scroll-area strong {
    display: block;
    margin-top: 1rem;
    color: white;
}

/* Meta Data Grid (Set, Rarity) */
.modal-meta-grid {
    display: flex;
    gap: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
}

.meta-value {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 0.95rem;
}

.rarity-badge {
    color: var(--color-primary-gold);
}

/* Signature Weapon Box - Refined */
.signature-weapon-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    letter-spacing: 0.12em;
}

.related-card-display {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: rgba(212, 175, 55, 0.03);
    padding: 1rem;
    border-radius: 14px;
    border: 1px dashed rgba(212, 175, 55, 0.2);
    transition: all 0.2s;
}

.related-card-display:hover {
    background: rgba(212, 175, 55, 0.06);
    transform: translateX(5px);
}

.related-image-wrapper {
    position: relative;
    cursor: zoom-in;
    transition: transform 0.2s;
    flex-shrink: 0;
    width: 60px;
    height: auto;
}

.related-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.related-image-wrapper:hover {
    transform: scale(1.05);
}

.mini-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
}

.related-image-wrapper:hover .mini-zoom-overlay {
    opacity: 1;
}

.related-name {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.related-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.15rem;
}


/* Footer & Actions Area */
.modal-actions-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Cardmarket Button - Premium Blue Gradient */
.cardmarket-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%) !important;
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 10px 20px -5px rgba(0, 102, 204, 0.4);
    transition: all 0.3s;
    border: none;
}

.cardmarket-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(0, 102, 204, 0.6);
    filter: brightness(1.1);
}

.market-disclaimer {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: -0.5rem;
    font-style: italic;
    text-align: center;
}

/* Collection Controls Strip */
.controls-buttons {
    display: flex;
    gap: 0.75rem;
}

.add-btn,
.remove-btn-outline {
    flex: 1;
    height: 54px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn {
    background: #e0e0e0;
    color: #000;
    border: none;
}

.add-btn:hover {
    background: white;
    transform: translateY(-2px);
}

.remove-btn-outline {
    background: transparent;
    border: 1px solid rgba(230, 57, 70, 0.4);
    color: #e63946;
}

.remove-btn-outline:hover {
    background: rgba(230, 57, 70, 0.1);
    border-color: #e63946;
}

.add-wants-btn {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.add-wants-btn:hover {
    background: rgba(247, 37, 133, 0.1);
    color: #f72585;
    border-color: #f72585;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 900px) {

    /* Overlay - centered box with padding */
    .modal-overlay {
        padding: 12px;
        align-items: center;
        justify-content: center;
    }

    /* Modal content - rounded box container */
    .modal-content {
        height: auto;
        max-height: 94vh;
        border-radius: 20px;
        width: 100%;
        max-width: 400px;
        /* Constrain width for phone-like box */
        margin: 0 auto;
        position: relative;
        overflow: hidden;
        /* Clips children to rounded corners */
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

        /* Enforce isolation on mobile too */
        isolation: isolate;
        transform: translateZ(0);
    }

    /* Close button - absolute positioned in top right */
    .modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        z-index: 200;
        backdrop-filter: blur(8px);
    }

    /* Modal body - scrollable column layout */
    .modal-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        min-height: 0;
        /* Critical for flex scrolling */
        -webkit-overflow-scrolling: touch;
    }

    /* ========== IMAGE SECTION ========== */
    .modal-image-section {
        width: 100%;
        padding: 60px 20px 20px 20px;
        min-height: auto;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        box-sizing: border-box;

        /* Sync with parent rounding to prevent picos on mobile */
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    /* Image wrapper - centered with card inside */
    .image-main-wrapper {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }

    /* Card image */
    .modal-card-image {
        max-height: 42vh;
        height: auto;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        object-fit: contain;
        display: block;
    }

    /* Zoom button - inside the image wrapper, bottom right */
    .zoom-btn {
        position: absolute;
        bottom: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        background: rgba(0, 0, 0, 0.85);
        border: 2px solid rgba(255, 255, 255, 0.4);
        color: white;
        border-radius: 50%;
        backdrop-filter: blur(8px);
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Version selector - centered below image */
    .version-selector-container {
        position: static !important;
        transform: none !important;
        left: auto !important;
        bottom: auto !important;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(0, 0, 0, 0.6);
        padding: 10px 14px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-sizing: border-box;
    }

    .version-label {
        font-size: 0.6rem;
        margin-bottom: 4px;
        width: 100%;
        text-align: center;
    }

    .version-dropdown {
        width: 100%;
        font-size: 0.8rem;
        padding: 8px 12px;
        padding-right: 28px;
        box-sizing: border-box;
    }

    /* ========== Details section - all centered */
    .modal-details-section {
        padding: 20px;
        overflow-y: visible;
        overflow-x: hidden;
        flex-shrink: 0;
        /* Changed from 1 to 0 to prevent internal collapsing */
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        overscroll-behavior: contain;

        /* Sync with parent rounding for mobile (bottom) */
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    /* Header - title and type */
    .modal-header-main {
        margin-bottom: 20px;
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    .modal-card-title {
        font-size: 1.5rem;
        line-height: 1.2;
        word-break: break-word;
        text-align: center;
    }

    .modal-card-type {
        font-size: 0.75rem;
        text-align: center;
    }

    /* Stats dashboard */
    .modal-stats-dashboard {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: 16px;
        width: 100%;
        max-width: 320px;
    }

    .dashboard-stat {
        padding: 8px 6px;
        min-width: 60px;
        flex: 0 1 auto;
    }

    /* Text content area - VISIBLE box with internal scroll */
    .modal-text-content {
        padding: 16px;
        margin-bottom: 16px;
        min-height: 120px;
        max-height: 250px;
        /* Internal scroll enabled */
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        width: 100%;
        max-width: 320px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    .text-scroll-area {
        font-size: 0.85rem;
        line-height: 1.6;
        text-align: left;
        /* Left alignment is better for reading rules and keeping punctuation inside */
        white-space: pre-wrap;
        /* Preserves card text line breaks */
        overflow-wrap: break-word;
        /* Ensures long words don't escape */
        word-break: break-word;
        padding: 4px;
        color: rgba(255, 255, 255, 0.9);
    }

    /* Meta grid - set and rarity */
    .modal-meta-grid {
        gap: 24px;
        padding-top: 12px;
        margin-bottom: 16px;
        display: flex;
        justify-content: center;
        width: 100%;
        max-width: 320px;
    }

    /* ========== ACTIONS FOOTER ========== */
    .modal-actions-footer {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .cardmarket-button {
        padding: 14px 16px;
        font-size: 0.85rem;
        width: 100%;
        box-sizing: border-box;
    }

    .market-disclaimer {
        text-align: center;
        width: 100%;
    }

    .collection-controls {
        width: 100%;
    }

    .controls-buttons {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .add-btn {
        flex: 1;
        max-width: 140px;
        height: 44px;
        font-size: 0.75rem;
        padding: 0 10px;
    }

    .remove-btn-outline {
        flex: 1;
        max-width: 100px;
        height: 44px;
        font-size: 0.75rem;
        padding: 0 8px;
    }

    .add-wants-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
    }

    .modal-image-section {
        padding: 3rem 1rem 1rem 1rem;
    }

    .modal-card-image {
        max-height: 40vh;
        max-width: 65%;
    }

    .modal-card-title {
        font-size: 1.5rem;
    }

    .modal-stats-dashboard {
        gap: 0.5rem;
    }

    .dashboard-stat {
        min-width: 60px;
        flex: 1 1 40%;
    }
}

/* Enlarged View (Zoom) Styles */
.enlarged-view-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    cursor: zoom-out;
    backdrop-filter: blur(15px);
    animation: fadeIn 0.25s ease-out;
}

.enlarged-image {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.enlarged-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3100;
    backdrop-filter: blur(10px);
}

.enlarged-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .enlarged-image {
        max-width: 95vw;
        max-height: 80vh;
    }

    .enlarged-close-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
}.recent-cards-section {
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-out;
}

.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recent-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recent-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.text-primary {
    color: var(--primary-color);
}

.clear-history-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.08));
    backdrop-filter: blur(10px);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.clear-history-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(220, 38, 38, 0.15));
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.recent-cards-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    margin-bottom: 1rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.recent-cards-empty h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Recent Tabs */
.recent-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recent-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem;
    border-radius: 8px;
}

.recent-tab {
    background: none;
    border: none;
    color: var(--color-text-muted);
    /* Fallback */
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.recent-tab.active {
    background: var(--color-primary-red);
    background: #dc2626;
    /* Fallback specific */
    color: white;
}

.tab-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
}

/* Mini Deck Grid */
.recent-decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mini-deck-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.mini-deck-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.mini-deck-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-deck-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-deck-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0px;
    overflow: hidden;
}

.mini-deck-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.mini-deck-hero {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.mini-format-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
    align-self: flex-start;
}

.mini-format-badge.cc {
    background: rgba(220, 38, 38, 0.2);
    color: #fecaca;
}

.mini-format-badge.silver {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}.card-list {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-list-header {
    display: grid;
    grid-template-columns: 3rem 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    padding: 1rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px 8px 0 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    align-items: center;
}

.card-list-row {
    display: grid;
    grid-template-columns: 3rem 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font-size: 0.95rem;
}

.card-list-row:hover {
    transform: translateX(4px);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary-red);
}

.list-image-thumb {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 2px;
}

.list-cell-name {
    font-weight: 600;
    color: var(--color-text-main);
}

.list-cell-set {
    color: var(--color-primary-yellow);
    font-family: monospace;
    font-size: 0.9rem;
}

.list-cell-rarity {
    text-transform: capitalize;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Pitch Colors */
.pitch-1 {
    color: var(--color-pitch-red);
}

.pitch-2 {
    color: var(--color-pitch-yellow);
}

.pitch-3 {
    color: var(--color-pitch-blue);
}

[data-theme='light'] .card-list-row {
    background-color: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .card-list-row:hover {
    background-color: #f9fafb;
    border-color: var(--color-primary-red);
}

[data-theme='light'] .card-list-header {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Pitch Dot Styles */
.list-cell-pitch {
    display: flex;
    gap: 4px;
    /* Space between dots */
    align-items: center;
}

.pitch-dot {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
}

.pitch-bg-1 {
    background-color: var(--color-pitch-red);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.pitch-bg-2 {
    background-color: var(--color-pitch-yellow);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.pitch-bg-3 {
    background-color: var(--color-pitch-blue);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .card-list-header {
        display: none;
    }

    .card-list-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
        height: auto;
    }

    .list-image-thumb {
        width: 3rem;
        height: auto;
    }

    .list-cell-name {
        width: 100%;
        order: -1;
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }

    /* Make other cells fit nicely */
    .card-list-row>div {
        font-size: 0.85rem;
    }
}.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 0 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-main, #fff);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--color-primary-red, #dc2626);
    box-shadow: 0 0 0 1px var(--color-primary-red, #dc2626);
}

.custom-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.custom-select-trigger.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-select-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
}

.custom-select-trigger.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.15s ease-out;
}

.custom-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-select-option.selected {
    background: rgba(220, 38, 38, 0.2);
    color: #fff;
    font-weight: 600;
}

/* Scrollbar styles */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}/* Main Container - Matched with Decks.css .decks-filter-bar */
.card-filters {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 50;
}

/* Controls Grid */
/* Controls Grid */
.card-filters__controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: center;
}

/* Common Input/Select Styles */
.card-filters__input,
.card-filters__select {
    width: 100%;
    box-sizing: border-box;
    /* CRITICAL: Prevent padding from overflowing width */
    height: 40px;
    /* Slightly reduced to be closer to Decks but accommodating content */
    padding: 0 1rem;
    background: rgba(0, 0, 0, 0.2);
    /* Darker background for inputs like Decks */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    /* Matching Decks input radius */
    color: var(--color-text-main, #fff);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

/* Search Specifics */
.card-filters__search {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.card-filters__input {
    padding-left: 2.5rem;
}

/* Select Specifics */
.card-filters__select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    padding-right: 2rem;
}

/* Focus States */
.card-filters__input:focus,
.card-filters__select:focus {
    outline: none;
    border-color: var(--color-primary-red, #dc2626);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 1px var(--color-primary-red, #dc2626);
}

/* Hover States */
.card-filters__input:hover,
.card-filters__select:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

/* Clear Button */
.card-filters__clear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.card-filters__clear:hover {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .card-filters__controls {
        grid-template-columns: 1fr 1fr;
        /* 2 columns tablet */
    }

    .card-filters__search {
        grid-column: 1 / -1;
        /* Search takes full width */
    }
}

@media (max-width: 640px) {
    .card-filters__controls {
        grid-template-columns: 1fr;
        /* 1 column mobile */
    }

    .card-filters__active-section {
        flex-direction: column;
        align-items: stretch;
    }

    .card-filters__clear {
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Active Filters Section */
.card-filters__active-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
}

.card-filters__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.card-filters__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background-color: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-primary);
    animation: fadeIn 0.2s ease-out;
}

.card-filters__tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.card-filters__tag-remove:hover {
    background-color: var(--color-pitch-red);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}/* Estilos para el componente de paginación */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
    margin-top: 2rem;
}

.pagination__button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.pagination__button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.pagination__button:active:not(:disabled) {
    transform: translateY(0);
}

.pagination__button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--color-surface);
}

.pagination__info {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .pagination {
        gap: 1rem;
    }

    .pagination__button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .pagination__info {
        font-size: 0.9rem;
        min-width: 100px;
    }
}
/* Collection Header Layout */
.collection-container {
    padding: 2rem 0;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    /* Increased margin specifically requested */
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Separator line like in Decks */
}

.collection-title-section h1 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2.5rem;
    font-family: 'Cinzel', serif;
    /* Matching Decks title font */
    color: var(--color-text-main);
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.collection-title-section h1 svg {
    color: var(--color-primary-red);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.6));
}

.collection-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-left: 4px;
}

.collection-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Button Styles - Matching Decks.css premium style */
.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

/* Primary Action (Browse DB) - Glow Effect */
.action-btn.primary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    font-family: 'Cinzel', serif;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Secondary Action (Scan) */
.action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'Cinzel', serif;
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Light Theme overrides */
[data-theme='light'] .collection-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .collection-title-section h1 {
    color: #111;
    text-shadow: none;
}

[data-theme='light'] .action-btn.secondary {
    background: white;
    color: #111;
    border-color: #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .action-btn.secondary:hover {
    border-color: var(--color-primary-red);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .collection-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .collection-actions {
        display: flex;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }

    .action-btn {
        justify-content: center;
        width: auto;
        min-width: 200px;
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }
}.settings-container {
    display: flex;
    gap: 2rem;
    min-height: 60vh;
}

.settings-sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-right: 1px solid var(--color-border);
    padding-right: 1rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    text-align: left;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}

.settings-nav-item.active {
    background: rgba(220, 38, 38, 0.1);
    /* Primary Red tint */
    color: var(--color-primary-red);
    font-weight: 500;
}

.settings-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--color-primary-gold);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.section-desc {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-subsection {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.settings-subsection h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-text-main);
    font-family: 'Cinzel', serif;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary-gold);
    outline: none;
}

.save-btn,
.send-btn,
.export-btn,
.import-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    width: fit-content;
}

.save-btn,
.send-btn {
    background: var(--color-primary-red);
    color: white;
}

.save-btn:hover,
.send-btn:hover {
    background: #b91c1c;
}

.backup-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.backup-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.backup-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.backup-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    flex: 1;
}

.export-btn {
    background: #333;
    color: white;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.import-btn {
    background: #333;
    color: white;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    /* Fix for label padding width calculation */
}

@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 0.5rem;
        padding-right: 0;
    }

    .settings-nav-item {
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.05);
        /* Make buttons visible on mobile */
    }
}/* FolderSidebar Styles */

.folder-sidebar {
    width: 220px;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border-radius: 12px;
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.folder-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.add-folder-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    padding: 0.4rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.add-folder-btn:hover {
    background: var(--color-primary-red);
    color: white;
}

/* Create Input */
.folder-create-input {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.folder-create-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: white;
    font-size: 0.85rem;
}

.folder-create-input button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    padding: 0.4rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.folder-create-input button:first-of-type:hover {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.folder-create-input button:last-of-type:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Folder Items */
.folder-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-bottom: 0.25rem;
}

.folder-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.folder-item.active {
    background: rgba(197, 34, 34, 0.2);
    border-left: 3px solid var(--color-primary-red);
}

.folder-item.drag-over {
    background: rgba(59, 130, 246, 0.2);
    border: 1px dashed #3b82f6;
}

.folder-item.unassigned {
    opacity: 0.6;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.folder-name {
    flex: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Folder Menu Button */
.folder-menu-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    opacity: 0;
    transition: all 0.2s;
}

.folder-item:hover .folder-menu-btn {
    opacity: 1;
}

.folder-menu-btn:hover {
    color: white;
}

/* Context Menu - Overlays properly */
.folder-context-menu {
    position: fixed;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.98), rgba(18, 18, 18, 0.95));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 140px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    animation: folderMenuFadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.folder-context-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.folder-context-menu button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: white;
    transform: translateX(2px);
}

.folder-context-menu button.danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    color: #ef4444;
}

/* Edit Input */
.folder-edit-input {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.folder-edit-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: white;
    font-size: 0.85rem;
}

.folder-edit-input button {
    background: rgba(34, 197, 94, 0.2);
    border: none;
    border-radius: 4px;
    padding: 0.25rem;
    cursor: pointer;
    color: #22c55e;
}

/* Loading */
.folder-loading {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .folder-sidebar {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 0.75rem;
    }

    .folder-item {
        padding: 0.5rem;
    }
}.decks-page {
    min-height: 90vh;
    padding: var(--spacing-lg);
    background: radial-gradient(circle at top center, rgba(62, 28, 28, 0.2) 0%, transparent 70%);
}


.decks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.decks-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--color-text-main);
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.decks-title svg {
    color: var(--color-primary-red);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.6));
}

.create-deck-btn {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 1rem 2.25rem;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.create-deck-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.create-deck-btn:hover::before {
    left: 100%;
}

.create-deck-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- New Grid & Card Styles --- */

.decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.deck-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.9), rgba(18, 18, 18, 0.85));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.deck-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(220, 38, 38, 0.3),
        0 0 40px rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.6);
}

/* Background Image Layer */
.deck-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Focus on face usually */
    background-repeat: no-repeat;
    transition: transform 0.8s ease;
    z-index: 0;
}

.deck-card:hover .deck-card-bg {
    transform: scale(1.1);
}

/* Gradient Overlay for Text Readability */
.deck-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.8) 30%,
            rgba(0, 0, 0, 0.4) 60%,
            transparent 100%);
    z-index: 1;
}

/* Content Layer */
.deck-card-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    justify-content: flex-end;
}

.deck-name {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.deck-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.format-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: auto;
    /* Push to top */
    margin-top: 1rem;
    /* Add some space from top edge */
}

/* Move badge to top left absolute position for cleaner layout? 
   Actually, flex 'margin-bottom: auto' pushes it up if container is full height. 
   Let's check .deck-card layout. flex-direction column, justify-content flex-end.
   If I want it at top, I should make container full height.
   .deck-card-content is height 100% now.
*/

.format-cc {
    background: rgba(220, 38, 38, 0.85);
    /* Solid Red */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.format-silver {
    background: rgba(37, 99, 235, 0.85);
    /* Solid Blue */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* Create New Card Style */
.deck-card.create-new {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.deck-card.create-new:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary-red);
    color: var(--color-primary-red);
    transform: translateY(-5px);
}

.create-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.deck-card.create-new:hover .create-icon-wrapper {
    background: var(--color-primary-red);
    color: white;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
    border-color: transparent;
}

.create-text {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Empty State & Login - Keeping existing styles but refined if needed */
.decks-empty-state {
    text-align: center;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 6rem 2rem;
    max-width: 800px;
    margin: 4rem auto;
}

/* Delete Deck Button & Wrapper */
.deck-card-wrapper:hover .delete-deck-btn {
    opacity: 1;
    transform: translateY(0);
}

.delete-deck-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-5px);
    backdrop-filter: blur(4px);
}

.delete-deck-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.deck-card {
    display: block;
    /* Ensure link behaves as block */
    width: 100%;
    height: 100%;
}

.deck-card-wrapper {
    aspect-ratio: 1 / 1;
}

/* Login Prompt Styling */
.decks-login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 6rem 2rem;
    max-width: 600px;
    margin: 4rem auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-prompt-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.login-prompt-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 400px;
    line-height: 1.6;
}

.login-prompt-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.prompt-btn-primary {
    background: var(--color-primary-red);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    border: 1px solid var(--color-primary-red);
    min-width: 140px;
    display: flex;
    justify-content: center;
}

.prompt-btn-primary:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.prompt-btn-secondary {
    background: transparent;
    color: var(--color-text-main);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 140px;
    display: flex;
    justify-content: center;
}

.heading-prompt-actions:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.decks-empty-message {
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border: none;
    margin: 2rem 0;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

/* Title Link - Organic Effect */
.decks-title-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Organic easing */
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    position: relative;
    /* For pseudo-elements if needed */
}

.decks-title-link:hover {
    color: #ffffff;
    text-shadow: 0 0 25px rgba(220, 38, 38, 0.6), 0 0 10px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.02);
    cursor: pointer;
    /* Optional: Subtle background highlight */
    background: rgba(255, 255, 255, 0.03);
}

.decks-title-link:active {
    transform: translateY(1px) scale(0.98);
    text-shadow: 0 0 15px rgba(220, 38, 38, 0.8);
    color: rgba(255, 255, 255, 0.9);
}

/* Filter Bar Refinement - AHORA CON ESPACIO DE VERDAD */
.decks-filter-bar {
    display: grid;
    /* Hero, Creator, Format, Sort, Search */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    position: relative;
    z-index: 100;
}

/* Ensure search button centers if it wraps or in mobile */
.decks-filter-bar .filter-group:last-child {
    justify-self: center;
}

@media (max-width: 1200px) {
    .decks-filter-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .decks-filter-bar {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .search-btn {
        width: 100%;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    min-width: 0;
    /* Important for grid overflow handling */
    box-sizing: border-box;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-left: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    outline: none;
    height: 36px;
    /* 36px HEIGHT - Very compact as requested */
    box-sizing: border-box;
    /* CRITICAL: prevents width + padding overflow */
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--color-primary-red);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 1px var(--color-primary-red);
}

/* Autocomplete Dropdown */
.hero-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.hero-autocomplete-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
    font-size: 0.85rem;
}

.hero-autocomplete-item:last-child {
    border-bottom: none;
}

.hero-autocomplete-item:hover {
    background: rgba(220, 38, 38, 0.2);
    color: white;
}

/* Search Button refinement */
.search-btn {
    padding: 0 1.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    height: 36px;
    /* Match inputs */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    width: auto;
    white-space: nowrap;
    box-sizing: border-box;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
    filter: brightness(1.1);
}

.search-btn:active {
    transform: translateY(1px);
}

/* --- Deck List View Styles --- */

.decks-list-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.decks-list-header {
    display: flex;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Columns */
.list-header-cell,
.list-cell {
    display: flex;
    align-items: center;
}

.cell-title {
    flex: 3;
    min-width: 300px;
}

.cell-format {
    flex: 1;
    min-width: 120px;
}

.cell-creator {
    flex: 2;
    min-width: 200px;
}

.cell-date {
    flex: 1;
    min-width: 120px;
}

.cell-actions {
    flex: 0.5;
    min-width: 60px;
    justify-content: flex-end;
}

.decks-list-row-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.decks-list-row {
    flex: 1;
    display: flex;
    padding: 1rem 1.5rem;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--color-text-main);
    text-decoration: none;
    transition: all 0.2s ease;
    align-items: center;
}

.decks-list-row:hover {
    background: rgba(40, 40, 40, 0.8);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateX(4px);
    box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.3);
}

.list-hero-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center top;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-right: 1rem;
    flex-shrink: 0;
}

.decks-list-row:hover .list-hero-avatar {
    border-color: var(--color-primary-red);
}

.list-deck-info {
    display: flex;
    flex-direction: column;
}

.list-deck-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 2px;
}

.list-hero-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Engagement Stats in List View */
.creator-info-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.creator-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.9);
    max-width: 180px;
}

.deck-engagement-stats {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 15px;
    /* Increased from 8px to handle 3-digit numbers safely */
    margin-left: 12px;
    padding: 0;
    border: none;
    background: none;
}

.engagement-stat-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 5px;
    /* Slightly increased for better readability */
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    background: none !important;
    padding: 0 !important;
    border: none !important;
    min-width: unset !important;
    transition: all 0.2s ease;
}

.engagement-stat-item span {
    font-weight: 500;
}

.engagement-stat-item .text-red {
    color: #ef4444;
}

.engagement-stat-item .fill-red {
    fill: #ef4444;
}

.engagement-stat-item .text-blue {
    color: #3b82f6;
}

.engagement-stat-item .opacity-50 {
    opacity: 0.5;
}

.format-badge-small {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.format-cc {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #fca5a5;
}

.format-sa {
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.5);
    color: #93c5fd;
}

.list-action-btn {
    opacity: 1;
    /* Always visible - hover-only was causing usability issues */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.2s ease;
}

.list-action-btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--color-primary-red);
    border-color: rgba(220, 38, 38, 0.2);
}

.list-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: scale(1.1);
}

.list-action-btn-danger:hover {
    background: var(--color-primary-red);
    color: white;
    border-color: var(--color-primary-red);
}

.create-deck-btn-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(220, 38, 38, 0.8);
    color: white;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.create-deck-btn-small:hover {
    background: var(--color-primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Mobile responsive for list view */
@media (max-width: 768px) {
    .decks-list-header {
        display: none;
        /* Hide header on mobile */
    }

    .decks-list-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .list-header-cell,
    .list-cell {
        width: 100%;
        min-width: auto;
    }

    .cell-title {
        margin-bottom: 0.5rem;
    }

    .cell-format,
    .cell-creator,
    .cell-date {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
        flex-direction: row;
        display: flex;
    }

    .cell-format::before {
        content: "Format: ";
        margin-right: 0.5rem;
        color: rgba(255, 255, 255, 0.4);
    }

    .cell-creator::before {
        content: "Creator: ";
        margin-right: 0.5rem;
        color: rgba(255, 255, 255, 0.4);
    }

    .cell-date::before {
        content: "Date: ";
        margin-right: 0.5rem;
        color: rgba(255, 255, 255, 0.4);
    }

    .cell-actions {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 0.75rem;
    }

    /* Fix overlapping buttons on mobile */
    .decks-list-row-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding-bottom: 1rem;
        position: relative;
    }

    .list-action-btn,
    .delete-deck-btn {
        position: static !important;
        /* Override absolute positioning */
        width: 100%;
        height: 44px;
        border-radius: 8px;
        margin: 0.5rem 0 0 0 !important;
        opacity: 1 !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.08);
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .list-action-btn-danger,
    .delete-deck-btn {
        background: rgba(220, 38, 38, 0.15);
        color: var(--color-primary-red);
        border-color: rgba(220, 38, 38, 0.3);
    }

    /* Add text label for clarity on mobile using data-label */
    .list-action-btn::after {
        content: " " attr(data-label);
        font-weight: 600;
        margin-left: 0.5rem;
    }

    /* Fallback for components that might not have data-label yet */
    .delete-deck-btn::after {
        content: " Delete";
        font-weight: 600;
        margin-left: 0.5rem;
    }

    .list-action-btn:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .list-action-btn-danger:hover,
    .delete-deck-btn:hover {
        background: var(--color-primary-red);
        color: white;
    }
}

/* Sidebar Layout for My Decks */
.decks-with-sidebar {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.decks-main-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .decks-with-sidebar {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
    }

    .decks-main-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .decks-list-container {
        width: 100%;
        max-width: 100%;
        align-items: center;
    }

    .decks-list-row-wrapper {
        width: 100%;
        max-width: 500px;
        /* Optional: limit width on larger phones for better readability */
        margin: 0 auto;
    }
}

/* --- Move Folder Modal --- */
.move-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.move-modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.move-modal-header {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.move-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.move-modal-title svg {
    color: var(--color-primary-red);
}

.move-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.move-modal-body {
    padding: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}

.move-modal-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.9);
}

.move-modal-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.move-folder-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.move-folder-icon.default {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.move-modal-item:hover .move-folder-icon.default {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.move-folder-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.move-folder-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.move-modal-empty {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}.register-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: radial-gradient(circle at 30% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(62, 28, 28, 0.2) 0%, transparent 70%);
}

.register-container {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.9), rgba(18, 18, 18, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.register-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.register-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text-main);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.register-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Styles */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 5;
}

.input-wrapper input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--color-primary-red);
    transform: translateY(-50%) scale(1.1) !important;
}

.input-wrapper input {
    width: 100% !important;
    padding: 1rem 1.25rem 1rem 3.5rem !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--color-text-main);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
    opacity: 1 !important;
}

.input-wrapper input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)) !important;
}

.input-wrapper input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.6) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.auth-button {
    margin-top: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.auth-button:active:not(:disabled) {
    transform: translateY(-1px);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    border-radius: 10px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-alert.error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.auth-alert.success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(22, 163, 74, 0.1));
    border: 1px solid rgba(22, 163, 74, 0.4);
    color: #86efac;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--color-primary-red);
    text-decoration: none;
    text-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

/* Responsive */
@media (max-width: 640px) {
    .register-container {
        padding: 2rem 1.5rem;
    }

    .register-header h2 {
        font-size: 1.875rem;
    }

    .register-subtitle {
        font-size: 1.25rem;
    }
}.format-selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
    text-align: center;
}

.format-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.format-subtitle {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.format-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.format-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary-red);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.format-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-primary-red);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.format-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.format-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.format-features {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.format-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
    font-size: 0.9rem;
}

.format-features li::before {
    content: "✓";
    color: var(--color-primary-green, #10b981);
    font-weight: bold;
}

/* Light Mode */
[data-theme='light'] .format-title {
    background: none;
    -webkit-text-fill-color: #111;
    color: #111;
}

[data-theme='light'] .format-card {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .format-card:hover {
    background: #fff;
    border-color: var(--color-primary-red);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .format-features {
    border-top-color: #eee;
}

[data-theme='light'] .format-icon-wrapper {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.import-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: bold;
    position: relative;
    width: 100%;
    max-width: 600px;
}

.import-divider::before,
.import-divider::after {
    content: '';
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    flex: 1;
    margin: 0 1rem;
}

[data-theme='light'] .import-divider::before,
[data-theme='light'] .import-divider::after {
    background: #e5e7eb;
}

.import-deck-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.import-deck-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text-muted);
    transform: translateY(-2px);
}

[data-theme='light'] .import-deck-btn {
    background: #fff;
    border-color: #ddd;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .import-deck-btn:hover {
    border-color: var(--color-primary-red);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.import-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

@media (max-width: 768px) {
    .format-selection-container {
        padding: 4rem 1rem;
        justify-content: flex-start;
    }

    .format-title {
        font-size: 2rem;
        margin-top: 2rem;
    }

    .format-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .formats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .format-card {
        padding: 1.5rem;
        min-height: auto;
    }

    .import-divider {
        margin: 2rem 0;
        width: 100%;
    }
}.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: visible;
    /* Allow tabs to be visible */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--color-text-main);
}

.modal-search-bar {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-main);
    font-size: 1rem;
}

.modal-search-bar input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.modal-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-result-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.modal-card-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.modal-card-details {
    flex: 1;
}

.modal-card-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.modal-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.card-type {
    color: var(--color-text-muted);
}

.loading-text,
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

/* Grid View Styles */
.modal-results.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1rem;
    align-content: start;
}

.modal-result-card.grid-card {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
    height: 100%;
}

.modal-result-card.grid-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
}

/* Banned Card Styles */
.banned-item {
    opacity: 0.7;
    filter: grayscale(0.8);
    position: relative;
    cursor: not-allowed !important;
}

.banned-item:hover {
    transform: none !important;
    background: rgba(255, 0, 0, 0.1) !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
}

.banned-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    border: 2px solid white;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.banned-text-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-card-img-large {
    width: 100%;
    height: auto;
    aspect-ratio: 2.5/3.5;
    object-fit: contain;
    /* Ensure full card is visible */
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    /* Fallback background */
}

.modal-card-name-sm {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--color-text-main);
}

.modal-card-cost {
    font-size: 0.8rem;
    color: var(--color-primary-yellow);
    font-weight: bold;
}

.modal-card-class {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 0.25rem;
}

.modal-card-class.hero-class {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text-main);
}

.modal-card-class.generic-class {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
}

.modal-card-class.other-class {
    background: rgba(100, 100, 100, 0.3);
    color: var(--color-text-muted);
}

/* Class-specific colors for equipment cards removed as requested */


/* Pagination Styles */
.modal-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Light mode overrides */
[data-theme='light'] .modal-pagination {
    border-top-color: #e5e7eb;
    background: #f9fafb;
}

[data-theme='light'] .pagination-btn {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}

[data-theme='light'] .pagination-btn:hover:not(:disabled) {
    background: var(--color-primary-red);
    color: white;
    border-color: var(--color-primary-red);
}

[data-theme='light'] .modal-content {
    background: #fff;
    border-color: #e5e7eb;
}

[data-theme='light'] .modal-search-bar input {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111;
}

[data-theme='light'] .modal-result-card {
    background: #f9fafb;
    border-color: #e5e7eb;
}

[data-theme='light'] .modal-result-card:hover {
    background: #f3f4f6;
}

/* Equipment Tabs */
.equipment-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
    overflow-y: visible;
    /* Ensure vertical visibility */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    flex-shrink: 0;
    /* Prevent tabs from shrinking */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.equipment-tabs::-webkit-scrollbar {
    height: 4px;
}

.equipment-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.equipment-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.equip-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    /* Prevent button shrinking */
}

.equip-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
}

.equip-tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary-yellow);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Hero Grid Specifics */
.modal-results.hero-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    /* Larger cards for heroes */
}

.modal-results.hero-grid .modal-card-img-large {
    aspect-ratio: 2.5/3.5;
    /* Ensure consistent hero aspect ratio */
}
/* Equipment Origin Filters */
.equipment-origin-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.filter-pill-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.filter-pill-btn.active {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--color-primary-red);
    color: var(--color-primary-red);
    font-weight: 600;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.2);
}
.stacked-deck-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 0;
    align-items: flex-start;
    width: 100%;
}

.stacked-card-group {
    position: relative;
    /* Fixed width for consistent columns */
    width: 130px;
    flex: 0 0 auto;
    /* Height needs to simulate the full stack height + card height */
    /* Base card ratio about 1.4:1 */
    /* We don't set fixed height, let content dictate, but we need space for stacks */
    min-height: 220px;
    aspect-ratio: 2.5/3.5;
    transition: transform 0.2s ease, z-index 0s;
}

.stacked-card-group.menu-open {
    z-index: 9999 !important;
}

.stacked-card-group:hover {
    transform: translateY(-5px);
}

.stack-container {
    position: relative;
    width: 100%;
    /* Aspect ratio for FAB card (63x88mm ~ 2.5x3.5in) */
    aspect-ratio: 63/88;
}

.card-layer {
    position: absolute;
    left: 0;
    right: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 4.5% / 3.5%;
    /* Card corner radius approximation */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    /* Make darker to simulate depth? */
    filter: brightness(0.9);
}

.card-main-visual {
    position: absolute;
    left: 0;
    right: 0;
    /* The image itself */
}

.card-main-visual img {
    width: 100%;
    height: auto;
    border-radius: 4.5% / 3.5%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: block;
}.comments-section {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--color-text-main);
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.comments-login-prompt {
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    padding: 1rem;
    text-align: center;
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.comments-login-prompt:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-text-main);
}

.comment-form {
    margin: 0 auto 3rem auto;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.replying-to-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(220, 38, 38, 0.1);
    color: var(--color-primary-red);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.comment-input-wrapper {
    position: relative;
}

.comment-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: var(--color-text-main);
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.comment-input:focus {
    outline: none;
    border-color: var(--color-primary-red);
    background: rgba(0, 0, 0, 0.4);
}

.comment-submit-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary-red);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #555;
}

.comment-submit-btn:hover:not(:disabled) {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Comment Items */
.comment-item {
    margin-bottom: 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
    position: relative;
    transition: all 0.2s ease;
}

.comment-item:hover {
    border-left-color: rgba(255, 255, 255, 0.2);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
    color: var(--color-text-main);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.comment-content {
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    transition: color 0.2s;
}

.comment-reply-btn:hover {
    color: var(--color-primary-red);
}

.comment-replies {
    margin-top: 1rem;
}

/* Light Mode Overrides */
[data-theme='light'] .comments-section {
    background: #ffffff;
    border-color: #e5e7eb;
}

[data-theme='light'] .comments-title {
    color: #111;
    border-bottom-color: #e5e7eb;
}

[data-theme='light'] .comment-form {
    background: #f9fafb;
    border-color: #e5e7eb;
}

[data-theme='light'] .comment-input {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111;
}

[data-theme='light'] .comment-input:focus {
    border-color: var(--color-primary-red);
}

[data-theme='light'] .comment-item {
    border-left-color: #e5e7eb;
}

[data-theme='light'] .comment-author {
    color: #111;
}

[data-theme='light'] .comment-content {
    color: #4b5563;
}

/* Owner Actions (Edit/Delete) */
.comment-owner-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.comment-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    color: var(--color-text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.comment-action-btn.delete-btn:hover {
    color: #ef4444;
    /* Red for delete */
    background: rgba(239, 68, 68, 0.1);
}

.comment-action-btn.edit-btn:hover {
    color: #3b82f6;
    /* Blue for edit */
    background: rgba(59, 130, 246, 0.1);
}

/* Edit Form inside Comment */
.comment-edit-form {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.comment-edit-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.5rem;
    color: var(--color-text-main);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
    font-size: 0.95rem;
}

.comment-edit-input:focus {
    outline: none;
    border-color: var(--color-primary-red);
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.comment-save-btn,
.comment-cancel-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    font-weight: 500;
    transition: all 0.2s;
}

.comment-save-btn {
    background: #10b981;
    color: white;
}

.comment-save-btn:hover {
    background: #059669;
}

.comment-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.comment-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Light Mode adaptations for new elements */
[data-theme='light'] .comment-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .comment-edit-form {
    background: #f3f4f6;
}

[data-theme='light'] .comment-edit-input {
    background: white;
    border-color: #d1d5db;
    color: #111;
}

[data-theme='light'] .comment-cancel-btn {
    background: #e5e7eb;
    color: #374151;
}

[data-theme='light'] .comment-cancel-btn:hover {
    background: #d1d5db;
}

@media (max-width: 768px) {
    .comments-section {
        padding: 1rem;
        margin-top: 2rem;
        width: 100%;
        box-sizing: border-box;
    }

    .comment-form {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .comment-submit-btn {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        margin-top: 0.75rem;
        justify-content: center;
    }

    .comment-item {
        padding-left: 0.75rem;
    }
}/* DeckPlaytester Styles */

.playtester-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.playtester-container {
    width: 100%;
    max-width: 1200px;
    max-height: 95vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.playtester-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-back-btn {
    display: none;
    /* Hidden on desktop */
}

.playtester-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
}

.playtester-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.stat-item.action-points {
    color: #3b82f6;
    font-weight: 600;
}

.stat-item.resources {
    color: #eab308;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Controls */
.playtester-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.control-btn.primary {
    background: linear-gradient(135deg, #C52222 0%, #a01c1c 100%);
    border-color: #C52222;
}

.control-btn.primary:hover {
    background: linear-gradient(135deg, #d42626 0%, #b02020 100%);
}

.control-btn.accent {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
}

.control-btn.danger {
    border-color: #ef4444;
    color: #ef4444;
}

.control-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Game Mat */
.playtester-mat {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Zones */
.zone {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
}

.zone h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hand-zone {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.05);
}

.arsenal-zone {
    border-color: rgba(234, 179, 8, 0.4);
    background: rgba(234, 179, 8, 0.05);
}

.pitch-zone {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}

.graveyard-zone {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

.banish-zone {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.05);
}

.equipment-zone {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}

.weapon-zone {
    border-color: rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.05);
}

/* Feedback Message Toast */
.playtester-feedback {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playtest-card.used {
    opacity: 0.5;
    filter: grayscale(50%);
}

.card-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.card-actions button:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.15);
}

/* Cards Row */
.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cards-row.small {
    gap: 0.5rem;
}

.cards-row.stacked {
    flex-wrap: nowrap;
}

.cards-row.stacked .playtest-card.stacked:not(:first-child) {
    margin-left: -40px;
}

/* Playtest Card */
.playtest-card {
    position: relative;
    width: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    cursor: pointer;
}

.playtest-card:hover {
    transform: translateY(-5px) scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.playtest-card.small {
    width: 70px;
}

.playtest-card img {
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
    display: block;
}

/* Card Actions */
.card-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    opacity: 0;
    transition: opacity 0.2s;
}

.playtest-card:hover .card-actions {
    opacity: 1;
}

.card-actions button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.card-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Zones Row */
.zones-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Empty Zone */
.empty-zone {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* More indicator */
.more-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Instructions */
.playtester-instructions {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.playtester-instructions p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .playtester-container {
        max-height: 100vh;
        border-radius: 0;
    }

    /* Mobile Header Layout */
    .playtester-header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .playtester-stats {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }

    .stat-item {
        font-size: 0.8rem;
    }

    .mobile-back-btn {
        display: flex;
        background: none;
        border: none;
        color: #fff;
        margin-right: 0.5rem;
        padding: 0.25rem;
        cursor: pointer;
    }

    .close-btn {
        display: none;
    }

    .playtester-controls {
        gap: 0.5rem;
    }

    .control-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .control-btn span {
        display: none;
    }

    .zones-row {
        grid-template-columns: 1fr;
    }

    .playtest-card {
        width: 80px;
    }

    .playtest-card.small {
        width: 60px;
    }
}.deck-builder-minimal {
    min-height: 90vh;
    padding: 2rem 0;
    background: var(--color-bg-dark);
}

.deck-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.deck-name-input {
    flex: 1;
    width: 100%;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--color-text-main);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.deck-name-input:hover,
.main-search-input:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.deck-name-input:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 204, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.back-format-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-format-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--color-text-main);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 204, 0, 0.1);
}

.back-format-btn svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-format-btn:hover svg {
    transform: translateX(-5px);
}

.save-deck-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.save-deck-btn:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.save-deck-btn svg {
    transition: transform 0.2s;
}

.save-deck-btn:hover svg {
    transform: scale(1.1);
}

.deck-name-input:focus {
    outline: none;
    border-color: var(--color-primary-red);
}

.main-search-bar {
    position: relative;
    margin-bottom: 1rem;
    max-width: 600px;
}

.main-search-input {
    width: 100%;
    /* Fix for overflow: include padding in width calculation */
    box-sizing: border-box;
    padding: 1rem 1.25rem 1rem 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--color-text-main);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-search-input:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 204, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Common Focus logic moved to shared block above */

.deck-privacy-select {
    padding: 1rem 2.5rem 1rem 1.25rem;
    /* Extra right padding for chevron if we custom style, or just safe space */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--color-text-main);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    /* Basic reset to allow styling */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    min-width: 140px;
}

.deck-privacy-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    /* Fallback/mix with gradient */
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.deck-privacy-select:focus {
    outline: none;
    border-color: rgba(255, 204, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.15);
}

.search-icon-inline {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.result-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.result-name {
    flex: 1;
    font-weight: 500;
}

.add-icon {
    color: var(--color-primary-red);
}

.deck-section {
    margin: 1.5rem 0;
}

.section-header {
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.add-slot-button {
    width: 100%;
    max-width: 400px;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.add-slot-button:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary-red);
    color: var(--color-text-main);
}

.add-slot-button-small {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.add-slot-button-small:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary-red);
    color: var(--color-text-main);
}

.selected-card-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.selected-card-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.selected-card-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.selected-card-info {
    flex: 1;
}

.selected-card-name {
    font-weight: 600;
    font-size: 1rem;
}

.selected-card-class {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.remove-btn-icon {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: #ff4444;
    transition: all 0.2s;
}

.remove-btn-icon:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
}

.empty-deck-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.deck-cards-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    /* Reduced padding to keep content tighter */
    padding-bottom: 2rem;
    min-height: 100px;
}

.deck-cards-list.visual-mode {
    gap: 0.75rem;
}

.deck-card-visual {
    position: relative;
    width: 100px;
    /* Adjust size as needed for "miniature" */
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 8px;
    /* overflow: hidden; REMOVED to allow popover to show */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.deck-card-visual:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.deck-card-visual img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Badge for count > 1 in visual mode */
.visual-count-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--color-primary-red);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-card);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Stats in Text Mode */
.card-stats-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-right: 0.5rem;
}

.stat-icon {
    display: flex;
    align-items: center;
    gap: 2px;
}

.deck-card-row {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: all 0.2s;
    width: auto;
    position: relative;
    cursor: pointer;
    border: 1px solid transparent;
}

.deck-card-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.card-options-popover {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    min-width: 160px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.popover-option {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

/* Search Results Large (Visual Mode Search) */
.search-results-dropdown-large {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Base Search Result Item Styles */
.search-result-item-large {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    gap: 1rem;
    position: relative;
    /* Prevent text selection globally in this list */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.search-result-item-large:last-child {
    border-bottom: none;
}

.search-result-item-large:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item-large.limit-reached {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    /* Disable interference */
    filter: grayscale(1);
    /* user-select handled by parent class now */
}

.search-result-item-large.flash-success {
    animation: flashGreen 0.5s ease-out;
}

@keyframes flashGreen {
    0% {
        background: rgba(34, 197, 94, 0.5);
        transform: scale(1.02);
    }

    100% {
        background: rgba(255, 255, 255, 0.05);
        transform: scale(1);
    }
}

.result-img-wrapper {
    width: 45px;
    /* Constrain image to a small, pleasant size */
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.result-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-item-large .result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.search-result-item-large .result-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-main);
}

.search-result-item-large .result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.search-result-item-large .add-btn-inline {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-result-item-large:hover .add-btn-inline {
    background: var(--color-primary-red);
    border-color: var(--color-primary-red);
    color: white;
}

.popover-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-main);
}

.popover-option.danger {
    color: #ef4444;
}

.popover-option.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.deck-card-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.card-count-badge {
    width: 30px;
    height: 30px;
    background: rgba(197, 34, 34, 0.2);
    border: 1px solid var(--color-primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.deck-card-name {
    flex: 1;
    font-weight: 500;
}

.remove-btn-text {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.remove-btn-text:hover {
    color: #ff4444;
}

/* Hero Section Spacing */
.hero-section {
    margin-top: 3rem;
    /* Added spacing from search bar */
    margin-bottom: 2rem;
}

.import-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: bold;
    position: relative;
    width: 100%;
    max-width: 600px;
}

.import-divider::before,
.import-divider::after {
    content: '';
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    flex: 1;
    margin: 0 1rem;
}

.import-deck-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.import-deck-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text-muted);
}

.hero-card-display {
    display: flex;
    justify-content: center;
    /* Center the hero card */
}

/* Ensure prompt also has spacing */
.select-hero-prompt {
    margin-top: 3rem;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Light Mode */
[data-theme='light'] .deck-name-input,
[data-theme='light'] .main-search-input {
    background: #fff;
    border-color: #ddd;
    color: #111;
}

[data-theme='light'] .search-results-dropdown {
    background: #fff;
    border-color: #ddd;
}

[data-theme='light'] .search-result-item:hover,
[data-theme='light'] .deck-card-row:hover {
    background: #f3f4f6;
}

[data-theme='light'] .selected-card-item {
    background: #f9fafb;
    border-color: #e5e7eb;
}

[data-theme='light'] .add-slot-button,
[data-theme='light'] .add-slot-button-small {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #6b7280;
}

[data-theme='light'] .add-slot-button:hover,
[data-theme='light'] .add-slot-button-small:hover {
    background: #f3f4f6;
    color: #111;
}

[data-theme='light'] .back-format-btn {
    background: #fff;
    border-color: #ddd;
    color: #6b7280;
}

[data-theme='light'] .back-format-btn:hover {
    background: #f9fafb;
    border-color: #ccc;
    color: #111;
}

[data-theme='light'] .save-deck-btn {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

[data-theme='light'] .save-deck-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* View Mode Toggles */
.search-input-wrapper {
    position: relative;
    flex: 1;
    /* Allow it to take space... */
    max-width: 600px;
    /* ...but not more than original size */
    display: flex;
    align-items: center;
}

.main-search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    height: 42px;
    margin-bottom: 1.5rem;
    width: 100%;
    /* Full width */
    justify-content: space-between;
    /* Separate Input (Left) and Toggle (Right) */
    position: relative;
    z-index: 200;
}

/* Consolidated into main-search-input block above to avoid duplicates */

.view-mode-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3px;
    height: 100%;
    align-items: center;
}

.view-toggle-btn {
    background: none;
    border: none;
    padding: 0 1rem;
    /* Compact padding */
    height: 100%;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
}

.view-toggle-btn:hover {
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
    background: var(--color-primary-red);
    color: white;
}

/* Text View Styling */
.text-item {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.text-item .result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.result-meta-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.cost-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: #ffd700;
    font-weight: bold;
}

.type-text {
    font-style: italic;
    opacity: 0.8;
}

.pitch-pip {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.pitch-1 {
    background-color: #ff4444;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.pitch-2 {
    background-color: #ffeb3b;
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.5);
}

.pitch-3 {
    background-color: #2196f3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

/* Banned Cards Styles */
.banned-item {
    background-color: rgba(255, 0, 0, 0.05);
    /* Light red background */
}

.banned-badge {
    background-color: #ef4444;
    /* Red */
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.banned-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.25rem 1rem;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* Small badges for Deck List */
.cost-badge-small {
    background: rgba(255, 255, 255, 0.1);
    padding: 0 0.3rem;
    border-radius: 3px;
    color: #ffd700;
    font-weight: bold;
    font-size: 0.75rem;
    min-width: 1rem;
    text-align: center;
    line-height: 1.4;
}

.pitch-pip-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Animation for section reveal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.deck-card-visual.menu-open,
.deck-card-row.menu-open {
    z-index: 9999 !important;
}

/* Hero Section Specifics */
.hero-card-display {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.hero-overlay-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 8px;
    /* Match card radius */
}

/* Show actions when explicit class is added (Click interaction) */
.hero-overlay-actions.visible {
    opacity: 1;
    pointer-events: auto;
    /* Enable clicks when visible */
}

/* Show actions on hover */
.hero-card-display:hover .hero-overlay-actions {
    opacity: 1;
}

.change-hero-btn {
    padding: 0.5rem 1rem;
    background: var(--color-primary-red);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transform: translateY(10px);
    transition: all 0.2s;
}

.hero-card-display:hover .change-hero-btn {
    transform: translateY(0);
}

.hero-slot-container {
    display: flex;
    justify-content: flex-start;
    /* Left align */
}

.empty-hero-slot {
    width: 200px;
    height: 280px;
    /* Card ratio approx */
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.empty-hero-slot:hover {
    border-color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.03);
}

/* Ensure Text Mode Hero is full width or nice width */
/* HERO DISPLAY STYLES */
.hero-card-display {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.hero-card-display .deck-card-visual.visual-mode {
    width: 100px;
}

/* Match standard card size */
.hero-card-display .deck-card-visual {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Ensure Text Mode Hero is distinct */
.hero-card-display .deck-card-row {
    width: 100%;
    min-width: 300px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.hero-card-display .deck-card-name {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 600;
}

.hero-overlay-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 8px;
    z-index: 10;
    pointer-events: none;
    /* Prevent clicks when hidden */
}

.hero-card-display:hover .hero-overlay-actions,
.hero-overlay-actions.visible {
    opacity: 1;
    pointer-events: auto;
}

.change-hero-btn {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(10px);
    transition: all 0.2s;
    font-size: 1rem;
}

.hero-card-display:hover .change-hero-btn {
    transform: translateY(0);
}

.hero-card-display:hover .change-hero-btn:hover {
    background: #ef4444;
    transform: scale(1.05);
}

/* Text Mode Hero Actions - Hidden by default */
.hero-text-mode-actions {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    margin-left: 1rem;
    pointer-events: none;
    /* Prevent clicks when hidden */
}

/* Show on click state */
.hero-text-mode-actions.visible {
    opacity: 1;
    pointer-events: auto;
    /* Enable clicks when visible */
}

.text-mode-change-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-text-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}


/* Empty Hero State Styling */
.select-hero-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
}

.prompt-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 500px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.prompt-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
}

.prompt-content p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

.primary-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-primary-red);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}


/* Clear Search Button */
.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Adjust input padding to prevent text overlap with clean button */
.main-search-input {
    padding-right: 2.5rem !important;
    /* Ensure space for X button */
}


/* Card Preview Overlay */
.card-preview-overlay {
    position: fixed;
    top: 50%;
    /* Positions will be set by .left or .right classes */
    transform: translateY(-50%);
    width: 350px;
    /* High-res size */
    height: auto;
    z-index: 1000;
    pointer-events: none;
    /* Pass through clicks */
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s;
    background: transparent;
}

.card-preview-overlay.left {
    left: 5%;
    right: auto;
}

.card-preview-overlay.right {
    right: 5%;
    left: auto;
}

.card-preview-overlay.visible {
    opacity: 1;
    animation: floatIn 0.3s ease-out;
}

.card-preview-overlay img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    /* Slightly less than container to fit border if any */
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    /* Depth */
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(-40%);
    }

    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

/* Ensure it doesn't overlap on small screens - maybe hide or center? */
@media (max-width: 1200px) {
    .card-preview-overlay {
        right: 2rem;
        width: 280px;
    }
}

@media (max-width: 768px) {
    .card-preview-overlay {
        display: none;
        /* Hide on mobile/tablet usually best as it blocks touch */
    }
}

/* Columnar Layout for Text Mode */
.deck-cards-list.text-mode-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-content: start;
    padding-bottom: 2rem;
    min-height: auto;
}

/* Specific Row Limits - REMOVED for horizontal flow */

/* Ensure items take controlled width in horizontal flow */
.deck-cards-list.text-mode-columns .deck-card-row {
    width: auto;
    min-width: 220px;
    /* Consistent column width */
    max-width: 300px;
    /* Flex-grow to fill row? Or fixed? Fixed width feels more like a list */
    flex: 1 1 220px;
    /* Grow, shrink, base */
    padding: 0.25rem 0.5rem;
    gap: 0.5rem;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.deck-cards-list.text-mode-columns .deck-card-row.menu-open {
    z-index: 9999 !important;
    /* Force menu on top */
    background: rgba(255, 255, 255, 0.1);
}

/* Compact Text Sizes for Columnar View */
.deck-cards-list.text-mode-columns .deck-card-name {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-cards-list.text-mode-columns .card-stats-text {
    font-size: 0.7rem;
    gap: 0.25rem;
}

.deck-cards-list.text-mode-columns .cost-badge-small {
    font-size: 0.7rem;
    padding: 0 0.2rem;
    min-width: 0.9rem;
}

.deck-cards-list.text-mode-columns .pitch-pip {
    width: 8px;
    height: 8px;
}

/* View Selector - Segmented Control */
.view-selector-container {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.25rem;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.view-selector-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.view-selector-btn:hover {
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.05);
}

.view-selector-btn.active {
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.2), rgba(255, 204, 0, 0.1));
    color: #ffcc00;
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.view-selector-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 7px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.search-container-large {
    position: relative;
    flex: 1;
    max-width: 580px;
}

@media (max-width: 768px) {
    .deck-builder-minimal {
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
    }

    /* Ensure ALL immediate children respect container width */
    .deck-builder-minimal>*,
    .deck-builder-minimal .container {
        max-width: 100%;
        box-sizing: border-box;
    }

    .deck-top-bar {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
    }

    /* Force Vertical Stack for Text Mode on Mobile */
    .deck-cards-list.text-mode-columns {
        display: flex;
        flex-direction: column;
        grid-template-rows: none;
        grid-auto-flow: row;
        width: 100%;
        overflow-x: hidden;
        min-height: auto;
        padding-bottom: 2rem;
    }

    .text-columns-6,
    .text-columns-10 {
        grid-template-rows: none;
    }

    .deck-cards-list.text-mode-columns .deck-card-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: none;
        /* Avoid growing vertically if flex-direction is column */
        background: transparent;
        /* Cleaner look for mobile list */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
    }

    /* Back and Save buttons: icon-only squares */
    .back-format-btn,
    .save-deck-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
    }

    .deck-name-container {
        /* Assuming a container for name + privacy */
        flex-direction: column;
        align-items: stretch;
    }

    /* Override inline styles for inputs when in mobile */
    .deck-name-input {
        min-width: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        margin: 0;
    }

    .deck-privacy-select {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0;
    }

    .privacy-selector {
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }

    .main-search-bar {
        flex-direction: column;
        height: auto;
        width: 100%;
    }

    .search-container-large {
        max-width: 100%;
        width: 100%;
    }

    .view-selector-container {
        width: 100%;
        margin-left: 0 !important;
        justify-content: space-between;
    }

    .view-selector-btn {
        flex: 1;
        justify-content: center;
    }

    /* Ensure hero card display doesn't overflow */
    .hero-card-display {
        overflow-x: hidden;
        width: 100%;
    }

    /* Hero section mobile fixes */
    .select-hero-prompt {
        margin: 1rem 0;
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .select-hero-prompt h2 {
        font-size: 1.25rem;
    }

    .select-hero-prompt p {
        font-size: 0.85rem;
    }

    .select-hero-prompt .add-slot-button {
        max-width: 100%;
        width: 100%;
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Adjust grid columns for cards if necessary */
    .deck-cards-list {
        justify-content: center;
        width: 100%;
    }

    /* Fix any inline-styles containers */
    .deck-builder-wrapper,
    .deck-content-area,
    .deck-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ===== COMPACT MOBILE OPTIMIZATIONS ===== */

    /* Compact back button */
    .back-format-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    /* Compact save button */
    .save-deck-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    /* Compact deck name input */
    .deck-name-input {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    /* Compact privacy selector */
    .deck-privacy-select {
        padding: 0.75rem 2.5rem 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: auto;
    }

    /* Compact search input */
    .main-search-input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }

    .search-icon-inline {
        left: 0.75rem;
    }

    /* Compact section headers */
    .section-header h2 {
        font-size: 1.1rem;
    }

    /* Compact hero section title */
    .hero-section h2,
    .deck-section h2 {
        font-size: 1.1rem;
    }

    /* Compact view mode buttons */
    .view-selector-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Compact action buttons in header */
    .deck-top-bar button,
    .deck-top-bar .test-deck-btn,
    .deck-top-bar .view-guide-btn {
        width: 32px;
        height: 32px;
        padding: 0.4rem;
    }

    /* Smaller top bar spacing */
    .deck-top-bar {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    /* Compact page padding */
    .deck-builder-minimal {
        padding: 1rem;
    }

    /* Compact add buttons */
    .add-slot-button-small {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    /* Compact card rows */
    .deck-card-row {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .card-count-badge {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    /* Compact visual cards */
    .deck-card-visual {
        width: 75px;
    }

    /* Compact search results */
    .search-result-item {
        padding: 0.5rem 0.75rem;
    }

    .result-thumb {
        width: 32px;
        height: 32px;
    }

    .result-name {
        font-size: 0.9rem;
    }

    /* ===== MOBILE TOP BAR LAYOUT FIXES ===== */

    /* Top bar: back button left, buttons right */
    .deck-top-bar {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        padding: 0 !important;
    }

    /* Back button: minimal, left aligned */
    .back-format-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Hide text in back button on mobile */
    .back-format-btn span {
        display: none;
    }

    /* Save button: icon only */
    .save-deck-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        justify-content: center;
    }

    /* Hide text in save button on mobile */
    .save-deck-btn .hide-mobile,
    .save-deck-btn span:not(:first-child),
    .edit-toggle-btn .hide-mobile,
    .edit-toggle-btn span:not(:first-child) {
        display: none !important;
    }

    /* Edit/View toggle button: icon only */
    .edit-toggle-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Deck name row - full width, stacked layout */
    .deck-name-input {
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
        text-align: center;
    }

    /* Privacy selector - full width below name */
    .privacy-selector {
        width: 100% !important;
    }

    .deck-privacy-select {
        width: 100% !important;
        text-align: center;
    }

    /* Hide mobile class - universal utility */
    .hide-mobile {
        display: none !important;
    }
}

.search-icon-large {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    z-index: 10;
}

/* Comments Section Wrapper */
.deck-comments-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .deck-comments-wrapper {
        padding: 0 0 4rem 0;
    }
}

/* Tournament Counter */
.tournament-counter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--color-accent);
}

.tournament-counter.over-limit {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

.tournament-counter.over-limit .counter-value .current {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.tournament-counter .counter-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
    font-weight: 600;
}

.tournament-counter .counter-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: 'Inter', sans-serif;
}

.tournament-counter .counter-value .current {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.tournament-counter .counter-value .separator {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}

.tournament-counter .counter-value .limit {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* Mobile Preview Modal Actions */
.preview-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 350px;
    margin-top: 1.5rem;
}

.preview-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 0.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--color-text-main);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.preview-action-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.96);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.preview-action-btn svg {
    color: var(--color-primary-gold);
    transition: transform 0.2s ease;
}

.preview-action-btn:active svg {
    transform: scale(1.1);
}

.preview-action-btn.danger {
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.05));
    border-color: rgba(220, 38, 38, 0.4);
    color: #ff9d9d;
    margin-top: 0.5rem;
}

.preview-action-btn.danger svg {
    color: #ef4444;
}

.preview-action-btn.danger:active {
    background: rgba(220, 38, 38, 0.3);
    border-color: #ef4444;
}

/* Light Mode Support */
[data-theme='light'] .preview-action-btn {
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    border-color: #e5e7eb;
    color: #374151;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .preview-action-btn:active {
    background: #e5e7eb;
}

[data-theme='light'] .preview-action-btn.danger {
    background: linear-gradient(145deg, #fee2e2, #fef2f2);
    border-color: #fca5a5;
    color: #991b1b;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Equipment Filter Bar */
.equipment-filter-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
}

.filter-btn.active {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--color-primary-red);
    color: var(--color-primary-red);
    font-weight: 600;
}

/* Error View Styles (Deck Not Found) */
.error-view-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 2rem;
    text-align: center;
}

.error-view-content {
    max-width: 500px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.error-view-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 50%;
}

.error-view-icon {
    color: var(--color-primary-red, #ef4444);
    opacity: 0.9;
    z-index: 2;
}

.error-view-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, transparent 70%);
    blur: 20px;
    border-radius: 50%;
    animation: pulseGlow 3s infinite alternate;
}

.error-view-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.error-view-text {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.error-view-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--color-primary-red, #ef4444);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.error-view-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    background: #ff5555;
}

.error-view-button svg {
    transition: transform 0.3s;
}

.error-view-button:hover svg {
    transform: translateX(-5px);
}

@keyframes pulseGlow {
    from { opacity: 0.4; transform: scale(0.9); }
    to { opacity: 0.8; transform: scale(1.1); }
}
.help-page-container {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    min-height: 80vh;
}

.help-sidebar {
    width: 250px;
    flex-shrink: 0;
    padding-right: 2rem;
    border-right: 1px solid var(--color-border);
}

.help-sidebar-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--color-primary-gold);
    margin-bottom: 2rem;
}

.help-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.help-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
}

.help-nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary-gold);
    font-weight: 500;
}

.help-content {
    flex: 1;
    max-width: 800px;
}

.help-section h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--color-text-main);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-primary-red);
    padding-bottom: 1rem;
    display: inline-block;
}

.help-text-lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-main);
    margin-bottom: 1.5rem;
}

.help-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-form {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-gold);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-primary-red) 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.form-alert.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.form-alert.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .help-page-container {
        flex-direction: column;
    }

    .help-sidebar {
        width: 100%;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 1rem;
    }

    .help-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .help-nav-item {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Mobile Text Styling */
    .help-section h1 {
        text-align: center;
        display: block;
        /* Width default is auto, which respects padding without overflow */
        padding: 0 1rem;
    }

    /* Let's use padding for "sangria" (indentation/spacing) and keep text alignment natural or centered if preferred, but usually left with padding is best for readability.
       However, "sangria" strictly means indentation. But often users mean padding.
       Let's stick to left align but with padding. */
    .help-text-lead,
    .help-text,
    .help-text-small {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}