/**
 * PFPMXR V1.0 MASTER BLUEPRINT - CRISP & MINIMAL UI
 * 
 * Mobile-first responsive design with zero horizontal scrolling.
 * Professional, clean, and functional.
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden; /* Prevents horizontal scrolling */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  min-height: 100vh;
}

/* Container System */
.pfpmxr-container {
  width: 100%;
  max-width: 100vw; /* Prevents overflow */
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
}

/* Step Container System */
.step-container {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin: 1rem 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 100%;
  overflow: hidden; /* Prevents content overflow */
}

/* Progress Indicator */
.progress-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap; /* Allows wrapping on small screens */
}

.progress-step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
  border: 2px solid #374151;
  background: #1f2937;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.progress-step.active {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: #3b82f6;
  color: white;
  transform: scale(1.1);
}

.progress-step.completed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  color: white;
}

/* Typography */
.step-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-description {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  width: 100%;
  max-width: 100%; /* Prevents button overflow */
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
  background: #374151;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

/* Wallet Connection Styles */
.wallet-options {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.wallet-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
}

.wallet-button:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.wallet-icon {
  font-size: 2rem;
  min-width: 3rem;
}

.wallet-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.wallet-info p {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Priority Wallet Styling */
.priority-wallet {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  position: relative;
}

.priority-wallet::before {
  content: "PRIORITY";
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.priority-wallet:hover {
  border-color: #059669;
  background: rgba(16, 185, 129, 0.2);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f1f5f9;
}

.form-input {
  width: 100%;
  padding: 0.875rem;
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: #64748b;
}

.input-hint {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* Pricing Tiers */
.pricing-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.pricing-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-4px);
}

.pricing-card.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.pricing-card.popular {
  position: relative;
  border-color: #f59e0b;
}

.pricing-card.popular::before {
  content: "POPULAR";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tier-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tier-price {
  font-size: 3rem;
  font-weight: 900;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.tier-description {
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.tier-features li {
  padding: 0.5rem 0;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tier-features li::before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
}

/* Gallery Styles */
.trait-gallery {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.trait-category {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.category-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #3b82f6;
}

.trait-grid {
  display: grid;
  gap: 1rem;
}

.trait-item {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.trait-item:hover {
  border-color: #3b82f6;
  transform: scale(1.02);
}

.trait-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.trait-name {
  padding: 1rem;
  text-align: center;
  font-weight: 500;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status Messages */
.status-message {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  text-align: center;
  font-weight: 500;
}

.status-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}

.status-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}

.status-warning {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

/* Warning Box */
.warning-box {
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.warning-box .fa-exclamation-triangle {
  color: #f59e0b;
  font-size: 1.5rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.warning-content h3 {
  color: #fbbf24;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.warning-content p {
  color: #fde68a;
}

/* Connected Wallet Display */
.connected-wallet {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #34d399;
  font-family: monospace;
}

/* Responsive Design */
@media (max-width: 640px) {
  .step-container {
    padding: 1.5rem;
    margin: 0.5rem 0;
    border-radius: 12px;
  }
  
  .step-title {
    font-size: 1.5rem;
  }
  
  .progress-step {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .progress-indicator {
    gap: 0.5rem;
  }
  
  .tier-price {
    font-size: 2rem;
  }
  
  .wallet-button {
    padding: 1rem;
  }
  
  .wallet-icon {
    font-size: 1.5rem;
    min-width: 2rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trait-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .trait-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .step-container {
    padding: 3rem;
  }
}

/* Blueprint Display */
.blueprint-display {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.blueprint-header h2 {
  color: #3b82f6;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.blueprint-header .text-success {
  color: #34d399;
  margin-bottom: 1.5rem;
}

.blueprint-section {
  margin-bottom: 2rem;
}

.blueprint-section h3 {
  color: #e2e8f0;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.blueprint-section p {
  color: #94a3b8;
  line-height: 1.6;
}

.color-palette {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.trait-categories {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.category-preview {
  background: rgba(15, 23, 42, 0.6);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.category-preview h4 {
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.category-preview p {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}