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

:root {
  --primary-color: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary-color: #06b6d4;
  --accent-color: #38bdf8;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(56, 189, 248, 0.2);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  --gradient-aurora: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 50%, #06b6d4 100%);
  --border-radius: 16px;
  --border-radius-large: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Aurora Background */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: var(--gradient-aurora);
  opacity: 0.03;
  animation: aurora-dance 20s ease-in-out infinite;
}

@keyframes aurora-dance {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.03; }
  50% { transform: scale(1.1) rotate(2deg); opacity: 0.05; }
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem 0;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.snowflake-icon {
  animation: snowflake-float 3s ease-in-out infinite;
  font-size: 0.8em;
}

@keyframes snowflake-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(10deg); }
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Grid Layouts */
.main-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
  width: 100%;
  max-width: 100%;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
}

.glass-card {
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0.6;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-color);
}

.card-header {
  margin-bottom: 2rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  background: rgba(30, 41, 59, 0.95);
}

input::placeholder {
  color: var(--text-muted);
}

/* User Information Section */
.user-info-section {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.user-info-section h3 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.token-input-group {
  display: flex;
  gap: 0.75rem;
}

.token-input-group input {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--primary-color);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-icon {
  font-size: 1.1em;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(30, 41, 59, 0.3);
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(30, 41, 59, 0.5);
}

.upload-area.dragover {
  border-color: var(--accent-color);
  background: rgba(56, 189, 248, 0.1);
  transform: scale(1.02);
}

.upload-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.upload-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Divider */
.divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  background: var(--bg-secondary);
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
}

/* Gallery Section */
.gallery-section {
  margin-bottom: 4rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  flex: 1;
  min-width: 300px;
}

.gallery-controls {
  display: flex;
  gap: 1rem;
}

/* Snowflakes Grid */
.snowflakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.snowflake-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.snowflake-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-color);
}

