/* ==== User Decks Main Grid Layout ==== */
.user-decks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 8px 0;
}

/* ==== Layout Fix - Ensure proper flex constraints ==== */
.user-decks .all-deck-box-wrapper {
  display: flex;
  min-height: 160px;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure the click area takes full space and uses flex */
.user-decks .all-deck-box-wrapper .deck-click-area {
  display: flex;
  width: 100%;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.user-decks .deck-title-container h3 a.deck-title-link,
.user-decks .deck-title-container h3 a.deck-title-link:link,
.user-decks .deck-title-container h3 a.deck-title-link:visited {
  color: inherit !important;
  text-decoration: none !important;
}

/* Image section - fixed width, no shrinking */
.user-decks .deck-image-section {
  width: 120px;
  min-width: 120px;
  flex-shrink: 0;
  aspect-ratio: unset; /* Remove the forced aspect ratio */
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}

/* Content section - take remaining space, constrain width */
.user-decks .deck-content-section {
  flex: 1;
  min-width: 0;
  padding: 16px 16px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #fff;
  overflow: hidden;
}

/* Title container - prevent overflow */
.user-decks .deck-title-container {
  margin-bottom: 6px;
  width: 100%;
  overflow: hidden;
}

.clickable-deck { cursor: pointer; }

.user-decks .deck-title-container h3 {
  margin: 0;
  font-size: 1.2rem !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;
  word-break: break-word;
  max-width: 100%;
}

/* ===================== Colors + Inline Actions Row ===================== */


.user-decks .user-deck-actions-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.user-decks .udw-pill {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  line-height: 22px;
  padding: 0 8px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  vertical-align: middle;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.user-decks .udw-pill i,
.user-decks .udw-pill span {
  line-height: 22px;
  display: inline-block;
}

.user-decks .udw-pill { cursor: pointer; }

.user-decks .udw-pill:focus { outline: none; }
.user-decks .udw-pill:focus-visible {
  outline: 2px solid var(--ps-gold);
  outline-offset: 1px;
}

.user-decks .udw-pill--edit:hover {
  background: rgba(52,152,219,0.9);
  border-color: #2980b9;
}
.user-decks .udw-pill--delete:hover {
  background: rgba(231,76,60,0.9);
  border-color: #c0392b;
}


.user-decks .user-deck-actions-inline > * {
  display: inline-flex;
  align-items: center;
}


/* ===================== Tags ===================== */
.user-decks .all-deck-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
  min-height: 26px;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}
.user-decks .all-deck-tags.is-empty { display: none; }

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

.user-decks .deck-footer-left,
.user-decks .deck-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.user-decks .deck-footer-right {
  flex-shrink: 0;
}

/* ==== Deck Mode Badge ==== */
.deck-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.deck-mode-badge.competitive {
  background: linear-gradient(135deg, var(--ps-orange-deep) 0%, #cc7416 100%);
  color: #111;
  border-color: var(--ps-orange-deep);
}

.deck-mode-badge.casual {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: #fff;
  border-color: #28a745;
}

.deck-mode-badge.private {
  background: linear-gradient(135deg, var(--ps-indigo-3) 0%, #5a52d5 100%);
  color: #fff;
  border-color: var(--ps-indigo-3);
}

/* ==== Deck Visibility Badge ==== */
.deck-visibility-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.deck-visibility-badge.private {
  background: linear-gradient(135deg, var(--ps-indigo-3) 0%, #5a52d5 100%);
  color: #fff;
  border-color: var(--ps-indigo-3);
}

.deck-visibility-badge i {
  font-size: 0.7rem;
}


/* ===================== Unified Filter Bar ===================== */
.user-decks-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  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;
}

/* Desktop: Single row with everything */
.filter-bar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.user-deck-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

.user-deck-search-icon {
  position: absolute;
  left: 12px;
  color: #666;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 1;
}

.user-deck-search {
  width: 100% !important;
  min-width: 0;
  padding: 10px 36px 10px 38px !important;
  border: 2px solid #444 !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  color: #fff !important;
  background: #1e1e1e !important;
  transition: border-color 0.2s ease;
  box-sizing: border-box !important;
}

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

.user-deck-search::placeholder { color: #555 !important; }

.user-deck-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  padding: 0;
  background: #666;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.user-deck-search-clear:hover {
  background: #ef4444;
  transform: translateY(-50%) scale(1.1);
}

.user-deck-search-clear.visible {
  display: flex;
}

#user-filter-tag {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  height: 36px;
  line-height: 36px;
  padding: 0 26px 0 10px;
  font-size: 0.85em;
  max-width: 120px;
  min-width: 90px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='white'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 10px;
  color-scheme: dark;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#user-filter-tag option {
  background: #1e1e1e;
  color: #fff;
}

#user-filter-tag:hover,
#user-filter-tag:focus {
  border-color: var(--ps-gold);
  box-shadow: 0 0 8px rgba(0, 159, 212, 0.4);
  outline: none;
}

.deck-count-inline {
  margin-left: auto;
  color: #888;
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.deck-count-inline strong {
  color: #aaa;
  font-weight: 600;
}

/* Desktop: Hide bottom row, show buttons in top row */
.filter-bar-bottom {
  display: none;
}

.user-decks-filter-bar .deck-mode-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-decks-filter-bar .deck-mode-filter .filter-button {
  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.8em;
  transition: all 0.2s ease;
  height: 32px;
  padding: 0 14px;
  white-space: nowrap;
}

.user-decks-filter-bar .deck-mode-filter .filter-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.user-decks-filter-bar .deck-mode-filter .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);
}

.user-decks-filter-bar .deck-mode-filter .filter-button:focus {
  outline: none;
}

/* Mobile: Show bottom row, buttons drop down */
@media (max-width: 768px) {
  .user-decks-filter-bar { padding: 12px; gap: 10px; }
  
  .filter-bar-top { gap: 8px; }
  
  /* Hide buttons from top row on mobile */
  .filter-bar-top .deck-mode-filter { display: none; }
  
  /* Show bottom row on mobile */
  .filter-bar-bottom { display: flex; }
  
  .user-deck-search-wrapper { flex: 1; max-width: none; min-width: 0; }
#user-filter-tag { height: 34px; line-height: 34px; font-size: 0.8em; max-width: 100px; min-width: 70px; padding: 0 22px 0 8px; flex-shrink: 0; }
.deck-count-inline { font-size: 0.7rem; flex-shrink: 0; }
  .user-deck-search { padding: 8px 30px 8px 34px !important; font-size: 0.85rem !important; }
  .user-deck-search-icon { left: 10px; font-size: 0.8rem; }
  .user-decks-filter-bar .deck-mode-filter { gap: 6px; }
  .user-decks-filter-bar .deck-mode-filter .filter-button { height: 30px; padding: 0 10px; font-size: 0.75em; }
  
  .filter-bar-bottom {
  display: flex;
  justify-content: center;
}
}

@media (max-width: 480px) {
  .user-decks-filter-bar { padding: 10px; gap: 8px; }
  .filter-bar-top { gap: 6px; }
  .user-deck-search { padding: 8px 28px 8px 28px !important; font-size: 0.85rem !important; }
  .user-deck-search-wrapper { flex: 1; min-width: 0; }
#user-filter-tag { height: 32px; line-height: 32px; font-size: 0.7em; max-width: 75px; min-width: 60px; padding: 0 20px 0 6px; flex-shrink: 0; }
  .deck-count-inline { font-size: 0.65rem; }
  .user-decks-filter-bar .deck-mode-filter .filter-button { height: 28px; padding: 0 8px; font-size: 0.7em; }
}

/* ===================== Load More Button ===================== */
#load-more-user-decks {
  display: block;
  margin: 30px auto;
  padding: 12px 24px;
  max-width: 200px;
  width: auto;
  background: transparent;
  color: var(--ps-orange-deep);
  border: 2px solid var(--ps-orange-deep);
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}
#load-more-user-decks:hover:not(:disabled) {
  background: var(--ps-orange-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(227, 129, 25, 0.3);
}
#load-more-user-decks:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ===================== Skeleton Loading ===================== */
@keyframes userDeckPulse {
  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); }
}

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

