/* ==== Main Grid Layout ==== */
.all-decks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

/* ==== Side-by-Side Deck Card Design ==== */
.all-deck-box-wrapper {
  display: flex;
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 160px;
  width: 100%;
  text-decoration: none; 
  color: inherit; 
  position: relative;
}

.all-deck-box-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 145, 48, 0.3);
  border-color: rgba(255, 145, 48, 0.7);
  text-decoration: none;
}

.all-deck-box-wrapper.clickable-deck {
  cursor: pointer;
}

/* Left side - Leader image */
.deck-image-section {
  width: 120px;
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}

/* Right side - Content */
.deck-content-section {
  flex: 1;
  /* min-width: 0 stops flex's default min-width: auto from letting the
     footer's intrinsic content width (long author + badge + high view
     count) grow this column wider. Without it, the stats-row above the
     footer shares the grown width and the right-anchored price gets
     dragged further right whenever the footer below has wide content,
     even though the two rows are structurally unrelated. */
  min-width: 0;
  padding: 16px 10px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

/* Title */
.deck-title-container {
  margin-bottom: 8px;
}

.deck-content-section h3 {
  margin: 0;
  font-size: 1.05rem !important;
  color: #fff;
  line-height: 1.3;
  transition: color 0.3s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Color indicators - SVG Icons */
.color-indicators {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
}

.color-dot.color-black {
  background: #374151;
}

/* Deck Stats Row */
.deck-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.deck-quick-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.deck-collection-stat {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.85rem;
}

.deck-price-stat {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==== Deck Tags Styling ==== */
.all-deck-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
  min-height: 26px;
  align-items: center;
}
.all-deck-tags.is-empty {
  visibility: hidden;
  min-height: 26px;
}

.all-deck-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 6px;
  background: rgba(100,116,139,0.2);
  border: 1px solid rgba(148,163,184,0.4);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.73rem;
  line-height: 1;
  text-transform: capitalize;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.all-deck-tag:hover {
  background: rgba(100,116,139,0.35);
  border-color: rgba(148,163,184,0.6);
  color: #f1f5f9;
}

/* Footer */
.deck-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.deck-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.deck-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #999;
  flex-shrink: 0;
}

/* Author */
.deck-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 1;
  color: inherit;
}

.deck-author {
  color: #ccc;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.deck-author:hover {
  color: #fff;
  text-decoration: underline;
}

/* Avatar */
.author-avatar-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.deck-author-avatar {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  transition: border-color 0.3s ease;
  overflow: hidden;
}
.deck-author-link:hover .deck-author-avatar {
  border-color: rgba(255,255,255,0.4);
}
/* Drop the avatar's translucent border when a decoration ring is rendered
   alongside it — the ring becomes the visible edge, and stacking both
   creates a double-frame between the avatar art and the ring. */
.author-avatar-wrapper:has(.rm-avatar-ring) .deck-author-avatar {
  border: none;
}

/* Thin the ring at this small avatar size (28px desktop, 24px mobile).
   Default 3px reads as ~11% of the avatar diameter and competes with the
   avatar art; 2px keeps the ring visible without dominating. */
.author-avatar-wrapper.rm-decorated {
  --rm-ring: 2px;
}

.deck-author-avatar:not([style*="background-image"]) {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 200% 100%;
  animation: avatar-shimmer 1.5s infinite;
}

@keyframes avatar-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Views/date */
.deck-date {
  color: #999;
  font-size: 0.75rem;
  white-space: nowrap;
}

.deck-views,
.deck-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #999;
  font-size: 0.7rem;
  white-space: nowrap;
}

.deck-views i {
  font-size: 0.9em;
}

/* YouTube Indicator */
.deck-youtube-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.85);
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 10;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
}

.deck-youtube-indicator i {
  font-size: 12px;
}

.all-decks.loading .deck-youtube-indicator {
  opacity: 0;
  visibility: hidden;
}

.all-deck-box-wrapper.skeleton .deck-youtube-indicator {
  display: none;
}