.snowflake-visual {
  width: 100%;
  height: 280px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.snowflake-visual svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.snowflake-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.snowflake-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.snowflake-username {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.snowflake-display-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.snowflake-id {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.snowflake-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.snowflake-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Loading Placeholder */
.loading-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.snowflake-spinner {
  font-size: 3rem;
  animation: snowflake-spin 2s linear infinite;
  margin-bottom: 1rem;
}

@keyframes snowflake-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Status Messages */
.status-message, .verification-result, .decode-result {
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.status-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.status-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* Admin Card */
.admin-card {
  border-color: rgba(249, 115, 22, 0.3);
}

.admin-card .card-header h2 {
  color: #fb923c;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-large);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-strong);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.modal-body {
  padding: 2rem;
}

/* Code Blocks */
pre {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .main-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .gallery-controls {
    align-self: stretch;
  }
  
  .snowflakes-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .token-input-group {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .snowflake-icon, .snowflake-spinner {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: #60a5fa;
    --text-muted: #cbd5e1;
  }
}

/* Snowflake Customization Panel */
#customizationPanel {
  grid-column: 1 / -1; /* Make it span full width */
  width: 100%;
  margin: 2rem 0;
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customization-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
  width: 100%;
}

.preview-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-canvas {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.preview-placeholder span {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.preview-canvas svg {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.controls-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-medium);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-medium);
}

.slider-value {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
  color: var(--accent-color);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.color-input-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.color-picker {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: none;
  padding: 0;
  overflow: hidden;
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
  border: 2px solid var(--border-color);
  border-radius: 8px;
}

.color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-value {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  min-width: 5rem;
}

.background-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.background-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.action-buttons .btn {
  flex: 1;
}

/* Responsive Design for Customization Panel */
@media (max-width: 1024px) {
  .customization-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #customizationPanel {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  .preview-canvas {
    min-height: 250px;
    padding: 1.5rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .control-group label {
    font-size: 0.85rem;
  }
}

/* Print styles */
@media print {
  .aurora-bg, .modal, .btn, .upload-area {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}
/* ============================================================================
   Enhanced Personalization Styles
   ============================================================================ */

/* Step Indicators */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-medium);
}

.step-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  font-weight: 600;
}

/* Creation Steps */
.creation-step {
  animation: slideInUp 0.5s ease-out;
}

/* Enhanced Form Elements */
.help-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Button Sizes */
.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Choice Buttons - Two-column layout with icon and text */
.action-choice-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.btn-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 1rem;
  min-height: 140px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-choice .btn-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.btn-choice .btn-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.btn-choice .btn-text strong {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
}

.btn-choice .btn-text small {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
  display: block;
}

.btn-choice:hover .btn-icon {
  transform: scale(1.15) translateY(-4px);
}

.btn-choice::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-choice:hover::before {
  opacity: 1;
}

/* Upload Panel Styles */
.upload-area-large {
  border: 3px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: var(--transition);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area-large:hover,
.upload-area-large.dragover {
  border-color: var(--primary-color);
  background: rgba(14, 165, 233, 0.05);
  transform: scale(1.01);
}

.upload-icon-large {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.upload-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.upload-content p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.upload-formats {
  font-weight: 600;
  color: var(--accent-color);
}

.upload-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.upload-preview-section {
  margin-top: 2rem;
  animation: fadeIn 0.3s ease;
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.upload-preview-item h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-align: center;
}

.upload-info {
  padding: 1rem;
  background: rgba(14, 165, 233, 0.1);
  border-left: 3px solid var(--primary-color);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.upload-info p {
  margin-bottom: 0.5rem;
}

.upload-info p:last-child {
  margin-bottom: 0;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Preset Buttons */
.preset-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.preset-btn:hover {
  border-color: var(--primary-color);
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-2px);
}

.preset-btn.active {
  border-color: var(--primary-color);
  background: rgba(14, 165, 233, 0.2);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

.preset-btn span {
  font-size: 1.8rem;
}

.preset-btn small {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Control Group Enhancements */
.control-group label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.control-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
}

/* Enhanced Select Input */
.select-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.select-input:hover {
  border-color: var(--primary-color);
  background: rgba(30, 41, 59, 0.7);
}

.select-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Color Picker Group */
.color-picker-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
}

.color-preset {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.color-preset:hover {
  transform: scale(1.1);
  border-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-preset.active::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-label:hover {
  background: rgba(30, 41, 59, 0.5);
  border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-label span {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Enhanced Preview */
.preview-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preview-placeholder .preview-icon {
  font-size: 4rem;
  animation: snowflake-float 3s ease-in-out infinite;
}

.preview-placeholder small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.preview-info {
  text-align: center;
  padding: 0.75rem;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.preview-info small {
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Action Buttons Layout */
.action-buttons {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.action-buttons .btn-outline {
  min-width: 100px;
}

.action-buttons .btn-large {
  grid-column: 3;
}

/* Responsive Adjustments for Enhanced UI */
@media (max-width: 1024px) {
  .preset-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .color-presets {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
  }
  
  .action-buttons .btn-large {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  .customization-container {
    grid-template-columns: 1fr;
  }
  
  .preset-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .action-choice-buttons {
    grid-template-columns: 1fr;
  }
  
  .upload-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   🎨 THREE-WAY CREATION METHOD SELECTOR
   ============================================================================ */

.creation-methods-title {
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.creation-methods-title h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.creation-methods-title .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.creation-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.creation-method-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
}

.creation-method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.creation-method-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.creation-method-card:hover::before {
  transform: scaleX(1);
}

.creation-method-card.featured {
  border-color: var(--accent-color);
  background: rgba(56, 189, 248, 0.08);
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.creation-method-card:nth-child(2) .method-icon {
  animation-delay: 0.5s;
}

.creation-method-card:nth-child(3) .method-icon {
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.creation-method-card h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.creation-method-card > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.5;
}

.method-features {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.method-features li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.method-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.5rem;
  margin-top: auto;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.method-btn.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.method-btn.btn-secondary {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.method-btn:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
}

.method-btn .arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.method-btn:hover .arrow {
  transform: translateX(5px);
}

/* ============================================================================
   🖼️ PHOTOMOSAIC PANEL STYLES
   ============================================================================ */

#photomosaicPanel {
  max-width: 100% !important;
}

#photomosaicPanel .card-content {
  max-width: 100%;
}

.photomosaic-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
}

.photomosaic-section {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 12px;
  padding: 2rem;
}

.photomosaic-section h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Upload Area Compact */
.upload-area-compact {
  background: rgba(30, 41, 59, 0.6);
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  max-width: 600px;
  margin: 0 auto;
}

.upload-area-compact:hover {
  border-color: var(--primary-color);
  background: rgba(56, 189, 248, 0.08);
  transform: scale(1.02);
}

.upload-icon-small {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.icon-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 12px;
  text-align: center;
}

.icon-preview img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.icon-preview .file-name {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mode Tabs */
.mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 12px;
  padding: 0.4rem;
}

.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab:hover {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.1);
}

.mode-tab.active {
  background: var(--gradient-primary);
  color: white;
}

.tab-icon {
  font-size: 1.2rem;
}

.mode-content {
  display: none;
}

.mode-content.active {
  display: block;
}

/* Template Gallery */
.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.template-card {
  background: rgba(30, 41, 59, 0.6);
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(56, 189, 248, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.template-card:hover {
  border-color: var(--primary-color);
  transform: scale(1.15) translateY(-8px);
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.4),
              0 0 60px rgba(56, 189, 248, 0.3);
  z-index: 10;
}

.template-card:hover::before {
  opacity: 1;
}

.template-card.selected {
  border-color: var(--accent-color);
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.5),
              0 0 80px rgba(56, 189, 248, 0.3),
              inset 0 0 20px rgba(56, 189, 248, 0.2);
  transform: scale(1.08);
}

.template-card.selected::before {
  opacity: 0.8;
}

.template-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card:hover img {
  transform: scale(1.1);
}

.template-name {
  display: none;
}

/* AI Settings Grid */
.ai-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Mosaic Preview */
.mosaic-preview-area {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.preview-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 1.5rem;
}

.preview-item {
  text-align: center;
}

.preview-item h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.preview-item img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-soft);
  margin: 0 auto;
  display: block;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.empty-state small {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  filter: brightness(1.1);
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
  .creation-methods-grid {
    grid-template-columns: 1fr;
  }
  
  .template-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .ai-settings-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .preview-images-grid {
    grid-template-columns: 1fr;
  }
}