.user-decks .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;
}

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

.user-decks .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;
}

.user-decks .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: userDeckPulse 1.2s ease-in-out infinite;
}

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

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

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

.user-decks .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;
}

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

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

/* ===================== Responsive Design ===================== */
@media screen and (min-width: 1200px) {
  .user-decks { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 1024px) {
  .user-decks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .user-decks { 
    grid-template-columns: repeat(1, 1fr); 
  }
  

  .user-decks .deck-image-section {
    width: 110px; 
    min-width: 110px;
  }
  
  .user-decks .deck-content-section {
    padding: 12px 12px 12px 16px;
  }
  
  .user-decks .deck-title-container h3 { 
    font-size: 1.1rem !important; 
  }
  
  .user-decks .user-deck-actions-inline .udw-pill {
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    font-size: 0.72rem;
  }
  
  .user-decks .deck-footer {
    overflow-x: hidden;
    width: 100%;
  }
  
  .user-decks .deck-footer-left {
    overflow: hidden;
    min-width: 0;
  }
  
  .user-decks .deck-mode-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .user-decks .deck-visibility-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .user-decks .deck-visibility-badge i {
    font-size: 0.65rem;
  }
  
  .user-decks .all-deck-box-wrapper.skeleton { 
    min-height: 140px; 
  }
  
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-image {
    width: 110px; 
    min-height: 140px;
  }
  
  .user-decks .all-deck-box-wrapper.skeleton .deck-content-section {
    padding: 12px 12px 12px 16px;
  }
  
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-text { 
    height: 18px; 
  }
  
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-text.short { 
    height: 12px; 
  }
}


@media (max-width: 480px) {
  .user-decks { grid-template-columns: repeat(1, 1fr); }

  .user-decks .deck-image-section {
    width: 105px; min-width: 105px;
  }
  .user-decks .deck-content-section {
    padding: 10px 10px 10px 14px;
  }
  .user-decks .deck-title-container h3 { font-size: 1rem !important; }

  .user-decks .deck-footer-right {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
  }

  .user-decks .all-deck-box-wrapper.skeleton { min-height: 130px; }
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-image {
    width: 105px; min-height: 130px;
  }
  .user-decks .all-deck-box-wrapper.skeleton .deck-content-section {
    padding: 10px 10px 10px 14px;
  }
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-dot {
    width: 24px; height: 24px;
  }
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-text { height: 16px; }
  .user-decks .all-deck-box-wrapper.skeleton .skeleton-text.short { height: 12px; }
  
  .user-decks .deck-mode-badge {
    font-size: 0.65rem;
    padding: 2px 5px;
    letter-spacing: 0.3px;
  }
}

@media (max-width: 420px) {
  
  .user-decks .deck-visibility-badge {
    font-size: 0.65rem;
    padding: 2px 5px;
    letter-spacing: 0.3px;
  }
  
  .user-decks .deck-visibility-badge i {
    font-size: 0.6rem;
  }
}

/* ==== NEW USER DECKS FEATURES ==== */

/* ===================== Deck actions: ⋮ kebab menu + pin flag ===================== */

/* The card clips overflow for its rounded corners; let the dropdown escape it,
   then re-round the image's left corners so the card still looks rounded. */
.user-decks .all-deck-box-wrapper { overflow: visible; }
.user-decks .deck-image-section { border-radius: 12px 0 0 12px; }

/* While its menu is open, lift the card above its neighbours. The card's
   :hover transform creates a stacking context, so without this the open menu
   gets painted under the next card. */
.user-decks .all-deck-box-wrapper.menu-open { z-index: 50; }

.udw-menu-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
}

