.form-actions {
    flex-direction: column;
  }
  
  .deck-actions {
    flex-direction: column;
  }
  
  .action-buttons {
    gap: 1rem;
  }
  
  .btn-primary,/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0c1927 0%, #1a2332 25%, #0f1c2e 50%, #1e2a3a 75%, #0c1927 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #e8f4f8;
  overflow-x: hidden;
}

/* Add ocean-like pattern overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Dashboard Container */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: rgba(15, 28, 46, 0.85);
  overflow: hidden;
  box-shadow: 
    0 0 60px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-top: 75px;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: rgba(12, 25, 39, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
  position: relative;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

.sidebar-header {
  padding: 0 2rem 2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.sidebar-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #10b981, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.nav-menu {
  list-style: none;
  flex: 1;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.nav-item {
  margin-bottom: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  color: #94a3b8;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-item:hover::before {
  left: 100%;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  transform: translateX(8px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.1));
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 
    0 8px 30px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateX(8px);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, #3b82f6, #10b981);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.nav-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 0 1rem;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  margin-top: 2rem;
  padding-top: 2rem;
  position: relative;
  z-index: 1;
}

.btn-logout {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  color: #f87171;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

/* Main Content */
.main-content {
  flex: 1;
  background: rgba(15, 28, 46, 0.5);
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.content-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(12, 25, 39, 0.8);
  backdrop-filter: blur(10px);
  position: relative;
}

.content-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #e8f4f8;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  position: relative;
  z-index: 1;
}

.page-subtitle {
  color: #94a3b8;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(10px);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.user-name {
  font-weight: 600;
  color: #e8f4f8;
}

/* Tab Container */
.tab-container {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

.tab-content {
  display: none;
  width: 100%;
  max-width: 100%;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Overview Tab Styles */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
}

.stats-card,
.quick-actions-card,
.recent-decks-card,
.patreon-card {
  background: rgba(12, 25, 39, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card::before,
.quick-actions-card::before,
.recent-decks-card::before,
.patreon-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.stats-card:hover,
.quick-actions-card:hover,
.recent-decks-card:hover,
.patreon-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-item {
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #10b981, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}

.quick-actions-card h3,
.recent-decks-card h3,
.patreon-card h3 {
  margin-bottom: 2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #e8f4f8;
  position: relative;
  z-index: 1;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

/* Enhanced Button Styles */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-patreon {
  padding: 1.25rem 2rem;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  text-decoration: none;
  border: none;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before,
.btn-outline::before,
.btn-patreon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-outline:hover::before,
.btn-patreon:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b, #475569);
  color: white;
  border: 1px solid rgba(100, 116, 139, 0.3);
  box-shadow: 0 4px 20px rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #475569, #334155);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(100, 116, 139, 0.3);
}

.btn-outline {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 2px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.patreon-actions-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 200000;
    position: relative;
}

.btn-patreon {
  width: 100%;
  background: #ff424d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-patreon:hover {
  background: #e63946;
  transform: translateY(-1px);
}

.btn-patreon.linked {
  background: #007bff;
}

.btn-patreon.linked:hover {
  background: #0056b3;
}

.btn-patreon.active {
  background: #28a745;
}

.btn-patreon.active:hover {
  background: #1e7e34;
}

.patreon-secondary-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.btn-refresh-patreon,
.btn-unlink-patreon {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  color: #495057;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-refresh-patreon:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.btn-unlink-patreon {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-unlink-patreon:hover {
  background: #dc3545;
  color: white;
}

.patreon-status-indicator {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-text {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.last-updated {
  color: #6c757d;
  font-size: 0.8rem;
}

.patreon-status-indicator.active {
  border-left-color: #28a745;
}

.patreon-status-indicator.active .status-text {
  color: #28a745;
}

.patreon-status-indicator.warning {
  border-left-color: #ffc107;
}

.patreon-status-indicator.warning .status-text {
  color: #856404;
}

/* Benefit icon animations */
.benefit-icon {
  transition: all 0.3s ease;
}

.benefit-icon.active {
  color: #28a745;
  transform: scale(1.1);
}

.benefit-icon.inactive {
  color: #dc3545;
}

/* Loading state for buttons */
.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .patreon-secondary-actions {
    flex-direction: column;
  }
}

/* Recent Decks */
.deck-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.deck-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(10px);
}

.deck-item:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: translateX(8px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.deck-name {
  font-weight: 600;
  color: #e8f4f8;
  font-size: 1.1rem;
}

.deck-format {
  font-size: 0.9rem;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Patreon Card */
.patreon-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.patreon-header i {
  font-size: 1.8rem;
  color: #ff424d;
  text-shadow: 0 0 20px rgba(255, 66, 77, 0.5);
}

.patreon-benefits {
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: #94a3b8;
  font-size: 1rem;
}

.benefit-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  flex-shrink: 0;
}

.benefit-icon.inactive {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.benefit-icon.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Decks Tab Styles */
.decks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.decks-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #e8f4f8;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.decks-title p {
  color: #94a3b8;
  font-size: 1.1rem;
}

/* Form Styles */
.deck-creation-form {
  margin-bottom: 2rem;
}

.form-card {
  background: rgba(12, 25, 39, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.form-card h3 {
  margin-bottom: 2rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: #e8f4f8;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #e8f4f8;
  font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1.25rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(15, 28, 46, 0.5);
  color: #e8f4f8;
  backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  background: rgba(15, 28, 46, 0.7);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Deck Editor */
.deck-editor {
  background: rgba(12, 25, 39, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  overflow: hidden;
}

.deck-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(12, 25, 39, 0.9);
  flex-wrap: wrap;
  gap: 1rem;
}

.deck-info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.deck-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e8f4f8;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.deck-format {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.card-count {
  color: #94a3b8;
  font-weight: 500;
  font-size: 1rem;
}

.deck-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.deck-editor-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* Deck Tools */
.deck-tools {
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  background: rgba(15, 28, 46, 0.3);
}

.tool-tabs {
  display: flex;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.tool-tab {
  flex: 1;
  padding: 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #94a3b8;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-bottom: 3px solid transparent;
}

.tool-tab:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.tool-tab.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.tool-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.tool-panel {
  display: none;
  padding: 2rem;
  height: 100%;
  overflow-y: auto;
}

.tool-panel.active {
  display: block;
}

/* Search Tool */
.search-header {
  margin-bottom: 2rem;
}

.search-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-box input {
  flex: 1;
  padding: 1rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(15, 28, 46, 0.5);
  color: #e8f4f8;
  backdrop-filter: blur(10px);
}

.search-box input::placeholder {
  color: #94a3b8;
}

.search-btn {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.filter-options {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.color-filter {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 3px solid rgba(59, 130, 246, 0.2);
  background: rgba(15, 28, 46, 0.5);
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  font-size: 1.1rem;
}

.color-filter[data-color="W"] { 
  border-color: #fbbf24; 
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}
.color-filter[data-color="U"] { 
  border-color: #3b82f6; 
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}
.color-filter[data-color="B"] { 
  border-color: #1f2937; 
  color: #e5e7eb;
  background: rgba(31, 41, 55, 0.3);
}
.color-filter[data-color="R"] { 
  border-color: #ef4444; 
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.color-filter[data-color="G"] { 
  border-color: #10b981; 
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.color-filter.active {
  transform: scale(1.15);
  box-shadow: 0 0 20px currentColor;
}

.search-results {
  height: 400px;
  overflow-y: auto;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  background: rgba(15, 28, 46, 0.3);
  backdrop-filter: blur(10px);
}

/* AI Tool */
.ai-header {
  margin-bottom: 2rem;
}

.ai-header h4 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e8f4f8;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.ai-header p {
  color: #94a3b8;
  font-size: 1rem;
}

.ai-content textarea {
  width: 100%;
  height: 180px;
  padding: 1.5rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1.5rem;
  background: rgba(15, 28, 46, 0.5);
  color: #e8f4f8;
  backdrop-filter: blur(10px);
}

.ai-content textarea::placeholder {
  color: #94a3b8;
}

.ai-options {
  margin-bottom: 2rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.checkbox-label:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #3b82f6;
}

/* Import Tool */
.import-header {
  margin-bottom: 2rem;
}

.import-header h4 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e8f4f8;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.import-header p {
  color: #94a3b8;
  font-size: 1rem;
}

.import-content textarea {
  width: 100%;
  height: 220px;
  padding: 1.5rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: rgba(15, 28, 46, 0.5);
  color: #e8f4f8;
  backdrop-filter: blur(10px);
}

.import-content textarea::placeholder {
  color: #94a3b8;
}

.import-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Current Deck Display */
.current-deck {
  padding: 2rem;
  overflow-y: auto;
  background: rgba(15, 28, 46, 0.2);
}

.deck-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Deck Grid */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
}

.deck-card {
  background: rgba(12, 25, 39, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.deck-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.deck-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.deck-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.deck-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e8f4f8;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.deck-card-format {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.deck-card-stats {
  color: #94a3b8;
  margin-bottom: 2rem;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.deck-card-actions {
  display: flex;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.deck-card-actions button {
  flex: 1;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
}

/* Collection Tab Styles */
.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.collection-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #e8f4f8;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.collection-title p {
  color: #94a3b8;
  font-size: 1.1rem;
}

.collection-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  padding: 1rem 1.5rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(10px);
}

.stat .stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #3b82f6;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.stat .stat-label {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.collection-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.collection-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.collection-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.collection-filters input,
.collection-filters select {
  padding: 1rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  font-size: 0.95rem;
  background: rgba(15, 28, 46, 0.5);
  color: #e8f4f8;
  backdrop-filter: blur(10px);
}

.collection-filters input::placeholder {
  color: #94a3b8;
}



/* Profile Tab Styles */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
}

.profile-header {
  margin-bottom: 3rem;
  text-align: center;
}

.profile-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #e8f4f8;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.profile-header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.profile-section {
  background: rgba(12, 25, 39, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.profile-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.profile-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e8f4f8;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.avatar-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 1.5rem;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.avatar-selection input[type="radio"] {
  display: none;
}

.avatar-selection label {
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(59, 130, 246, 0.1);
  backdrop-filter: blur(10px);
  width: 100px;
}

.avatar-selection label:hover {
  transform: scale(1.1);
  border-color: rgba(59, 130, 246, 0.5);
}

.avatar-selection input[type="radio"]:checked + label {
  border-color: #3b82f6;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  transform: scale(1.05);
}

.avatar-selection img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  display: block;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.social-links .form-group label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.social-links .form-group label i {
  font-size: 1.4rem;
  width: 24px;
  text-align: center;
}

.api-settings .form-group {
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.api-key-input {
  display: flex;
  gap: 0.75rem;
}

.api-key-input input {
  flex: 1;
}

.toggle-visibility {
  padding: 1rem 1.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  cursor: pointer;
  color: #3b82f6;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.toggle-visibility:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.help-text {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

.profile-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  padding-top: 2rem;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 25, 39, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.loading-content {
  background: rgba(12, 25, 39, 0.95);
  padding: 3rem;
  border-radius: 24px;
  text-align: center;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(20px);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
  position: relative;
}

.spinner::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid transparent;
  border-top: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: 50%;
  animation: spin 2s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loadingMessage {
  color: #e8f4f8;
  font-weight: 500;
  font-size: 1.1rem;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 25, 39, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  backdrop-filter: blur(10px);
}

.modal {
  background: rgba(12, 25, 39, 0.95);
  border-radius: 24px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(20px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-header h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #e8f4f8;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #94a3b8;
  padding: 0.75rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  transform: scale(1.1);
}

.modal-content {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
  color: #e8f4f8;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 28, 46, 0.5);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 6px;
  border: 2px solid rgba(15, 28, 46, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2563eb, #1e40af);
}

/* Custom scrollbar for Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 rgba(15, 28, 46, 0.5);
}

/* Enhanced Focus Styles */
*:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Glass morphism effects for hover states */
.nav-item:hover,
.deck-item:hover,
.deck-card:hover {
  backdrop-filter: blur(25px);
}

/* Special effects for premium features */
.patreon-card {
  position: relative;
  overflow: hidden;
}

.patreon-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 66, 77, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.patreon-card:hover::after {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: rotate(45deg) translateX(-100%);
  }
  100% {
    transform: rotate(45deg) translateX(100%);
  }
}

/* Card reveal animations */
.deck-card,
.stats-card,
.quick-actions-card,
.recent-decks-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardReveal 0.6s ease forwards;
}

.deck-card:nth-child(1) { animation-delay: 0.1s; }
.deck-card:nth-child(2) { animation-delay: 0.2s; }
.deck-card:nth-child(3) { animation-delay: 0.3s; }
.deck-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced button interactions */
.btn-primary:active,
.btn-secondary:active,
.btn-outline:active,
.btn-patreon:active {
  transform: translateY(-1px);
}

/* Empty state messages */
.search-results:empty::before {
  content: 'Start typing to search for cards...';
  color: #94a3b8;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.collection-grid:empty::before {
  content: 'Your collection is empty. Start adding cards!';
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  grid-column: 1 / -1;
  padding: 3rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 16px;
  border: 2px dashed rgba(59, 130, 246, 0.2);
}

.deck-grid:empty::before {
  content: 'No decks found. Create your first deck to get started!';
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  grid-column: 1 / -1;
  padding: 3rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 16px;
  border: 2px dashed rgba(59, 130, 246, 0.2);
}

/* Mobile-First Responsive Design */
@media (max-width: 1024px) {
   .commander-header {
       flex-direction: column;
   } 
    
  /* Reset dashboard container for mobile */
  .dashboard-container {
    flex-direction: column;
    width: 100vw;
    min-height: 100vh;
    margin-top: 75px; /* Remove the 75px margin that pushes content down */
    overflow-x: hidden;
    position: relative;
  }
  
  /* Main content adjustments */
  .main-content {
    flex: 1;
    width: 100%;
    padding-bottom: 90px; /* Space for bottom navigation */
    order: 1;
    min-height: calc(100vh - 90px);
    overflow-x: hidden;
  }
  
  /* Tab container mobile fixes */
  .tab-container {
    padding: 1rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Sidebar converted to bottom navigation */
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    min-width: 100vw;
    height: auto;
    flex-direction: row;
    padding: 0.75rem 0;
    order: 2;
    z-index: 1000;
    border-right: none;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
    background: rgba(12, 25, 39, 0.98);
  }
  
  /* Hide sidebar header on mobile */
  .sidebar-header {
    display: none;
  }
  
  /* Mobile navigation menu */
  .nav-menu {
    display: flex;
    flex: 1;
    padding: 0 0.5rem;
    justify-content: space-around;
    margin: 0;
    align-items: center;
  }
  
  /* Navigation items for mobile */
  .nav-item {
    flex: 1;
    margin: 0 0.25rem;
    padding: 0.5rem 0.25rem;
    text-align: center;
    flex-direction: column;
    gap: 0.25rem;
    border-radius: 12px;
    min-height: auto;
    transform: none !important;
    max-width: 80px;
  }
  
  .nav-item:hover {
    transform: none !important;
  }
  
  .nav-item.active {
    transform: none !important;
    background: rgba(59, 130, 246, 0.2);
  }
  
  .nav-item.active::after {
    display: none;
  }
  
  .nav-item span {
    font-size: 0.7rem;
    line-height: 1;
    font-weight: 500;
  }
  
  .nav-item i {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
  
  /* Mobile sidebar footer (logout button) */
  .sidebar-footer {
    border: none;
    margin: 0;
    padding: 0 0.5rem;
    border-left: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
    width: auto;
  }
  
  .btn-logout {
    padding: 0.5rem 0.25rem;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7rem;
    width: auto;
    height: auto;
    min-width: 60px;
  }
  
  .btn-logout span {
    font-size: 0.7rem;
  }
  
  .btn-logout i {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
  
  /* Overview grid mobile */
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
  }
  
  /* Stats card mobile */
  .stats-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .user-profile-section {
    padding: 1rem;
    gap: 0.75rem;
    flex-direction: row; /* Keep horizontal on mobile */
    align-items: center;
  }
  
  .user-profile-avatar {
    width: 48px;
    height: 48px;
  }
  
  .user-display-name {
    font-size: 1.1rem;
  }
  
  /* Stats grid mobile */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  
  .stat-item {
    padding: 1rem 0.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  /* Patreon status mobile */
  .patreon-status-overview {
    margin-top: 1rem;
    padding: 1rem;
  }
  
  .patreon-status-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  /* Deck editor mobile */
  .deck-editor-content {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .deck-tools {
    border-right: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    max-height: none;
  }

  .tool-tabs {
    flex-wrap: nowrap;
    flex-direction: row;
  }

  .deck-card-actions {
    flex-direction: column;
  }

  #overview {
      padding-top: 10px;
  }

  .tool-tab {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  .tool-tab i {
    font-size: 0.85rem;
  }

  .tool-panel {
    padding: 1rem;
    max-height: none;
    overflow-y: visible;
  }

  .tool-content {
    overflow: visible;
  }

  /* AI panel mobile - clean compact layout */
  .ai-header {
    margin-bottom: 1rem;
  }

  .ai-header h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }

  .ai-header p {
    font-size: 0.85rem;
  }

  .ai-content textarea {
    height: 100px;
    padding: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
  }

  .ai-options {
    margin-bottom: 1rem;
  }

  .ai-mode-info {
    font-size: 0.85rem;
  }

  .ai-mode-info .mode-standard,
  .ai-mode-info .mode-collection {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .checkbox-label {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  /* Import panel mobile */
  .import-header {
    margin-bottom: 1rem;
  }

  .import-header h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }

  .import-header p {
    font-size: 0.85rem;
  }

  .import-content textarea {
    height: 100px;
    padding: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }

  /* Search panel mobile */
  .search-header {
    margin-bottom: 1rem;
  }

  .search-box {
    margin-bottom: 0.75rem;
  }

  .search-box input {
    padding: 0.75rem;
    font-size: 0.95rem;
  }

  .search-btn {
    padding: 0.75rem 1rem;
  }
  
  /* Deck header mobile */
  .decks-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .deck-editor-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1rem;
  }

  .deck-info {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .deck-info h2 {
    font-size: 1.1rem;
  }

  .deck-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .deck-actions button {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .deck-actions .btn-secondary {
    flex-basis: 100%;
  }
  
  /* Form actions mobile */
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .action-buttons {
    gap: 1rem;
  }
  
  /* Collection tools mobile */
  .collection-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  
  .collection-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .collection-filters {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .collection-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .collection-stats {
    justify-content: center;
    gap: 1rem;
  }
  
  /* Profile mobile */
  .social-links {
    grid-template-columns: 1fr;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  /* Deck grid mobile */
  .deck-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  
  /* Card list items mobile */
  .card-list-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1rem;
  }
  
  .card-info {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: center;
  }
  
  .card-image {
    width: 80px;
    height: 112px;
  }
  
  .card-actions {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    flex-direction: column;
  }
  
  .card-name {
    white-space: normal;
    text-align: center;
    word-break: break-word;
  }
  
  /* Button improvements for mobile */
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-patreon {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }
  
  /* Patreon actions mobile */
  .patreon-secondary-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn-refresh-patreon,
  .btn-unlink-patreon {
    width: 100%;
    justify-content: center;
  }
  
  /* Modal mobile */
  .modal {
    width: 95%;
    max-width: 95vw;
    margin: 1rem;
  }
  
  .modal-header {
    padding: 1.5rem;
  }
  
  .modal-content {
    padding: 1.5rem;
    max-height: calc(90vh - 120px);
  }
  
  /* Search results mobile */
  .search-results {
    height: 250px;
    padding: 1rem;
  }
  
  /* Filter options mobile */
  .filter-options {
    gap: 0.5rem;
    justify-content: center;
  }
  
  .color-filter {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  /* Import and AI tools mobile */
  .ai-content textarea,
  .import-content textarea {
    height: 120px;
    padding: 1rem;
  }
  
  .import-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* Avatar selection mobile */
  .avatar-selection {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-items: center;
  }
  
  .avatar-selection label,
  .avatar-selection img {
    width: 70px;
    height: 70px;
  }
  
  /* Prevent horizontal scroll */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Hide overflow on body for mobile */
  body {
    overflow-x: hidden;
    width: 100vw;
  }
  
  /* Ensure no elements extend beyond viewport */
  .dashboard-container,
  .main-content,
  .tab-container,
  .overview-grid > *,
  .stats-card,
  .quick-actions-card,
  .recent-decks-card,
  .patreon-card {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .tab-container {
    padding: 0.75rem;
  }
  
  .stats-card,
  .quick-actions-card,
  .recent-decks-card,
  .patreon-card {
    padding: 1.5rem 1rem;
  }
  
  .user-profile-section {
    padding: 0.75rem;
    flex-direction: column;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .stat-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .nav-item span {
    font-size: 0.65rem;
  }
  
  .btn-logout span {
    display: none;
  }
  
  .deck-editor-header {
    padding: 1rem;
  }
  
  .form-card {
    padding: 1.5rem 1rem;
  }
}

/* Card Display Section - Ocean Theme Integration */

/* Card Type Section Headers */
.card-type-section {
  margin-bottom: 2rem;
  background: rgba(12, 25, 39, 0.6);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(10px);
}

.card-type-section h4 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.1));
  padding: 1.25rem 1.75rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e8f4f8;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.card-type-section h4::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Card List Container */
.card-list {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.commander-section .card-list {
    padding: 0;
}

/* Individual Card List Items */
.card-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(12, 25, 39, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.card-list-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.card-list-item:hover {
  transform: translateX(8px);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 
    0 8px 30px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Card Image */
.card-image {
  width: 145px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.card-list-item:hover .card-image {
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(59, 130, 246, 0.4),
    0 0 20px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

/* Card Info Section */
.card-info {
  flex: 1;
  display: flex;
  align-items: left;
  gap: 1rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.card-quantity {
    font-weight: 700;
    color: #3b82f6;
    min-width: 35px;
    font-size: 1.1rem;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    text-align: center;
}

.card-name {
  font-weight: 600;
  color: #e8f4f8;
  flex: 1;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  flex-direction: column;
}

.card-actions button {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  min-width: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card-actions button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.3s ease;
}

.card-actions button:hover::before {
  left: 100%;
}

.card-actions button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.card-actions button:active {
  transform: translateY(0);
}

/* Danger Button (Remove) */
.btn-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3) !important;
}

/* Empty State for Card Lists */
.card-list:empty::before {
  content: 'No cards in this category yet. Add some cards to get started!';
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 12px;
  border: 2px dashed rgba(59, 130, 246, 0.2);
  display: block;
}

/* Card Type Icons (optional enhancement) */
.card-type-section h4::after {
  content: '';
  position: absolute;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.6;
}

/* Different backgrounds for different card types */
.card-type-section:nth-child(1) h4 {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.1));
}

.card-type-section:nth-child(2) h4 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
}

.card-type-section:nth-child(3) h4 {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.1));
}

.card-type-section:nth-child(4) h4 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
}

.card-type-section:nth-child(5) h4 {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-list-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .card-info {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  
  .card-image {
    width: 80px;
    height: 112px;
  }
  
  .card-actions {
    justify-content: center;
    width: 100%;
    flex-direction: row;
  }
  
  .card-name {
    white-space: normal;
    text-align: center;
  }
}

/* Scroll styling for card lists */
.card-list {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 rgba(15, 28, 46, 0.5);
}

.card-list::-webkit-scrollbar {
  width: 8px;
}

.card-list::-webkit-scrollbar-track {
  background: rgba(15, 28, 46, 0.5);
  border-radius: 4px;
}

.card-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 4px;
  border: 1px solid rgba(15, 28, 46, 0.3);
}

.card-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2563eb, #1e40af);
}





.stats-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 0;
  color: white;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  overflow: hidden;
  position: relative;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.15) 0%, 
    rgba(0, 0, 0, 0.05) 50%, 
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}


.user-profile-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.user-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.user-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.user-profile-avatar:hover {
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.user-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #4ade80;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-profile-info {
  flex: 1;
  min-width: 0;
}

.user-display-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}

.user-welcome-text {
  margin: 0 0 0.75rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.view-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.view-profile-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
}

.stat-item {
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: rgba(255, 255, 255, 0.2);
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .user-profile-section {
    padding: 1rem;
    gap: 0.75rem;
    flex-direction: column;
  }
  
  .user-profile-avatar {
    width: 48px;
    height: 48px;
  }
  
  .user-display-name {
    font-size: 1.1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .stat-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
}

/* Loading states */
.user-profile-avatar.loading {
  opacity: 0.6;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

/* Premium user indicator */
.user-profile-section.premium .user-status-indicator {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.user-profile-section.premium .user-profile-avatar {
  border-color: rgba(255, 215, 0, 0.6);
}


.user-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border: 2px solid white;
    border-radius: 50%;
}





/* Updated Patreon Status Overview Styles - Status Only */
.patreon-status-overview {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
}

.patreon-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.patreon-status-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.patreon-status-title i {
  font-size: 1.2em;
  color: #ff424d;
}

.patreon-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.patreon-status-badge.not-linked {
  background: #f8d7da;
  color: #721c24;
}

.patreon-status-badge.linked {
  background: #fff3cd;
  color: #856404;
}

.patreon-status-badge.active {
  background: #d4edda;
  color: #155724;
}

.patreon-status-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.status-label {
color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.status-value {
  font-weight: 600;
  color: #333;
}

.status-value.status-linked {
  color: #28a745;
}

.status-value.status-active {
  color: #28a745;
}

.status-value.status-inactive {
  color: #dc3545;
}

.status-value.status-warning {
  color: #ffc107;
}

.patreon-status-note {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .patreon-status-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}













/* Enhanced Card List Item Structure - ADD THESE TO YOUR EXISTING CSS */

/* Update the existing card-info to be a flex column */
.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* Card header - contains quantity, name, and mana cost */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Type line styling */
.card-type-line {
  color: #94a3b8;
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

/* Oracle text container
.card-oracle-text {
  background: rgba(15, 28, 46, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 3px solid #3b82f6;
  padding: 0.75rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #e8f4f8;
  backdrop-filter: blur(10px);
} */

/* Oracle text paragraphs */
.oracle-paragraph {
  margin: 0 0 0.5rem 0;
}

.oracle-paragraph:last-child {
  margin-bottom: 0;
}

/* Keyword highlighting */
.keyword {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Reminder text styling */
.reminder-text {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.9em;
}

/* Card stats container */
.card-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

/* Power/toughness styling */
.power-toughness {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Price styling */
.card-price {
  color: #10b981;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Commander specific styling */
.commander-card .power-toughness {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.3);
}

.commander-card .keyword {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.3);
}

/* Mobile responsiveness for the new structure */
@media (max-width: 768px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .card-oracle-text {
    font-size: 0.8rem;
    padding: 0.6rem;
  }
  
  .card-stats {
    gap: 0.75rem;
    justify-content: flex-start;
  }
  
  .power-toughness,
  .card-price {
    font-size: 0.85rem;
  }
}



/* Mana symbol images */
.mana-symbol {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin: 0 1px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Mana cost container - simplified */
.card-mana-cost {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* Remove the separate mana-info container and card-colors */
.card-mana-info {
  display: none; /* Remove this since we're not using it anymore */
}

.card-colors {
  display: none; /* Remove this since we're not using it anymore */
}

/* Commander mana cost styling */
.commander-card .card-mana-cost {
  background: rgba(26, 32, 46, 0.9);
  border-color: rgba(255, 215, 0, 0.3);
}

.commander-card .mana-symbol {
  width: 18px;
  height: 18px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .mana-symbol {
    width: 14px;
    height: 14px;
  }
  
  .card-mana-cost {
    padding: 0px;
  }
}


 .commander-card {
            border: 2px solid #ffd700 !important;
            background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%) !important;
            position: relative;
        }
        .commander-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ffd700;
            color: #333;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            border: 2px solid white;
        }
        .commander-section {
            margin-bottom: 2rem;
            padding: 1rem;
            background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
            border: 2px solid #ffd700;
            border-radius: 12px;
            color: #212121;
        }
        .commander-section .card-list {
            padding: 0;
        }
        .commander-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        .commander-title {
            color: #b8860b;
            font-weight: bold;
            font-size: 1.1em;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .select-commander-btn {
            background: #ffd700;
            color: #333;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .select-commander-btn:hover {
            background: #ffed4e;
            transform: translateY(-1px);
        }
        
        /* Commander card specific styling */
        .commander-card .card-name {
            color: #8b4513;
            font-weight: 600;
        }
        
        /* Commander card mana cost */
        .commander-card .card-mana-cost {
            background: #fff2cc;
            color: #8b4513;
            border: 1px solid #ffd700;
        }
        
        .btn-commander {
            background: #ffd700;
            color: #333;
            border-color: #ffd700;
        }
        .btn-commander:hover {
            background: #ffed4e;
            color: #333;
        }
        
        
/* Search Results Styling - ADD TO YOUR CSS FILE */

/* No results message */
.search-no-results {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 2rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(59, 130, 246, 0.2);
    margin: 1rem 0;
}

/* Search result card container */
.search-result-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(12, 25, 39, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 1rem;
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.search-result-card:hover {
    transform: translateX(8px);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 8px 30px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Search card image */
.search-card-image {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.search-result-card:hover .search-card-image {
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(59, 130, 246, 0.4),
        0 0 20px rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

/* Search card details container */
.search-card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Search card header */
.search-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Search card name */
.search-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #e8f4f8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Search card mana cost */
.search-card-mana {
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* Search card type */
.search-card-type {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}

/* Search card oracle text */
.search-card-text {
    background: rgba(15, 28, 46, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #e8f4f8;
    backdrop-filter: blur(10px);
    max-height: 80px;
    overflow-y: auto;
}

/* Search card footer */
.search-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    flex-wrap: wrap;
}

/* Search card power/toughness */
.search-card-pt {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Search card price */
.search-card-price {
    color: #10b981;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Add to deck button */
.btn-add-to-deck {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-add-to-deck::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s ease;
}

.btn-add-to-deck:hover::before {
    left: 100%;
}

.btn-add-to-deck:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-add-to-deck:active {
    transform: translateY(0);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .search-result-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem 0.75rem;
    }
    
    .search-card-image {
        width: 80px;
        height: 112px;
        align-self: center;
    }
    
    .search-card-header {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .search-card-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .btn-add-to-deck {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .search-card-text {
        max-height: 60px;
        font-size: 0.75rem;
    }
    
    .search-card-name {
        font-size: 0.9rem;
    }
}


/* List View Styles - Ocean Theme Compatible */
.deck-categories.list-view .card-list {
  display: block;
}

/* Hide detailed view items when in list view */
.deck-categories.list-view .card-list-item.detailed-view-item {
  display: none;
}

/* Hide list view items when in detailed view */
.deck-categories.detailed-view .card-list-item.list-view-item {
  display: none;
}

/* List view item styling - maintains ocean theme */
.deck-categories.list-view .card-list-item.list-view-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(12, 25, 39, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.deck-categories.list-view .card-list-item.list-view-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.deck-categories.list-view .card-list-item.list-view-item:hover {
  transform: translateX(4px);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 
    0 4px 20px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* List item content container */
.list-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* List view card quantity */
.list-item-content .card-quantity {
  font-weight: 700;
  color: #3b82f6;
  min-width: 2.5rem;
  text-align: center;
  font-size: 1rem;
  text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* List view card name */
.list-item-content .card-name {
  font-weight: 600;
  color: #e8f4f8;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* List view mana cost */
.list-item-content .card-mana-cost {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem 0.5rem;
  background: rgba(15, 28, 46, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* List view card colors */
.list-item-content .card-colors {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem 0.5rem;
  background: rgba(15, 28, 46, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* List view card price */
.list-item-content .card-price {
  color: #10b981;
  font-weight: 600;
  min-width: 3rem;
  text-align: right;
  font-size: 0.9rem;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Small mana symbols for list view */
.mana-symbol-small {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Commander list view styling - enhanced golden theme */
.deck-categories.list-view .commander-card.list-view-item {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 78, 0.1));
  border: 2px solid rgba(255, 215, 0, 0.5);
  font-weight: 500;
}

.deck-categories.list-view .commander-card.list-view-item:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 78, 0.2));
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 
    0 4px 20px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Commander indicator in list view */
.commander-indicator {
  font-size: 1.2em;
  margin-right: 0.5rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Commander card elements in list view */
.deck-categories.list-view .commander-card.list-view-item .card-name {
  color: #212121;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.deck-categories.list-view .commander-card.list-view-item .card-mana-cost {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
}

.deck-categories.list-view .commander-card.list-view-item .card-colors {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
}

/* Toggle button styling - matches theme */
#toggleDeckView {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  cursor: pointer;
  color: #3b82f6;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

#toggleDeckView::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.3s ease;
}

#toggleDeckView:hover::before {
  left: 100%;
}

#toggleDeckView:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

/* Card actions in list view - keep them compact */
.deck-categories.list-view .card-actions {
  display: flex;
  gap: 0.25rem;
  position: relative;
  z-index: 1;
  flex-direction: row;
}

.deck-categories.list-view .card-actions button {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.deck-categories.list-view .card-actions button:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.deck-categories.list-view .card-actions .btn-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

.deck-categories.list-view .card-actions .btn-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

.deck-categories.list-view .card-list-item .card-actions {
  flex-direction: row !important;
}



/* Responsive adjustments for list view */
@media (max-width: 768px) {
  /* Card item: 3-row stacked layout on mobile */
  .deck-categories.list-view .card-list-item.list-view-item {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.35rem;
    gap: 0.35rem;
  }

  /* Row 1: quantity + name */
  .list-item-content {
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: unset;
  }

  .list-item-content .card-quantity {
    min-width: auto;
    font-size: 0.8rem;
    padding: 0.15rem 0.35rem;
    flex-shrink: 0;
  }

  .list-item-content .card-name {
    font-size: 0.95rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
    flex: 1 1 0;
    min-width: 60%;
  }

  /* Row 2: mana + price — push to their own line */
  .list-item-content .card-mana-cost,
  .list-item-content .card-colors {
    padding: 0.15rem 0.3rem;
    flex-shrink: 0;
    order: 10;
  }

  .list-item-content .card-price {
    font-size: 0.8rem;
    min-width: auto;
    padding: 0.15rem 0.35rem;
    flex-shrink: 0;
    order: 11;
    margin-left: auto;
  }

  .mana-symbol-small {
    width: 13px;
    height: 13px;
  }

  /* Row 3: action buttons */
  .deck-categories.list-view .card-actions {
    gap: 0.3rem;
    justify-content: center;
  }

  .deck-categories.list-view .card-actions button {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    min-width: 28px;
  }

  /* Tighter category sections */
  .card-type-section {
    margin-bottom: 1rem;
  }

  .card-type-section h4 {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .card-list {
    padding: 0.5rem;
    gap: 0;
  }
}


/* Updated deck-info structure for better layout */
.deck-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.deck-name-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.deck-name-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* AI Generate Name Button - Purple Gradient with AI Theme */
.btn-generate-name {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
  color: white;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 
    0 4px 12px rgba(139, 92, 246, 0.2),
    0 2px 4px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  align-self: flex-start;
  min-width: 160px;
}

/* Shimmer effect for AI theme */
.btn-generate-name::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.6s ease;
}

.btn-generate-name:hover::before {
  left: 100%;
}

.btn-generate-name:hover {
  background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #d8b4fe 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(139, 92, 246, 0.3),
    0 4px 8px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(168, 85, 247, 0.5);
}

.btn-generate-name:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 12px rgba(139, 92, 246, 0.2),
    0 2px 4px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Loading state */
.btn-generate-name.loading {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  cursor: not-allowed;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.7);
}

.btn-generate-name.loading::before {
  display: none;
}

/* AI Stars animation for the icon */
.btn-generate-name i {
  font-size: 1.1em;
  position: relative;
}

.btn-generate-name:not(.loading) i {
  animation: aiPulse 2s ease-in-out infinite;
}

.btn-generate-name.loading i {
  animation: aiSpin 1.5s linear infinite;
}

/* AI-themed animations */
@keyframes aiPulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.6));
  }
  50% { 
    transform: scale(1.1);
    opacity: 0.9;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8));
  }
}

@keyframes aiSpin {
  from { 
    transform: rotate(0deg);
  }
  to { 
    transform: rotate(360deg);
  }
}

/* Success state for when name is generated */
.btn-generate-name.success {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  }
  100% { 
    transform: scale(1);
  }
}

/* Add some spacing and styling for the deck meta info */
.deck-meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.deck-format,
.card-count {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .deck-name-container {
    gap: 8px;
  }
  
  .btn-generate-name {
    padding: 8px 12px;
    font-size: 0.8em;
    min-width: 140px;
    align-self: stretch;
  }
  
  .btn-generate-name span {
    font-size: 0.85em;
  }
  
  .deck-meta-info {
    gap: 12px;
  }
}

@media (max-width: 480px) {

  .btn-generate-name {
    min-width: 44px;
    padding: 8px;
    align-self: flex-start;
  }
}





















/* Enhanced Deck Editor Header with Dynamic Background */
.deck-editor-header {
  position: relative;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow: hidden;
  transition: all 0.5s ease;
}

/* Dynamic background overlay */
.deck-editor-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.85) 0%,
    rgba(51, 65, 85, 0.7) 50%,
    rgba(15, 23, 42, 0.9) 100%
  );
  z-index: 1;
}

/* Additional overlay for better text readability */
.deck-editor-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  z-index: 2;
}

/* Ensure content is above overlays */
.deck-editor-header > * {
  position: relative;
  z-index: 3;
}

/* Updated deck-info structure for better layout */
.deck-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.deck-name-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.deck-name-header h2 {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.025em;
}

/* AI Generate Name Button - Purple Gradient with AI Theme */
.btn-generate-name {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
  color: white;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 
    0 4px 12px rgba(139, 92, 246, 0.2),
    0 2px 4px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  align-self: flex-start;
  min-width: 160px;
}

/* Shimmer effect for AI theme */
.btn-generate-name::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.6s ease;
}

.btn-generate-name:hover::before {
  left: 100%;
}

.btn-generate-name:hover {
  background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #d8b4fe 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(139, 92, 246, 0.3),
    0 4px 8px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(168, 85, 247, 0.5);
}

.btn-generate-name:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 12px rgba(139, 92, 246, 0.2),
    0 2px 4px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Loading state */
.btn-generate-name.loading {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  cursor: not-allowed;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.7);
}

.btn-generate-name.loading::before {
  display: none;
}

/* AI Stars animation for the icon */
.btn-generate-name i {
  font-size: 1.1em;
  position: relative;
}

.btn-generate-name:not(.loading) i {
  animation: aiPulse 2s ease-in-out infinite;
}

.btn-generate-name.loading i {
  animation: aiSpin 1.5s linear infinite;
}

/* AI-themed animations */
@keyframes aiPulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.6));
  }
  50% { 
    transform: scale(1.1);
    opacity: 0.9;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8));
  }
}

@keyframes aiSpin {
  from { 
    transform: rotate(0deg);
  }
  to { 
    transform: rotate(360deg);
  }
}

/* Success state for when name is generated */
.btn-generate-name.success {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  }
  100% { 
    transform: scale(1);
  }
}

/* Add some spacing and styling for the deck meta info */
.deck-meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
/* Deck Actions - positioned relative to content */
.deck-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.deck-actions button {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  min-width: 225px;
}

/* Default backgrounds for different deck types */
.deck-editor-header.commander-deck {
  background-image: 
    linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(51, 65, 85, 0.7) 50%, rgba(15, 23, 42, 0.9) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="20" fill="%23f59e0b" opacity="0.1"/></svg>');
}

.deck-editor-header.standard-deck {
  background-image: 
    linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(51, 65, 85, 0.7) 50%, rgba(15, 23, 42, 0.9) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="25" y="25" width="50" height="50" fill="%2306b6d4" opacity="0.1"/></svg>');
}

.deck-editor-header.modern-deck {
  background-image: 
    linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(51, 65, 85, 0.7) 50%, rgba(15, 23, 42, 0.9) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 85,75 15,75" fill="%23ef4444" opacity="0.1"/></svg>');
}

/* Loading state for background */
.deck-editor-header.loading-background::before {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(51, 65, 85, 0.9) 50%,
    rgba(15, 23, 42, 0.95) 100%
  );
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .deck-editor-header {
    padding: 1.5rem;
  }
  
  .deck-name-header h2 {
    font-size: 2rem;
  }
  
  .deck-name-container {
    gap: 8px;
  }
  
  .btn-generate-name {
    padding: 8px 12px;
    font-size: 0.8em;
    min-width: 140px;
    align-self: stretch;
  }
  
  .btn-generate-name span {
    font-size: 0.85em;
  }
  
  .deck-meta-info {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .deck-editor-header {
    padding: 1rem;
  }
  
  .deck-name-header h2 {
    font-size: 1.75rem;
  }
  
  .btn-generate-name span {
    display: none; /* Hide text on very small screens, show only icon */
  }
  
  .btn-generate-name {
    min-width: 44px;
    padding: 8px;
    align-self: flex-start;
  }
  
  .deck-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .deck-actions button {
    width: 100%;
    justify-content: center;
  }
}




















/* Collection Grid Layout */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Individual Collection Card */
.collection-card {
  background: #2c3e50;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  display: flex;
  flex-direction: column;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: #667eea;
}

/* Card Image */
.collection-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

.collection-card:hover img {
  transform: scale(1.05);
}

/* Card Info Section */
.collection-card .card-info {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.collection-card .card-info h5 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.4em;
}

.collection-card .card-info p {
  font-size: 0.75rem;
  margin: 0.25rem 0;
  color: #bdc3c7;
}

.collection-card .card-info .card-price {
  font-weight: 600;
  color: #27ae60;
  font-size: 0.8rem;
}

.collection-card .card-info .card-price::before {
  content: '$';
}

/* Card Actions */
.collection-card .card-actions {
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Quantity Controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.25rem 0.5rem;
}

.quantity-btn {
  background: #667eea;
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: #5a67d8;
  transform: scale(1.1);
}

.quantity-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.quantity-display {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.8rem;
}

/* Remove Button */
.remove-btn {
  background: #e74c3c;
  border: none;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.remove-btn:hover {
  background: #c0392b;
  transform: scale(1.05);
}

.remove-btn i {
  font-size: 0.6rem;
}

/* Empty State */
.collection-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #7f8c8d;
}

.collection-empty h3 {
  color: #bdc3c7;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.collection-empty p {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .collection-card img {
    height: 140px;
  }
  
  .collection-card .card-info h5 {
    font-size: 0.8rem;
  }
  
  .collection-card .card-info p {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  
  .collection-card img {
    height: 120px;
  }
  
  .collection-card .card-actions {
    padding: 0.375rem 0.5rem;
  }
  
  .quantity-controls {
    gap: 0.375rem;
    padding: 0.2rem 0.375rem;
  }
  
  .quantity-btn {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
}

/* Loading State */
.collection-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.collection-card.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}





/* Collection option styling */
.collection-option {
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.checkbox-label input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-label span {
  font-weight: 500;
}

/* Collection status indicator */
.collection-status {
  padding: 8px 12px;
  border-radius: 4px;
  background: #e9ecef;
  border-left: 3px solid #6c757d;
  font-size: 0.9em;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.collection-status.has-cards {
  background: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

.collection-status.empty {
  background: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.collection-status a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.collection-status a:hover {
  text-decoration: none;
}

/* AI mode info styling */
.ai-mode-info {
  padding: 12px;
  margin-top: 12px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.mode-standard, .mode-collection {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

/* Generate button loading state */
.generate-loading {
  opacity: 0.7;
  pointer-events: none;
}

.generate-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Collection tooltip styling */
.collection-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.collection-tooltip .tooltiptext {
  visibility: hidden;
  width: 250px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -125px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85em;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.collection-tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.collection-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Enhanced AI prompt textarea for collection mode */
#aiPrompt.collection-mode {
  border-left: 3px solid #28a745;
}

/* Collection mode button styling */
.btn-primary.collection-mode {
  background: linear-gradient(135deg, #28a745, #20c997);
  border-color: #28a745;
}

.btn-primary.collection-mode:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  border-color: #1e7e34;
}








/* Timer-specific styles */
#resetTimer {
  display: inline-block;
  font-size: 0.75rem !important;
  color: #ff6b6b !important;
  font-weight: 600;
  background: rgba(255, 107, 107, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  margin-top: 0.25rem;
  animation: pulse-glow 2s ease-in-out infinite alternate;
  backdrop-filter: blur(5px);
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
  min-width: 80px;
  text-align: center;
}

/* Pulse glow animation for timer */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.1);
  }
  100% {
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
    background: rgba(255, 107, 107, 0.2);
  }
}


/* Timer countdown specific styling */
.timer-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.timer-countdown .timer-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.125rem;
}

.timer-countdown .timer-value {
  font-size: 0.75rem;
  color: #ff6b6b;
  font-weight: 600;
  background: rgba(255, 107, 107, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  min-width: 80px;
  text-align: center;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
    min-height: 2rem;
  }
  
  #resetTimer,
  .timer-value {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem;
    min-width: 70px;
  }
}

/* Enhanced hover effects */
.stat-item:hover #resetTimer,
.stat-item:hover .timer-value {
  animation-duration: 1s;
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* Loading state for timer */
#resetTimer.loading,
.timer-value.loading {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}






/* Collection Search Controls */
.collection-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Collection Search Input Group */
.collection-search {
    display: flex;
    flex: 1;
    min-width: 300px;
    position: relative;
}

.collection-search input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 0 0 8px;
    border-right: none;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.collection-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.collection-search input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.collection-search-btn {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-left: none;
}

.collection-search-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #ffffff;
    border-color: #667eea;
}

/* Collection Filters */
.collection-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Sort Dropdown */
.collection-filters select {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.collection-filters select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.collection-filters select option {
    background: #1e293b;
    color: #ffffff;
}

/* Color Filters */
.collection-color-filters {
    display: flex;
    gap: 6px;
    align-items: center;
}

.collection-color-filter {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.collection-color-filter:hover {
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.collection-color-filter.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.4);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Search Results Info */
.collection-search-info {
    padding: 12px 16px;
    margin: 16px 1rem 0 1rem;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    display: flex;
    min-width: 300px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.search-results-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 0.9rem;
}

.search-results-info.no-results {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.search-results-info i {
    color: #28a745;
    font-size: 1rem;
}

.search-results-info.no-results i {
    color: #dc3545;
}

/* Clear Search Button */
.search-results-info .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-results-info .btn-sm:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Filtered Collection Stats */
.filtered-collection-stats {
    padding: 12px 16px;
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: 8px;
    margin: 8px 1rem 16px 1rem;
    backdrop-filter: blur(10px);
}

.filtered-stats {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    color: #ffffff;
    flex-wrap: wrap;
}

.filtered-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.filtered-stats .stat-item strong {
    color: #17a2b8;
    font-weight: 600;
}

/* Search Suggestions (if implemented) */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.search-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    color: #ffffff;
}

.search-suggestion:hover {
    background-color: rgba(102, 126, 234, 0.2);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion-name {
    font-weight: 500;
    color: #ffffff;
}

.search-suggestion-details {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

/* Empty Search State */
.collection-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.collection-empty h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.collection-empty p {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.collection-empty .btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.collection-empty .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .collection-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 0.75rem;
    }
    
    .collection-search {
        min-width: auto;
    }
    
    .collection-filters {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .collection-color-filters {
        gap: 4px;
    }
    
    .collection-color-filter {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .filtered-stats {
        gap: 16px;
        justify-content: center;
    }
    
    .collection-search-info,
    .filtered-collection-stats {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .collection-controls {
        padding: 0.5rem;
    }
    
    .collection-search input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .collection-search-btn {
        padding: 10px 12px;
    }
    
    .collection-filters select {
        padding: 8px 10px;
        font-size: 13px;
        min-width: 120px;
    }
    
    .collection-color-filter {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .filtered-stats {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .search-results-info {
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .collection-search-info,
    .filtered-collection-stats {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
}