/* ==== MOBILE RESPONSIVE ==== */
@media screen and (max-width: 768px) {
  .all-decks {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .all-deck-box-wrapper {
    min-height: 140px;
  }

  .deck-image-section {
    width: 110px;
  }

  .deck-content-section {
    padding: 12px 12px 12px 10px;
  }

  .deck-content-section h3 {
    font-size: 1.1rem !important;
  }

  .deck-footer-right {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
  }

  /* Reduce avatar↔name spacing on mobile from the default 10px gap.
     The badge-to-name spacing is then re-tuned via margin-left below so
     the badge doesn't visually collide with the name. */
  .deck-author-link {
    gap: 6px;
  }
  /* Tuck the user badge closer to the author name. With the parent gap
     now at 6px, a -2px nudge leaves ~4px effective name↔badge spacing. */
  .deck-author-link .rm-user-badge {
    margin-left: -2px;
  }
  /* Shrink the badge slightly on mobile so it doesn't dominate the cramped
     author row. Scoped to deck-author-link so the same badge size used
     elsewhere (profile header, comments) is unaffected. */
  .deck-author-link .rm-user-badge.rm-badge-md {
    width: 17px;
    height: 17px;
  }
  .deck-author-link .rm-user-badge.rm-badge-md svg {
    width: 11px;
    height: 11px;
  }

  /* Tighten the gap between view/like icons and their numbers. */
  .deck-views,
  .deck-likes {
    gap: 2px;
  }
  
  .deck-date,
  .deck-views,
  .deck-likes {
    font-size: 0.58rem;
  }

  .deck-stats-row {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .deck-quick-stats {
    gap: 4px;
    font-size: 0.75rem;
  }
  
  .deck-collection-stat {
    font-size: 0.7rem;
  }
  
  .deck-price-stat {
    font-size: 0.7rem;
    padding: 1px 5px;
  }
  
  .color-indicators .color-dot {
    width: 24px;
    height: 24px;
  }
  
  .all-deck-tag {
    font-size: 0.72rem !important;
    padding: 2px 5px;
  }
  
  .deck-youtube-indicator {
    top: 6px;
    right: 6px;
  }
}

@media screen and (max-width: 480px) {
  .all-deck-box-wrapper {
    min-height: 130px;
  }

  .deck-image-section {
    width: 105px;
  }

  .deck-content-section {
    padding: 10px 10px 10px 8px;
  }

  .deck-content-section h3 {
    font-size: 1rem !important;
    -webkit-line-clamp: 2;
  }

  .color-dot {
    width: 24px;
    height: 24px;
  }

  .author-avatar-wrapper img,
  .deck-author-avatar {
    width: 24px !important;
    height: 24px !important;
  }

  .deck-author {
    font-size: 0.85rem;
  }

  .deck-date,
  .deck-views,
  .deck-likes {
    font-size: 0.52rem;
  }

  .deck-quick-stats {
    gap: 3px;
    font-size: 0.65rem;
  }
  
  .deck-collection-stat {
    font-size: 0.65rem;
  }
  
  .deck-price-stat {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
  
  .color-indicators .color-dot {
    width: 20px;
    height: 20px;
  }
  
  .color-indicators {
    gap: 4px;
  }
  
  .all-deck-tag {
    font-size: 0.7rem !important;
    padding: 1px 4px;
  }
}

/* ==== Large screens ==== */
@media screen and (min-width: 1200px) {
  .all-decks {
    grid-template-columns: repeat(3, 1fr);
  }
  .all-deck-box-wrapper {
    min-height: 170px;
  }
}

/* ==== Load More Button ==== */
#load-more-decks {
  display: block;
  margin: 40px auto;
  padding: 12px 100px;
  width: fit-content;
  background: linear-gradient(135deg, var(--ps-orange-deep) 0%, var(--ps-orange-burnt) 50%, var(--ps-orange-burnt-2) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#load-more-decks::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

#load-more-decks:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(227, 129, 25, 0.5);
}

#load-more-decks:hover:not(:disabled)::before {
  transform: translateX(100%);
}

#load-more-decks:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==== Unified Filter Bar ==== */
.deck-filters-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.filter-bar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar-bottom {
  display: none;
}

.deck-color-filter,
.deck-view-filters {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.deck-view-filters {
  margin-left: auto;
  white-space: nowrap;
  flex-wrap: nowrap;
}

/* ==== Buttons & Icons ==== */
.filter-button,
.filter-color {
  background: rgba(0, 0, 0, 0.3);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  white-space: nowrap;
  min-width: max-content;
  box-sizing: border-box;
}

.filter-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.filter-button.active {
  border-color: var(--ps-gold);
  background: rgba(67, 56, 202, 0.4);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 159, 212, 0.3);
}

.filter-color {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #333;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.filter-color-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
}

/* Flat color dot (span) variant — needs inline-block so the 28px box applies. */
.filter-color-dot {
  display: inline-block;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.filter-color.active,
.filter-color:hover {
  border-color: var(--ps-gold);
  background-color: var(--ps-indigo);  
  box-shadow: 0 0 10px rgba(0, 159, 212, 0.5);
  filter: saturate(1.5);
}

.filter-button:focus,
.filter-color:focus {
  outline: none;
}

.filter-button,
.filter-color {
  -webkit-tap-highlight-color: transparent;
}

/* Deck Tag Multi-Select Dropdown */
.deck-tag-filter-wrap {
  position: relative;
  flex-shrink: 0;
}

.filter-tag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-tag-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.filter-tag-toggle.active {
  border-color: var(--ps-gold);
  background: rgba(67, 56, 202, 0.4);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 159, 212, 0.3);
}

.filter-tag-arrow {
  font-size: 0.7em;
  opacity: 0.6;
}

.filter-tag-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.filter-tag-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  color: #ccc;
  font-size: 0.85em;
  transition: background 0.15s;
  text-transform: capitalize;
}

.filter-tag-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-tag-option input[type="checkbox"] {
  accent-color: var(--ps-gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Responsive filters */
@media (max-width: 768px) {
  .deck-filters-bar {
    padding: 12px 8px;
    gap: 10px;
  }
  
  .filter-bar-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* Hide view filters from top row on mobile */
  .filter-bar-top .deck-view-filters {
    display: none;
  }
  
  /* Show bottom row on mobile */
  .filter-bar-bottom {
    display: flex;
  }
  
  .filter-bar-bottom .deck-view-filters {
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 0;
    justify-content: center;
    width: 100%;
  }

  
  /* Compact filters button: icon only on mobile */
  .more-filters-btn {
    flex-shrink: 0;
    padding: 0 10px;
  }

  .more-filters-btn .filters-label {
    display: none;
  }

  /* Keep color filters and tag dropdown on same line */
  .deck-color-filter {
    gap: 0.4rem;
  }
  
  .filter-color {
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .filter-color-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .filter-button {
    height: 32px;
    font-size: 0.8em;
    padding: 0 10px;
  }

  .filter-tag-toggle {
    height: 32px;
    font-size: 0.8em;
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  .deck-filters-bar {
    padding: 10px 4px;
    gap: 8px;
  }
  
  .filter-bar-top {
    gap: 6px;
  }
  
  .filter-button {
    height: 30px;
    font-size: 0.75em;
    padding: 0 8px;
  }
  
  .filter-tag-toggle {
    height: 30px;
    font-size: 0.75em;
    padding: 0 8px;
  }
  
  .deck-color-filter {
    gap: 0.3rem;
  }
  
  .filter-color {
    padding: 3px;
  }
  
  .filter-color-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 600px) {
  .deck-color-filter {
    gap: 0.2rem;
    flex-shrink: 0;
  }
  
  .filter-color {
    width: 32px;
    height: 32px;
    padding: 2px;
  }
  
  .filter-color-icon {
    width: 26px;
    height: 26px;
  }
  
  .filter-tag-toggle {
    height: 32px;
    font-size: 0.75em;
    padding: 0 8px;
  }
  
  .filter-bar-top {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .filter-button {
    font-size: 0.7em;
    padding: 0 6px;
  }
  
  .filter-tag-toggle {
    font-size: 0.7em;
    padding: 0 6px;
  }
  
  .filter-color {
    padding: 2px;
  }
  
  .filter-color-icon {
    width: 26px;
    height: 26px;
  }
}

/* ==== More Filters Button ==== */
.more-filters-btn {
  position: relative;
  gap: 6px;
}

.more-filters-btn i {
  font-size: 0.85em;
}

.more-filters-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--ps-orange-deep);
  color: #fff;
  font-size: 0.65em;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ==== More Filters Modal ==== */
.more-filters-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.more-filters-modal {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.more-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.more-filters-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.more-filters-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s;
}

.more-filters-close:hover {
  color: #fff;
}

.more-filters-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.more-filters-label {
  display: block;
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 600;
}

/* Card Search */
.card-search-wrapper {
  position: relative;
}

.card-search-input {
  width: 100% !important;
  background: #1e1e1e !important;
  border: 2px solid #444 !important;
  border-radius: 8px !important;
  color: #fff !important;
  padding: 10px 12px !important;
  font-size: 0.9rem !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
  box-sizing: border-box !important;
}

.card-search-input::placeholder {
  color: #555 !important;
}

.card-search-input:focus {
  outline: none !important;
  border-color: var(--ps-gold) !important;
}

.card-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  color: #ccc;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.card-search-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.card-search-thumb {
  width: 32px;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.card-search-loading,
.card-search-empty {
  padding: 12px;
  color: #888;
  font-size: 0.85rem;
  text-align: center;
}

/* Selected Card Chips */
.selected-cards-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.selected-cards-chips:empty {
  margin-top: 0;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(227, 129, 25, 0.15);
  border: 1px solid rgba(227, 129, 25, 0.4);
  border-radius: 20px;
  padding: 4px 8px 4px 4px;
  color: #fff;
  font-size: 0.8rem;
}

.card-chip-img {
  width: 20px;
  height: 28px;
  object-fit: cover;
  border-radius: 2px;
}

.card-chip-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-chip-remove {
  background: none;
  border: none;
  color: var(--ps-orange-deep);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.card-chip-remove:hover {
  color: #ff4444;
}

/* Feature Toggles */
.feature-toggles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
}

.feature-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  cursor: pointer;
  color: #ccc;
  font-size: 0.9rem;
}

.feature-toggle input[type="checkbox"] {
  accent-color: var(--ps-orange-deep);
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  cursor: pointer;
}

.feature-toggle:hover {
  color: #fff;
}

/* Set Filter Dropdown */
.set-filter-wrap {
  position: relative;
}

.set-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ccc;
  cursor: pointer;
  font-size: 0.85em;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}

.set-filter-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.set-filter-toggle.active {
  border-color: var(--ps-orange-deep);
  color: #fff;
}

.set-filter-label {
  flex: 1;
  text-align: left;
}

.set-filter-arrow {
  font-size: 0.7em;
  opacity: 0.6;
}

.set-filter-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.set-filter-option {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 14px !important;
  color: #ccc;
  cursor: pointer;
  font-size: 0.85em;
  transition: background 0.15s ease;
}

.set-filter-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.set-filter-option input[type="checkbox"] {
  accent-color: var(--ps-orange-deep);
  width: 16px !important;
  height: 16px !important;
  cursor: pointer;
}

/* Collection Presets */
.collection-presets {
  display: flex;
  gap: 8px;
}

.collection-preset-btn {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
  text-align: center;
}

.collection-preset-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.collection-preset-btn.active {
  border-color: var(--ps-gold);
  background: rgba(67, 56, 202, 0.4);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 159, 212, 0.3);
}

/* Modal Footer */
.more-filters-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
}

.more-filters-clear {
  flex: 1;
  padding: 10px;
  background: transparent;
  color: #999;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.more-filters-clear:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.more-filters-apply {
  flex: 1;
  padding: 10px;
  background: var(--ps-orange-deep);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.more-filters-apply:hover {
  background: #f59235;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .more-filters-overlay {
    padding: 10px;
    align-items: flex-start;
    padding-top: 60px;
  }

  .more-filters-modal {
    max-height: 80vh;
    border-radius: 12px;
  }
}

/* ==== Skeleton Loading Styles ==== */
@keyframes pulse {
  0%   { background-color: rgba(255,255,255,0.05); }
  50%  { background-color: rgba(255,255,255,0.15); }
  100% { background-color: rgba(255,255,255,0.05); }
}

.all-decks.loading {
  visibility: hidden;
}

.all-deck-box-wrapper.skeleton {
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
  border-color: rgba(255,255,255,0.1);
  min-height: 160px;
  cursor: default;
}

.all-deck-box-wrapper.skeleton .skeleton-image {
  background-color: rgba(255,255,255,0.05);
  animation: pulse 1.2s ease-in-out infinite;
  width: 120px;
  height: 100%;
  min-height: 160px;
  flex-shrink: 0;
  border-radius: 0;
}

.all-deck-box-wrapper.skeleton .deck-content-section {
  flex: 1;
  padding: 16px 16px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.all-deck-box-wrapper.skeleton .skeleton-text {
  height: 20px;
  width: 75%;
  margin-bottom: 8px;
  border-radius: 4px;
  background-color: rgba(255,255,255,0.05);
  animation: pulse 1.2s ease-in-out infinite;
}

.all-deck-box-wrapper.skeleton .skeleton-text.short {
  width: 40%;
  height: 14px;
}

.all-deck-box-wrapper.skeleton .skeleton-colors {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  margin-top: 8px;
}

.all-deck-box-wrapper.skeleton .skeleton-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.05);
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.all-deck-box-wrapper.skeleton .deck-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.all-deck-box-wrapper.skeleton .deck-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.all-deck-box-wrapper.skeleton .deck-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.all-deck-box-wrapper.skeleton .skeleton-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.05);
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Mobile skeleton adjustments */
@media screen and (max-width: 768px) {
  .all-deck-box-wrapper.skeleton {
    min-height: 140px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-image {
    width: 110px;
    min-height: 140px;
  }
  
  .all-deck-box-wrapper.skeleton .deck-content-section {
    padding: 12px 12px 12px 16px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-text {
    height: 18px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-text.short {
    height: 12px;
  }
}

@media screen and (max-width: 480px) {
  .all-deck-box-wrapper.skeleton {
    min-height: 130px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-image {
    width: 105px;
    min-height: 130px;
  }
  
  .all-deck-box-wrapper.skeleton .deck-content-section {
    padding: 10px 10px 10px 14px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-dot {
    width: 24px;
    height: 24px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-avatar {
    width: 24px;
    height: 24px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-text {
    height: 16px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-text.short {
    height: 12px;
  }
}

/* Large screens skeleton */
@media screen and (min-width: 1200px) {
  .all-deck-box-wrapper.skeleton {
    min-height: 170px;
  }
  
  .all-deck-box-wrapper.skeleton .skeleton-image {
    min-height: 170px;
  }
}

/* ==== Legend Filter Styles ==== */
.deck-legend-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 16px;
}

.legend-search-input {
  width: 120px !important;
  min-width: 120px !important;
  padding: 8px 10px 8px 32px !important;
  background: #1e1e1e !important;
  border: 2px solid #444 !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-size: 0.85rem !important;
  outline: none !important;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
  box-sizing: border-box !important;
}

.legend-search-input::placeholder {
  color: #555 !important;
}

.legend-search-input:focus {
  border-color: var(--ps-gold) !important;
}

.legend-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.legend-search-wrap .legend-search-icon {
  position: absolute;
  left: 10px;
  color: #666;
  font-size: 0.8rem;
  pointer-events: none;
}

.deck-legend-filter {
  display: flex;
  gap: 4px;
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 4px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
  flex: 1;
  min-width: 0;
  cursor: grab;
  user-select: none;
}

.deck-legend-filter.grabbing {
  cursor: grabbing;
}

.deck-legend-filter.grabbing .filter-legend {
  pointer-events: none;
}

.deck-legend-filter::-webkit-scrollbar {
  height: 6px;
}

.deck-legend-filter::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.deck-legend-filter::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
}

.deck-legend-filter::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

.filter-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.filter-legend:hover {
  transform: translateY(-2px);
}

.filter-legend-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-legend:hover .filter-legend-icon {
  border-color: rgba(255,255,255,0.4);
}

.filter-legend.active .filter-legend-icon {
  border-color: transparent;
  background: linear-gradient(135deg, var(--ps-orange-burnt) 0%, var(--ps-orange-burnt-2) 100%) border-box;
  box-shadow: 0 0 10px rgba(212, 120, 44, 0.5);
  position: relative;
}

.legend-clear-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.legend-clear-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: rgba(239, 68, 68, 0.6);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .deck-legend-filter-wrapper {
    margin-bottom: 1rem;
    padding: 10px 12px;
  }
  
  .filter-legend-icon {
    width: 48px;
    height: 48px;
  }
  
  .legend-clear-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 480px) {
  .deck-legend-filter-wrapper {
    padding: 8px 10px;
  }

  .legend-search-input {
    width: 90px !important;
    min-width: 90px !important;
    padding: 6px 8px 6px 28px !important;
    font-size: 0.75rem !important;
  }

  .legend-search-wrap .legend-search-icon {
    left: 8px;
    font-size: 0.7rem;
  }

  .filter-legend-icon {
    width: 42px;
    height: 42px;
  }

  .deck-legend-filter {
    gap: 2px;
  }
}

/* ==== All Decks page: tighten top gap ==== */
/* Blocksy applies top+bottom container padding via data-vertical-spacing.
   The Vertical Spacing toggle isn't surfaced in the per-page sidebar, so we
   override it here scoped to page ID 69. */
.page-id-69 .ct-container-full[data-vertical-spacing="top:bottom"] {
  padding-top: 0;
}
.page-id-69 .entry-content > .wp-block-paragraph:empty {
  display: none;
}