.udw-kebab {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 22, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: #e7e9ee;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}
.user-decks .all-deck-box-wrapper:hover .udw-kebab,
.udw-kebab[aria-expanded="true"] { opacity: 1; }
.udw-kebab:hover {
  background: rgba(15, 17, 22, 0.92);
  border-color: rgba(255, 255, 255, 0.30);
}
.udw-kebab svg { width: 18px; height: 18px; }

.udw-menu {
  position: absolute;
  top: 40px;
  right: 0;
  min-width: 174px;
  background: #171a21;
  border: 1px solid #2c313c;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.13s ease, transform 0.13s ease;
}
.udw-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.udw-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: #e7e9ee;
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.udw-menu-item:hover { background: rgba(255, 255, 255, 0.07); }
.udw-menu-item svg { width: 15px; height: 15px; color: #9aa0a6; flex: 0 0 auto; }
.udw-menu-item:hover svg { color: #e7e9ee; }
.udw-menu-sep { height: 1px; background: #2c313c; margin: 6px 4px; }
.udw-menu-item--delete { color: #ef4444; }
.udw-menu-item--delete svg { color: #ef4444; }
.udw-menu-item--delete:hover { background: rgba(239, 68, 68, 0.12); }

/* Pin indicator on the deck image (display only — pin/unpin is in the menu) */
.deck-pin-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 22, 0.72);
  border: 1px solid rgba(255, 176, 32, 0.5);
  color: #ffb020;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 4;
}
.deck-pin-flag svg { width: 14px; height: 14px; }

/* Mobile: always show the kebab */
@media (max-width: 768px) {
  .udw-kebab { opacity: 1; width: 28px; height: 28px; top: 6px; right: 6px; }
  .udw-kebab svg { width: 16px; height: 16px; }
  .udw-menu { top: 36px; }
  .deck-pin-flag { width: 24px; height: 24px; top: 6px; left: 6px; }
}
/* ===================== Stats Row in User Decks ===================== */
/* Base styles inherited from all-decks.css */

/* User decks specific: hide collection label on mobile */
.user-decks .deck-collection-stat .collection-label {
  display: none;
}

@media screen and (min-width: 768px) {
  .user-decks .deck-collection-stat .collection-label {
    display: inline;
  }
}

/* ===================== Adjusted Actions Row ===================== */
.user-decks .user-deck-actions-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* ===================== Mobile Responsive ===================== */
@media (max-width: 768px) {
  
  .deck-pinned-badge {
    top: 6px;
    left: 6px;
    padding: 4px 5px;
    font-size: 10px;
  }
  
  .deck-pinned-badge i {
    font-size: 9px;
  }
  
  .user-decks .deck-stats-row {
    flex-wrap: nowrap;
    gap: 4px;
  }
  
  .user-decks .deck-quick-stats {
    gap: 4px;
    font-size: 0.75rem;
  }
  
  .user-decks .deck-collection-stat {
    font-size: 0.7rem;
  }
  
  .user-decks .deck-price-stat {
    font-size: 0.7rem;
    padding: 1px 5px;
  }
  
  .user-decks .color-indicators .color-dot {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .user-decks .deck-quick-stats {
    gap: 3px;
    font-size: 0.65rem;
  }
  
  .user-decks .deck-collection-stat {
    font-size: 0.65rem;
  }
  
  .user-decks .deck-price-stat {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
  
  .user-decks .color-indicators .color-dot {
    width: 20px;
    height: 20px;
  }
  
  .user-decks .color-indicators {
    gap: 4px;
  }
  
  .user-decks .user-deck-actions-inline {
    gap: 4px;
  }
  
}

@media (max-width: 420px) {
  .user-deck-search-wrapper {
    min-width: 0;
  }
  
  #user-filter-tag {
    font-size: 0.65em;
    max-width: 70px;
    min-width: 55px;
  }
  
  .deck-count-inline {
    font-size: 0.6rem;
  }
  
  .deck-pinned-badge {
    top: 4px;
    left: 4px;
    padding: 3px 4px;
    font-size: 9px;
  }
}

/* ===================== Toast Notification ===================== */
.udw-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90vw;
}

.udw-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

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

.udw-toast-icon i {
  font-size: 16px;
}

/* Warning/limit style */
.udw-toast--warning .udw-toast-icon {
  background: rgba(227, 129, 25, 0.2);
  border: 1px solid rgba(227, 129, 25, 0.4);
  color: var(--ps-orange-deep);
}

/* Error style */
.udw-toast--error .udw-toast-icon {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

/* Success style */
.udw-toast--success .udw-toast-icon {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.4);
  color: #28a745;
}

.udw-toast-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.udw-toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.udw-toast-message {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;
}

.udw-toast-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.udw-toast-close i {
  font-size: 14px;
}

/* Progress bar for auto-dismiss */
.udw-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--ps-orange-deep);
  border-radius: 0 0 0 12px;
  transition: width linear;
}

.udw-toast--error .udw-toast-progress {
  background: #e74c3c;
}

.udw-toast--success .udw-toast-progress {
  background: #28a745;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .udw-toast {
    bottom: 16px;
    padding: 12px 16px;
    gap: 10px;
    border-radius: 10px;
  }
  
  .udw-toast-icon {
    width: 32px;
    height: 32px;
  }
  
  .udw-toast-icon i {
    font-size: 14px;
  }
  
  .udw-toast-title {
    font-size: 0.9rem;
  }
  
  .udw-toast-message {
    font-size: 0.8rem;
  }
}

/* ===================== Empty State ===================== */
.user-decks-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  margin: 20px 0;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(227, 129, 25, 0.15) 0%, rgba(227, 129, 25, 0.05) 100%);
  border: 1px solid rgba(227, 129, 25, 0.3);
  border-radius: 50%;
  margin-bottom: 24px;
}

