/* Pokemon GO Trade List Generator - Custom Styles */

:root {
  --pokemon-red: #ff5350;
  --pokemon-blue: #3b5ca8;
  --pokemon-yellow: #feca1b;
  --grass-type: #78c850;
  --fire-type: #f08030;
  --water-type: #6890f0;
  --normal-type: #a8a878;
  --canvas-bg: #1a1a1a;
  --canvas-border: #333;
  --pokemon-card-bg: #2d2d2d;
  --pokemon-card-hover: #3a3a3a;
}

body {
  background-color: #121212;
  color: #ffffff;
}

.trading-canvas {
  background: linear-gradient(135deg, var(--canvas-bg) 0%, #252525 100%);
  border: 2px solid var(--canvas-border);
  border-radius: 15px;
  min-height: 120px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.trading-canvas::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(120, 200, 80, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(240, 128, 48, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(104, 144, 240, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0px;
  position: relative;
  z-index: 2;
}

.pokemon-card {
  background: transparent;
  border: none;
  padding: 0px;
  text-align: center;
  cursor: grab;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
}

.pokemon-card:hover {
  transform: scale(1.08) translateY(-3px);
  filter: brightness(1.1) drop-shadow(0 8px 25px rgba(0, 0, 0, 0.3));
}

.pokemon-card:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.pokemon-card.dragging {
  opacity: 0.7;
  transform: rotate(5deg);
  z-index: 1000;
}

.pokemon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0px;
  border-radius: 0;
  background: transparent;
  transform: scale(1.2);
}

.pokemon-name {
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  margin: 0;
}

.pokemon-number {
  font-size: 8px;
  color: #aaa;
  margin: 0;
}

.section-header {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
  border: 1px solid var(--canvas-border);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.section-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.add-pokemon-btn {
  background: linear-gradient(
    135deg,
    var(--pokemon-blue) 0%,
    #5a7bc8 100%
  );
  border: none;
  border-radius: 8px;
  color: white;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 600;
}

.add-pokemon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 92, 168, 0.4);
}

.pokemon-search {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
  border: 2px solid var(--pokemon-blue);
  border-radius: 12px;
  color: white;
  padding: 15px 20px;
  width: 100%;
  margin-bottom: 20px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pokemon-search:focus {
  outline: none;
  border-color: #20c997;
  box-shadow: 0 0 20px rgba(32, 201, 151, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
}

.pokemon-selector {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
  border: 3px solid var(--pokemon-blue);
  border-radius: 20px;
  padding: 25px;
  width: 90vw;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(59, 92, 168, 0.3);
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .pokemon-selector {
    width: 95vw;
    max-height: 85vh;
    padding: 15px;
    border-radius: 10px;
  }
}

.pokemon-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 5px;
  margin-top: 15px;
}

@media (min-width: 768px) {
  .pokemon-selector-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

@media (min-width: 1200px) {
  .pokemon-selector-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

.pokemon-option {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(5px);
}

.pokemon-option:hover {
  transform: scale(1.08) translateY(-2px);
  background: rgba(59, 92, 168, 0.15);
  border-color: rgba(59, 92, 168, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 92, 168, 0.2);
}

.pokemon-option.selected {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.25) 0%, rgba(40, 167, 69, 0.15) 100%);
  border: 2px solid #28a745;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.pokemon-option.selected::after {
  content: "✓";
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
  animation: checkmarkPulse 2s infinite;
}

/* Pokemon images in selector - scale to consistent size */
.pokemon-option img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  object-position: center;
  transform: scale(1.2);
  border-radius: 8px;
}

@keyframes checkmarkPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Fly Icon Styles */
.fly-icon-container {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #dc3545;
  border-radius: 12px;
  padding: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.25) 0%, rgba(220, 53, 69, 0.15) 100%);
  box-shadow: 0 0 20px rgba(220, 53, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fly-icon-container.enabled {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.25) 0%, rgba(40, 167, 69, 0.15) 100%);
  border: 2px solid #28a745;
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.fly-icon-container::after {
  content: "✗";
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.fly-icon-container.enabled::after {
  content: "✓";
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
  animation: checkmarkPulse 2s infinite;
}

.close-selector {
  background: linear-gradient(135deg, var(--pokemon-red) 0%, #dc3545 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  width: 35px;
  height: 35px;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.close-selector:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.drop-zone {
  min-height: 80px;
  border: 2px dashed var(--canvas-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-style: italic;
  transition: all 0.3s ease;
}

.drop-zone.drag-over {
  border-color: var(--pokemon-yellow);
  background: rgba(254, 202, 27, 0.1);
  color: var(--pokemon-yellow);
}

.main-trade-canvas {
  padding: 20px;
}

@media (max-width: 992px) {
  .main-trade-canvas {
    padding: 15px;
  }
  
  .bg-option small {
    font-size: 0.6rem;
  }
}

.control-btn {
  background: linear-gradient(135deg, var(--pokemon-blue) 0%, #5a7bc8 100%);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .control-btn {
    padding: 12px 16px;
    font-size: 0.85rem;
    width: 100%;
  }
}

.control-btn:hover {
  background: linear-gradient(135deg, #5a7bc8 0%, var(--pokemon-blue) 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 92, 168, 0.4);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.shiny-effect {
  position: relative;
}

.shiny-effect::after {
  content: "✨";
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 12px;
  animation: shiny 2s infinite;
}

@keyframes shiny {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.pokemon-badge {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pokemon-red);
  color: white;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .pokemon-image {
    width: 100%;
    height: 100%;
  }

  .section-header {
    padding: 12px;
    margin-bottom: 15px;
  }

  .section-title {
    font-size: 1.1rem;
    flex-direction: column;
    gap: 8px;
  }

  .add-pokemon-btn {
    margin-left: 0 !important;
    margin-top: 5px;
    padding: 10px 16px;
  }

  .pokemon-trade-list-container {
    padding: 20px !important;
  }
}

@media (max-width: 576px) {        
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Fix Pokemon sizing to fit at least 4 per row */
.pokemon-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
}

.pokemon-card {
  width: calc(25% - 3px) !important;
  min-width: 0 !important;
  max-width: none;
  aspect-ratio: 1;
}

@media (min-width: 768px) {
  .pokemon-card {
    width: calc(25% - 4px) !important;
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .pokemon-card {
    width: calc(25% - 2px) !important;
  }
  
  .pokemon-grid {
    gap: 2px;
  }
}

@media (max-width: 320px) {
  .pokemon-card {
    width: calc(25% - 1px) !important;
  }
  
  .pokemon-grid {
    gap: 1px;
  }
}

/* New Clean Canvas Styles inspired by old version */
.bg-option {
  background: linear-gradient(135deg, var(--bs-card-bg, #1e1e1e) 0%, #2a2a2a 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  color: var(--bs-body-color);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.bg-option:hover {
  border-color: var(--pokemon-blue);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3), 0 0 20px rgba(59, 92, 168, 0.2);
  background: linear-gradient(135deg, rgba(59, 92, 168, 0.1) 0%, #2a2a2a 100%);
}

.bg-option.selected {
  border-color: #20c997;
  background: linear-gradient(135deg, rgba(32, 201, 151, 0.25) 0%, rgba(59, 92, 168, 0.15) 100%);
  box-shadow: 0 0 20px rgba(32, 201, 151, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.bg-option.selected::before {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 2px;
  background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(32, 201, 151, 0.4);
}

.bg-option small {
  font-size: 0.7rem;
  font-weight: 500;
}


.section-header-clean {
  margin-bottom: 10px;
}

.section-title-clean {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  gap: 8px;
}

.section-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.section-text {
  flex: 1;
  margin-left: 5px;
}

.add-pokemon-cell-btn {
  background: linear-gradient(135deg, rgba(59, 92, 168, 0.1) 0%, rgba(32, 201, 151, 0.05) 100%);
  border: 2px dashed var(--pokemon-blue);
  border-radius: 12px;
  color: var(--pokemon-blue);
  width: calc(25% - 3px);
  min-width: 0 !important;
  max-width: none;
  aspect-ratio: 1;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  backdrop-filter: blur(5px);
}

.add-pokemon-cell-btn:hover {
  background: linear-gradient(135deg, rgba(59, 92, 168, 0.25) 0%, rgba(32, 201, 151, 0.15) 100%);
  border-color: #20c997;
  border-style: solid;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 20px rgba(32, 201, 151, 0.2);
  color: #20c997;
}

@media (min-width: 768px) {
  .add-pokemon-cell-btn {
    width: calc(25% - 4px);
    max-width: 120px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .add-pokemon-cell-btn {
    width: calc(25% - 2px);
    font-size: 16px;
  }
}

@media (max-width: 320px) {
  .add-pokemon-cell-btn {
    width: calc(25% - 1px);
    font-size: 14px;
  }
}

.drop-zone-clean {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  width: 100%;
  text-align: center;
}

.pokemon-display-area {
  transition: all 0.3s ease;
}

.pokemon-display-area:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.section-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.action-btn {
  color: var(--pokemon-blue);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 2px 0;
}

.action-btn:hover {
  color: #5a7bc8;
  text-decoration: underline;
}

/* New icon button styles */
.icon-btn {
  background: var(--pokemon-blue);
  border: none;
  border-radius: 50%;
  color: white;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.icon-btn:hover {
  background: #5a7bc8;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 92, 168, 0.4);
}

.controls-section {
  background: var(--bs-card-bg, #1e1e1e);
  border: 1px solid var(--bs-border-color, #333);
  border-radius: 10px;
  padding: 15px;
}

/* Hide add-pokemon buttons and action buttons when capturing screenshot */
.screenshot-mode .add-pokemon-cell-btn,
.screenshot-mode .section-actions {
  display: none !important;
}

/* Translucent containers that adapt to background */
.translucent-container {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.translucent-container:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Canvas responsive horizontal, fixed vertical format */
.main-trade-canvas {
  width: 100% !important;
  max-width: 500px !important;
  min-width: 300px !important;
  margin: 0 auto;
  padding: 30px 10px !important;
}

/* Canvas container width matching */
.canvas-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .main-trade-canvas {
    max-width: 500px !important;
    padding: 30px 15px !important;
  }
}

@media (max-width: 480px) {
  .main-trade-canvas {
    padding: 20px 8px !important;
  }
}

@media (max-width: 320px) {
  .main-trade-canvas {
    padding: 15px 5px !important;
  }
}

@media (max-width: 768px) {
  .controls-section {
    padding: 12px;
  }
  
  .controls-section .d-flex {
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }
  
  .action-buttons {
    justify-content: flex-start;
    gap: 6px;
  }
  
  .background-selector {
    flex: 1;
    min-width: 0;
  }
  
  .background-selector h6 {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }
  
  .background-selector .d-flex {
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .controls-section .d-flex {
    gap: 6px;
  }
  
  .action-buttons {
    gap: 4px;
  }
  
  .background-selector .d-flex {
    gap: 3px;
  }
  
  .background-selector h6 {
    font-size: 0.7rem;
  }
  
  .controls-section .d-flex {
    gap: 6px;
  }
  
  .background-selector h6 {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }
}

@media (max-width: 360px) {
  .controls-section .d-flex {
    gap: 4px;
  }
  
  .action-buttons {
    gap: 3px;
  }
  
  .background-selector .d-flex {
    gap: 2px;
  }
  
  .background-selector h6 {
    font-size: 0.65rem;
    margin-bottom: 6px;
  }
  
  .controls-section {
    padding: 8px;
  }
  
  .controls-section .d-flex {
    gap: 4px;
  }
  
  .action-buttons {
    gap: 3px;
  }
  
  .background-selector .d-flex {
    gap: 2px;
  }
  
  .background-selector h6 {
    font-size: 0.65rem;
    margin-bottom: 6px;
  }
  
  .controls-section {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  
  .section-icon {
    width: 18px;
    height: 18px;
  }
}

/* Can Fly Toggle Styling */
#canFlyToggle {
  background-color: #6c757d !important;
  border-color: #adb5bd !important;
}

#canFlyToggle:checked {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

#canFlyToggle:focus {
  border-color: #86b7fe !important;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Canvas controls responsive styling */
.canvas-controls-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.canvas-control-btn {
  white-space: nowrap;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.canvas-control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.canvas-control-btn:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .canvas-control-btn {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
  
  .canvas-control-btn i {
    margin-right: 0.25rem;
  }
}

@media (max-width: 360px) {
  .canvas-control-btn {
    font-size: 0.7rem;
    padding: 4px 6px;
  }
  
  .canvas-control-btn .btn-text {
    display: none;
  }
  
  .canvas-control-btn i {
    margin-right: 0;
  }
}

/* Footer full width override for trade page only */
#shared-footer footer .container {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#shared-footer footer .row {
  margin-left: 15px !important;
  margin-right: 15px !important;
}

/* Tag Filter Buttons */
.tag-filters-container {
  display: flex;
  gap: min(6px, 1vw);
  margin-top: 12px;
  margin-bottom: 8px;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tag-filter-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: min(8px, 2vw);
  color: rgba(255, 255, 255, 0.7);
  padding: min(6px, 1.5vw) min(8px, 2vw);
  font-size: min(11px, 2.8vw);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  backdrop-filter: blur(5px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-filter-btn:hover {
  background: rgba(59, 92, 168, 0.15);
  border-color: rgba(59, 92, 168, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.tag-filter-btn.active {
  background: linear-gradient(135deg, rgba(59, 92, 168, 0.3) 0%, rgba(59, 92, 168, 0.2) 100%);
  border-color: var(--pokemon-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(59, 92, 168, 0.3);
}

@media (max-width: 576px) {
  .tag-filter-btn {
    font-size: 10px;
    padding: 5px 6px;
  }
}

@media (max-width: 400px) {
  .tag-filter-btn {
    font-size: 9px;
    padding: 4px 5px;
  }
}

/* Dynamic Canvas Title Images - Scale both container and content proportionally */
.canvas-title {
  margin: 0 min(10px, 2.5vw) !important;
  max-width: calc(100% - min(20px, 5vw)) !important;
}

.canvas-title .fly-icon-container {
  padding: min(8px, 2vw) !important;
  border-width: min(2px, 0.5vw) !important;
  border-radius: min(12px, 3vw) !important;
}

.canvas-title .fly-icon-container img {
  max-height: min(50px, 10vw) !important;
  max-width: min(50px, 10vw) !important;
  height: auto !important;
  width: auto !important;
}

.canvas-title > img[alt="Pokemon Trade List"] {
  max-height: min(60px, 12vw) !important;
  height: auto !important;
  width: auto !important;
  max-width: 100% !important;
}