/* CardForge UI Components Styles
 * UI controls, buttons, dialogs, messages, tabs
 * Extracted from: cardforge-ui.css (dialogs, messages, tabs, stepper)
 * Created: 2025-08-03
 */

/* =============================
   Forge Tab Vertical Sidebar Layout
   =============================
   Added by Cascade 2025-08-07
*/

.forge-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5rem;
  width: 100%;
  min-height: 420px;
}

.forge-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 170px;
  max-width: 220px;
  background: var(--aura-bg-color, #18182a);
  border-radius: 14px;
  border: 1px solid var(--mood-accent-color, #4a4a6a);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  padding: 1.25rem 0.5rem 1.25rem 0.5rem;
  box-sizing: border-box;
}

.forge-sidebar-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--mood-text-primary, #e1e1ff);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  position: relative;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.forge-sidebar-tab:focus {
  box-shadow: 0 0 0 2px var(--mood-primary-color, #00d4ff);
  background: var(--aura-bg-hover, #23234a);
  z-index: 1;
}
.forge-sidebar-tab.active,
.forge-sidebar-tab[aria-selected="true"] {
  background: var(--aura-bg-hover, #23234a);
  color: var(--mood-primary-color, #00d4ff);
  font-weight: 600;
}
.forge-sidebar-tab:hover:not(.active) {
  background: var(--aura-bg-hover, #23234a);
  color: var(--mood-primary-color, #00d4ff);
}
.forge-sidebar-tab .tab-label {
  flex: 1;
  text-align: left;
}
.forge-sidebar-tab .tab-badge {
  background: var(--mood-accent-color, #4a4a6a);
  color: #fff;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 0.85em;
  font-weight: 700;
  margin-left: 0.5rem;
  display: inline-block;
  min-width: 28px;
  text-align: center;
}

.forge-content-area {
  flex: 1 1 0;
  min-width: 0;
  background: var(--aura-bg-secondary, #23234a);
  border-radius: 14px;
  border: 1px solid var(--mood-accent-color, #4a4a6a);
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  padding: 2rem 2rem 2rem 2.2rem;
  box-sizing: border-box;
  overflow-x: auto;
}

.forge-tab-content {
  display: none;
}
.forge-tab-content.active {
  display: block;
}

/* Responsive behavior for Forge sidebar layout */
@media (max-width: 1050px) {
  .forge-layout {
    flex-direction: column;
    gap: 1.5rem;
  }
  .forge-sidebar-nav {
    flex-direction: row;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding: 0.5rem 0.5rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow-x: auto;
  }
  .forge-sidebar-tab {
    flex: 1 1 0;
    min-width: 120px;
    justify-content: center;
    font-size: 0.97rem;
    padding: 0.7rem 0.5rem;
  }
  .forge-content-area {
    padding: 1.3rem 0.7rem;
  }
}

@media (max-width: 700px) {
  .forge-layout {
    gap: 0.5rem;
  }
  .forge-content-area {
    padding: 0.7rem 0.2rem;
    border-radius: 8px;
  }
}

/* End Forge Tab Vertical Sidebar Layout */


/* Stepper Tabs */
.cf-stepper {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--mood-accent-color, #4a4a6a);
  margin-bottom: 1rem;
  background: var(--aura-bg-color, #1a1a2e);
  padding-top: 0.25rem;
}

.step-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--mood-secondary-color, #a0a0c0);
  font-family: inherit;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.step-btn:hover {
  color: var(--mood-primary-color, #e1e1ff);
}

.step-btn.active {
  color: var(--mood-primary-color, #e1e1ff);
  border-color: var(--mood-primary-color, #e1e1ff);
}

/* Dialog/Modal Systems */
.cardforge-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.cardforge-dialog.active {
  display: flex;
}

.cardforge-dialog-content {
  background-color: var(--aura-bg-color, #1a1a2e);
  border: 1px solid var(--mood-accent-color, #4a4a6a);
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  transform: translateY(-20px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cardforge-dialog.active .cardforge-dialog-content {
  transform: translateY(0);
  opacity: 1;
}

.cardforge-dialog h3 {
  margin-top: 0;
  color: var(--mood-primary-color, #e1e1ff);
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Message Notifications */
.cardforge-message-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
}

.cardforge-message {
  padding: 12px 16px;
  border-radius: 6px;
  background-color: var(--aura-bg-color, #1a1a2e);
  border-left: 4px solid var(--mood-accent-color, #4a4a6a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  animation: slide-in 0.3s ease-out;
}

.cardforge-message-success {
  border-left-color: #4CAF50;
}

.cardforge-message-error {
  border-left-color: #F44336;
}

.cardforge-message-info {
  border-left-color: #2196F3;
}

.message-icon {
  margin-right: 10px;
  font-size: 18px;
}

.message-text {
  flex: 1;
}

/* Modal Message */
.modal-message {
  color: var(--mood-primary-color, #e1e1ff);
  font-size: 0.9rem;
  margin: 16px 0;
  text-align: center;
}

/* Image Picker Modal */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.image-modal .image-modal-content {
  background: var(--aura-bg-color, #1a1a2e);
  border: 1px solid var(--mood-accent-color, #4a4a6a);
  border-radius: 8px;
  padding: 16px;
  width: 90%;
  max-width: 600px;
  color: var(--mood-primary-color, #e1e1ff);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.image-modal .modal-close {
  align-self: flex-end;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--mood-secondary-color, #a0a0c0);
}

.image-modal .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin: 12px 0;
  overflow-y: auto;
  max-height: 300px;
}

.image-modal .image-grid img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
}

.image-modal .image-grid img:hover {
  border-color: var(--mood-primary-color, #e1e1ff);
}

.image-modal .modal-pagination {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.image-modal .modal-pagination button {
  background: var(--mood-accent-color, #4a4a6a);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.image-modal .custom-url {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.image-modal .custom-url input {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--mood-accent-color, #4a4a6a);
  border-radius: 4px;
  background: var(--aura-bg-color, #1a1a2e);
  color: var(--mood-primary-color, #e1e1ff);
  font-family: inherit;
}

/* Card List Components */
.card-list-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.card-list-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--mood-secondary-color);
}

.card-list-actions button:hover {
  color: var(--mood-primary-color);
}

/* Section Display Control */
.cf-section.active {
  display: block;
}

/* My Cards Sidebar Components */
.my-card-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.my-card-thumb {
  width: 40px;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

/* Layout Container Components */
#cardforge-main-container {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Saved Cards Modal Mini Gallery */
.modal-overlay {
  backdrop-filter: blur(2px);
}
.modal-saved-gallery {
  background: var(--aura-bg-color, #18182a);
  border-radius: 18px;
  padding: 2.2rem 2.2rem 1.5rem 2.2rem;
  min-width: 320px;
  max-width: 96vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.38);
  text-align: center;
  color: var(--mood-text-primary, #e1e1ff);
  position: relative;
}
.mini-card-gallery {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.25rem 0 1.5rem 0;
}
.mini-card {
  background: var(--aura-bg-secondary, #23234a);
  border-radius: 10px;
  border: 2px solid transparent;
  width: 60px;
  min-width: 60px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  position: relative;
  transition: border 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.mini-card img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
  margin-top: 8px;
  margin-bottom: 2px;
}
.mini-card .mini-card-name {
  font-size: 0.7rem;
  color: var(--mood-text-secondary, #a0a0c0);
  margin-bottom: 7px;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-card.saved {
  border: 2px solid var(--mood-primary-color, #00d4ff);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.saved-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--mood-primary-color, #00d4ff);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.modal-saved-gallery h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--mood-primary-color, #00d4ff);
}
.modal-saved-gallery .modal-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}
.modal-saved-gallery .modal-actions button {
  background: var(--aura-bg-hover, #23234a);
  color: var(--mood-primary-color, #00d4ff);
  border: none;
  border-radius: 7px;
  padding: 0.55rem 1.3rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.modal-saved-gallery .modal-actions button:hover {
  background: var(--mood-primary-color, #00d4ff);
  color: #fff;
}

/* Minimal Card Toolbar (above preview) */
.card-toolbar-minimal {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  background: transparent;
  padding: 0.15rem 0.5rem 0.15rem 0;
  margin-bottom: 0.1rem;
  border-radius: 8px;
  min-height: 32px;
}
.toolbar-btn {
  background: none;
  border: none;
  color: var(--mood-text-secondary, #a0a0c0);
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  outline: none;
}
.toolbar-btn:focus, .toolbar-btn:hover {
  background: var(--aura-bg-hover, #23234a);
  color: var(--mood-primary-color, #00d4ff);
  box-shadow: 0 0 0 2px var(--mood-primary-color, #00d4ff, 0.2);
  z-index: 1;
}

/* Card Preview Container */
#card-preview-container {
  position: sticky;
  top: 100px;
  z-index: 10;
  background: var(--aura-bg-color, #1a1a2e);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--mood-accent-color, #4a4a6a);
}

/* Search Input Components */
.search-input-group {
  position: relative;
  margin-bottom: 1rem;
}

.search-input-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--mood-accent-color, #4a4a6a);
  border-radius: 4px;
  background: var(--aura-bg-color, #1a1a2e);
  color: var(--mood-primary-color, #e1e1ff);
  font-family: inherit;
}

.search-input-group input:focus {
  outline: none;
  border-color: var(--mood-primary-color, #00d4ff);
}

.search-input-group input::placeholder {
  color: var(--mood-text-secondary, #a0a0c0);
}

/* Tool Buttons */
.tool-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===== MESSAGE & ANIMATION SYSTEM ===== */
/* Extracted from cardforge-ui.css - UI component messaging and animations */

.message-text {
  flex: 1;
}

.cardforge-message.fade-out {
  animation: fade-out 0.5s ease-out forwards;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Auth Status Message */
.cardforge-auth-message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  font-size: 14px;
}

/* ================================
   INTRO SECTION STYLES (TileForge-style)
   ================================ */

.intro-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: all 0.3s ease;
}

.intro-section.hidden {
  display: none;
}

/* Compact Intro Layout */
.intro-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.intro-left {
  flex: 1;
  min-width: 0;
}

.intro-right {
  flex: 0 0 400px;
  display: flex;
  justify-content: center;
}

.intro-features-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.intro-feature-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg-secondary, #252525);
  border-radius: 8px;
  border: 1px solid var(--border-color, #333);
  transition: all 0.2s ease;
  min-height: 48px;
}

.intro-feature-compact:hover {
  background: var(--card-bg-hover, #2a2a2a);
  border-color: var(--primary-color, #6366f1);
}

.intro-feature-compact i {
  color: var(--primary-color, #6366f1);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.intro-feature-compact span {
  color: var(--text-color, #e5e5e5);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
}

/* FORCE CardForge Preview Card - High Specificity */
.intro-section .intro-body .cardforge-preview {
  perspective: 1000px !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.intro-section .intro-body .preview-card {
  width: 280px !important;
  height: 380px !important;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
  border: 2px solid #6366f1 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 
    0 8px 32px rgba(99, 102, 241, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
  transform: rotateY(-5deg) rotateX(2deg) !important;
  transition: transform 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.preview-card:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  animation: cardShimmer 3s infinite;
  pointer-events: none;
}

@keyframes cardShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  z-index: 1;
  position: relative;
}

.card-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.card-cost {
  background: var(--primary-color, #6366f1);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.card-image {
  height: 120px;
  background: linear-gradient(135deg, #2d2d44, #1a1a2e);
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
  position: relative;
}

.image-placeholder {
  color: var(--primary-color, #6366f1);
  font-size: 2.5rem;
  animation: cardPulse 2s infinite;
}

@keyframes cardPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  z-index: 1;
  position: relative;
}

.card-type {
  color: #a1a1aa;
  font-size: 0.8rem;
  margin-bottom: 8px;
  font-style: italic;
}

.card-text {
  flex: 1;
  margin-bottom: 12px;
}

.card-text p {
  color: #e5e5e5;
  font-size: 0.8rem;
  line-height: 1.3;
  margin: 0 0 6px 0;
}

.card-text em {
  color: #a1a1aa;
  font-size: 0.75rem;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.attack, .health {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
}

.attack {
  color: #ff6b6b;
}

.health {
  color: #51cf66;
}

/* Removed duplicate CSS definitions that were conflicting */

/* Responsive adjustments */
@media (max-width: 768px) {
  .intro-layout {
    flex-direction: column;
    gap: 24px;
  }
  
  .intro-right {
    flex: none;
    align-self: center;
  }
  
  .preview-card {
    transform: none;
    width: 200px;
    height: 280px;
  }
  
  .intro-features-compact {
    grid-template-columns: 1fr;
  }
}

.intro-content {
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--border-color, #333);
  border-radius: 12px;
  max-width: 1000px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  margin: 20px;
}

.intro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border-color, #333);
  background: linear-gradient(135deg, var(--primary-color, #6366f1) 0%, var(--secondary-color, #8b5cf6) 100%);
  border-radius: 12px 12px 0 0;
}

.intro-header h2 {
  margin: 0;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-header h2 i {
  color: #fbbf24;
}

.intro-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.intro-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.intro-body {
  padding: 32px;
}

.intro-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color, #e5e5e5);
  margin-bottom: 32px;
  text-align: center;
}

/* FORCE Two-Column Layout - High Specificity */
.intro-section .intro-body .intro-layout {
  display: flex !important;
  gap: 32px !important;
  align-items: flex-start !important;
}

.intro-section .intro-body .intro-left {
  flex: 1 !important;
  min-width: 0 !important;
}

.intro-section .intro-body .intro-right {
  flex: 0 0 300px !important;
  display: flex !important;
  justify-content: center !important;
  background: rgba(255, 0, 0, 0.1) !important; /* Temporary red background to see if it shows */
}

/* Compact Feature Grid */
.intro-features-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.intro-feature-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card-bg-secondary, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.intro-feature-compact:hover {
  border-color: var(--primary-color, #6366f1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.intro-feature-compact i {
  color: var(--primary-color, #6366f1);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-title {
  color: var(--text-color, #e5e5e5);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.feature-desc {
  color: var(--text-muted, #a1a1aa);
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.3;
}

.intro-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.intro-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.intro-btn.primary {
  background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
  color: white;
}

.intro-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.intro-btn.secondary {
  background: transparent;
  color: var(--text-muted, #a1a1aa);
  border: 1px solid var(--border-color, #333);
}

.intro-btn.secondary:hover {
  color: var(--text-color, #e5e5e5);
  border-color: var(--primary-color, #6366f1);
}

/* Responsive Design for Intro */
@media (max-width: 768px) {
  .intro-content {
    margin: 10px;
    max-height: 95vh;
  }
  
  .intro-body {
    padding: 24px;
  }
  
  .intro-features {
    grid-template-columns: 1fr;
  }
  
  .intro-actions {
    flex-direction: column;
  }
}

/* Settings Button Styles */
.settings-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-btn.secondary {
  background: var(--card-bg-secondary, #252525);
  color: var(--text-color, #e5e5e5);
  border: 1px solid var(--border-color, #333);
}

.settings-btn.secondary:hover {
  background: var(--primary-color, #6366f1);
  color: white;
  border-color: var(--primary-color, #6366f1);
  transform: translateY(-1px);
}

/* ================================
   PANEL HEADER STYLES (TileForge-style)
   ================================ */

.panel-header {
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color, #333);
}

.header-top h2 {
  margin: 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-top h2 i {
  color: var(--primary-color, #6366f1);
}

.header-buttons {
  display: flex;
  gap: 8px;
}

.settings-btn {
  width: 36px;
  height: 36px;
  background: var(--card-bg-secondary, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  color: var(--text-muted, #a1a1aa);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  background: var(--primary-color, #6366f1);
  border-color: var(--primary-color, #6366f1);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

/* ================================
   MODAL SYSTEM STYLES (TileForge-style)
   ================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--border-color, #333);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.show .modal-container {
  transform: scale(1) translateY(0);
}

.modal-container.size-large {
  width: 900px;
}

.modal-container.size-medium {
  width: 600px;
}

.modal-container.size-small {
  width: 400px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border-color, #333);
  background: linear-gradient(135deg, var(--primary-color, #6366f1) 0%, var(--secondary-color, #8b5cf6) 100%);
}

.modal-title {
  margin: 0;
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  overflow-y: visible;
  max-height: none;
}

/* Tabbed Modal Styles */
.modal-tabs {
  display: flex;
  background: var(--card-bg-secondary, #252525);
  border-bottom: 1px solid var(--border-color, #333);
  overflow-x: auto;
}

.modal-tab {
  padding: 16px 24px;
  background: transparent;
  border: none;
  color: var(--text-muted, #a1a1aa);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.modal-tab:hover {
  color: var(--text-color, #e5e5e5);
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab.active {
  color: var(--primary-color, #6366f1);
  border-bottom-color: var(--primary-color, #6366f1);
  background: rgba(99, 102, 241, 0.1);
}

.modal-tab-content {
  padding: 32px;
  display: none;
}

.modal-tab-content.active {
  display: block;
}

/* Modal Content Sections */
.settings-section,
.info-section {
  padding: 0;
}

.settings-section h4,
.info-section h4 {
  margin: 0 0 16px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color, #333);
  padding-bottom: 8px;
}

.settings-section p {
  color: var(--text-muted, #a1a1aa);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Theme Options */
.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.theme-option {
  padding: 16px;
  border: 2px solid var(--border-color, #333);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.theme-option:hover {
  border-color: var(--primary-color, #6366f1);
  transform: translateY(-2px);
}

.theme-option.selected {
  border-color: var(--primary-color, #6366f1);
  background: rgba(99, 102, 241, 0.1);
}

.theme-preview {
  width: 100%;
  height: 80px;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.dark-preview {
  background: #1a1a1a;
}

.light-preview {
  background: #ffffff;
}

.preview-content {
  padding: 8px;
  height: calc(100% - 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-card {
  width: 30px;
  height: 40px;
  background: var(--card-bg-secondary, #252525);
  border-radius: 4px;
}

.light-preview .preview-card {
  background: #f5f5f5;
}

.theme-option h5 {
  margin: 0 0 4px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
}

.theme-option p {
  margin: 0;
  color: var(--text-muted, #a1a1aa);
  font-size: 0.85rem;
}

/* Preference Groups */
.preference-group {
  margin-bottom: 32px;
}

.preference-group h5 {
  margin: 0 0 16px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
}

.preference-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 8px 0;
}

.preference-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color, #6366f1);
}

.preference-item select {
  background: var(--card-bg-secondary, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-color, #e5e5e5);
  font-size: 0.9rem;
  min-width: 150px;
}

.preference-label {
  color: var(--text-color, #e5e5e5);
  font-size: 0.9rem;
  min-width: 120px;
}

/* About Section */
.about-info {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--card-bg-secondary, #252525);
  border-radius: 8px;
}

.about-logo {
  flex-shrink: 0;
}

.about-details h5 {
  margin: 0 0 8px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1.4rem;
  font-weight: 600;
}

.version {
  color: var(--primary-color, #6366f1);
  font-size: 0.9rem;
  margin: 0 0 12px 0;
  font-weight: 500;
}

.description {
  color: var(--text-muted, #a1a1aa);
  line-height: 1.5;
  margin: 0;
}

.about-features,
.about-credits {
  margin-bottom: 24px;
}

.about-features h5,
.about-credits h5 {
  margin: 0 0 12px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1.1rem;
  font-weight: 600;
}

.about-features ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted, #a1a1aa);
}

.about-features li {
  margin-bottom: 6px;
  line-height: 1.4;
}

.about-credits p {
  margin: 0 0 6px 0;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.4;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.feature-item {
  padding: 20px;
  background: var(--card-bg-secondary, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
}

.feature-item h5 {
  margin: 0 0 8px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
}

.feature-item p {
  margin: 0;
  color: var(--text-muted, #a1a1aa);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Getting Started Steps */
.getting-started-steps {
  margin-bottom: 32px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--card-bg-secondary, #252525);
  border-radius: 8px;
}

.step-number {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h5 {
  margin: 0 0 8px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.4;
}

/* Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tip-item {
  padding: 20px;
  background: var(--card-bg-secondary, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
}

.tip-item h5 {
  margin: 0 0 12px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
}

.tip-item ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted, #a1a1aa);
}

.tip-item li {
  margin-bottom: 6px;
  line-height: 1.4;
  font-size: 0.9rem;
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.shortcut-category h5 {
  margin: 0 0 16px 0;
  color: var(--text-color, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color, #333);
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.shortcut-keys {
  display: flex;
  gap: 4px;
}

.shortcut-keys kbd {
  background: var(--card-bg-secondary, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: var(--text-color, #e5e5e5);
  font-family: monospace;
}

.shortcut-desc {
  color: var(--text-muted, #a1a1aa);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-container {
    width: 95vw !important;
    margin: 10px;
  }
  
  .modal-tabs {
    flex-wrap: wrap;
  }
  
  .modal-tab {
    flex: 1;
    min-width: 120px;
  }
  
  .theme-options {
    grid-template-columns: 1fr;
  }
  
  .about-info {
    flex-direction: column;
    text-align: center;
  }
  
  .feature-grid,
  .tips-grid,
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  
  .step-item {
    flex-direction: column;
    text-align: center;
  }
}

/* ================================
   CARD GALLERY STYLES
   ================================ */

/* Card Gallery Grid Layout */
.my-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.card-gallery-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.card-gallery-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.1);
  transform: translateY(-2px);
}

.card-thumbnail {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  position: relative;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-rarity-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.card-rarity-badge.common {
  background: rgba(108, 117, 125, 0.8);
  color: #fff;
}

.card-rarity-badge.rare {
  background: rgba(0, 123, 255, 0.8);
  color: #fff;
}

.card-rarity-badge.epic {
  background: rgba(102, 16, 242, 0.8);
  color: #fff;
}

.card-rarity-badge.legendary {
  background: rgba(255, 193, 7, 0.8);
  color: #000;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-class {
  font-size: 12px;
  color: var(--accent-color);
  font-weight: 500;
  opacity: 0.8;
}

.card-quote {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.7;
  line-height: 1.3;
}

.card-stats-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.card-stats-summary span {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(0, 255, 255, 0.1);
  color: var(--accent-color);
  white-space: nowrap;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: auto;
}

.card-date {
  opacity: 0.7;
}

.card-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-status.saved {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.card-status.published {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.card-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.card-action-btn.edit {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.card-action-btn.edit:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.5);
}

.card-action-btn.save {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.card-action-btn.save:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.5);
}

.card-action-btn.publish {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.card-action-btn.publish:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
}

.card-action-btn.delete {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.card-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Enhanced Empty State */
.my-cards-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.my-cards-empty i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
  color: #00ffff;
}

.my-cards-empty p {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
}

.my-cards-empty small {
  opacity: 0.7;
}

/* Responsive Design for Card Gallery */
@media (max-width: 768px) {
  .my-cards-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
  
  .card-thumbnail {
    height: 140px;
  }
  
  .card-actions {
    gap: 0.3rem;
  }
  
  .card-action-btn {
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
  }
}