.empty-state-icon i {
  font-size: 32px;
  color: var(--ps-orange-deep);
  opacity: 0.8;
}

.empty-state-title {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
}

.empty-state-message {
  margin: 0 0 28px 0;
  font-size: 1rem;
  color: #888;
  max-width: 400px;
  line-height: 1.6;
}

.empty-state-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--ps-orange-deep) 0%, #cc7416 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.empty-state-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 129, 25, 0.4);
  background: linear-gradient(135deg, #f08d2a 0%, var(--ps-orange-deep) 100%);
  color: #fff;
  text-decoration: none;
}

.empty-state-cta:active {
  transform: translateY(0);
}

.empty-state-cta i {
  font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .user-decks-empty-state {
    padding: 50px 24px;
  }
  
  .empty-state-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }
  
  .empty-state-icon i {
    font-size: 28px;
  }
  
  .empty-state-title {
    font-size: 1.3rem;
  }
  
  .empty-state-message {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
  
  .empty-state-cta {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .user-decks-empty-state {
    padding: 40px 20px;
  }
  
  .empty-state-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
  }
  
  .empty-state-icon i {
    font-size: 24px;
  }
  
  .empty-state-title {
    font-size: 1.2rem;
  }
  
  .empty-state-message {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  .empty-state-cta {
    padding: 11px 20px;
    font-size: 0.9rem;
    gap: 8px;
  }
}