/* Vixie AI Styles - Dark Mode + Wine Red Theme */
:root {
  --wine: #8b2942;
  --wine-dark: #6d1f33;
  --wine-light: #a83a55;
  --wine-glow: rgba(139, 41, 66, 0.25);
  --wine-subtle: rgba(139, 41, 66, 0.1);
  
  --bg: #0f0f12;
  --bg-elevated: #16161a;
  --bg-card: #1c1c21;
  --bg-hover: #242429;
  
  --text: #e8e8eb;
  --text-muted: #b5b5bd;
  --text-dim: #9a9aa3;
  
  --border: #2a2a32;
  --border-wine: rgba(139, 41, 66, 0.4);
  
  --success: #3fb06c;
  --error: #e05555;
  
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-wine: 0 4px 16px rgba(139, 41, 66, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 16px 16px 0 16px;
  gap: 16px;
}

/* Header - Single Row (All Breakpoints) */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header .btn-primary.btn-topup {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .header {
    padding: 10px 12px;
  }

  .header-right {
    gap: 8px;
  }
}

/* Tier Tooltip */
.tier-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 16px;
  z-index: 50;
  animation: fadeIn 0.2s ease;
}

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

.tooltip-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
}

.tooltip-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

.tooltip-features {
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-left: 0;
}

.tooltip-features li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.tooltip-features li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.tooltip-upgrade {
  background: var(--wine-subtle);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border-wine);
}

.tooltip-upgrade strong {
  font-size: 12px;
  color: var(--wine-light);
  display: block;
  margin-bottom: 8px;
}

.tooltip-upgrade ul {
  list-style: none;
  font-size: 11px;
  color: var(--text);
  padding-left: 0;
}

.tooltip-upgrade li {
  padding: 3px 0;
}

/* Buy Button */
.btn-buy {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-wine);
}

.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 41, 66, 0.4);
}

/* Buttons */
.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-wine);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 41, 66, 0.4);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--wine);
  color: var(--wine-light);
  background: var(--wine-subtle);
}

.btn-danger {
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--error);
  border: 1px solid var(--error);
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: var(--error);
  color: white;
}

/* Style Selector - Thumbnail Grid */
.style-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.style-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.style-selector label {
  font-size: 12px;
  font-weight: 600;
  color: var(--wine-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.style-expand-btn {
  width: 100%;
  padding: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* Hide expand button everywhere */
.style-expand-btn {
  display: none !important;
}

.style-expand-btn:hover {
  border-color: var(--wine);
  color: var(--wine-light);
  background: var(--wine-subtle);
}

/* Style Grid */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
  padding: 4px;
}

/* Desktop - show all styles in 3-4 columns */
@media (min-width: 641px) {
  .style-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    max-height: none;
    overflow-y: visible;
  }

  .style-expand-btn {
    display: none !important;
  }
}

/* Mobile: scrollable style grid, ~3 rows visible */
@media (max-width: 640px) {
  .style-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
  }
}

.style-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  padding: 4px;
  background: var(--bg);
  border: 2px solid transparent;
}

.style-item:hover {
  border-color: var(--wine);
  background: var(--wine-subtle);
  transform: translateY(-2px);
}

.style-item.selected {
  border-color: var(--wine);
  background: var(--wine-subtle);
  box-shadow: 0 0 0 3px var(--wine-glow);
}

.style-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.style-item.disabled:hover {
  transform: none;
  border-color: transparent;
}

.style-thumbnail {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  background: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}


.style-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.style-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(139, 41, 66, 0.1) 100%);
  pointer-events: none;
}

/* NSFW overlay */
.nsfw-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.nsfw-overlay span {
  font-size: 24px;
}

.nsfw-blurred .style-thumbnail img {
  filter: blur(12px);
  transition: filter 0.3s;
}

.nsfw-blurred .nsfw-overlay {
  opacity: 1;
}

.style-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  padding: 0 2px;
}

.style-item.selected .style-name {
  color: var(--wine-light);
  font-weight: 600;
}


.style-item.loading {
  pointer-events: none;
}

.style-item.loading .style-thumbnail {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Input Area */
.input-area {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.input-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wine), var(--wine-light), var(--wine));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.input-area:hover::before {
  opacity: 1;
}

/* Full-page drag overlay */
.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(88, 28, 48, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.drag-overlay.hidden {
  display: none;
}

.drag-overlay-inner {
  font-size: 22px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
  pointer-events: none;
  text-align: center;
  line-height: 1.5;
}

.input-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-input {
  padding: 12px 18px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.btn-input:hover {
  border-color: var(--wine);
  color: var(--wine-light);
  background: var(--wine-subtle);
  transform: translateY(-1px);
}

.btn-input svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.drop-hint {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.drop-hint strong {
  color: var(--wine-light);
  font-weight: 600;
}

.file-requirements {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.upload-disclaimer {
  font-size: 10px;
  color: var(--text-muted, #555);
  margin-top: 4px;
  text-align: center;
  opacity: 0.6;
}

.btn-upload-primary {
  background: var(--wine-subtle);
  border-color: var(--wine);
  color: var(--wine-light);
  font-weight: 600;
  position: relative;
}

.btn-upload-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, transparent 0%, var(--wine-glow) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.btn-upload-primary:hover::after {
  opacity: 1;
}

.btn-upload-primary:hover {
  background: var(--wine);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-wine);
}

/* Gallery Section */
.gallery-section {
  flex: 1;
}

.gallery-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--wine), transparent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  transition: gap 0.3s ease;
}

/* Tablet: 3 columns */
@media (min-width: 641px) and (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* Desktop/Laptop: 4 columns */
@media (min-width: 1025px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

.gallery-item {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-wine);
  border-color: var(--wine);
  z-index: 10;
}

.gallery-item:active {
  transform: translateY(-2px) scale(1.01);
  transition-duration: 0.1s;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, filter 0.3s ease;
  opacity: 1;
}

.gallery-item img:not([src]),
.gallery-item img[src=""] {
  opacity: 0;
}

.gallery-item:hover img:not(.processing) {
  filter: brightness(1.05);
}

.gallery-item.processing img,
.gallery-item.queued img {
  filter: grayscale(0.4) brightness(0.7);
}

.gallery-item .progress-overlay {
  position: absolute;
  inset: 0;
  background: var(--wine-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  font-weight: 600;
  font-size: 16px;
  overflow: hidden;
}

/* Sparkling stars animation - multiple stars via box-shadow */
.gallery-item .progress-overlay::before,
.gallery-item .progress-overlay::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  animation: sparkle 2s ease-in-out infinite;
}

.gallery-item .progress-overlay::before {
  top: var(--s1y, 18%);
  left: var(--s1x, 25%);
  box-shadow:
    0 0 4px white, 0 0 8px white,
    40px 15px 3px rgba(255,255,255,0.9),
    -10px 50px 2px rgba(255,255,255,0.7),
    55px 60px 3px rgba(255,255,255,0.8),
    20px 80px 2px rgba(255,255,255,0.6);
  animation-delay: var(--delay1, 0s);
}

.gallery-item .progress-overlay::after {
  top: var(--s2y, 55%);
  right: var(--s2x, 20%);
  box-shadow:
    0 0 4px white, 0 0 8px white,
    -35px -20px 2px rgba(255,255,255,0.8),
    15px 25px 3px rgba(255,255,255,0.7),
    -50px 10px 2px rgba(255,255,255,0.6),
    -20px -45px 3px rgba(255,255,255,0.9);
  animation-delay: var(--delay2, 0.7s);
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
  50% {
    opacity: 0.8;
    transform: scale(0.8);
  }
  70% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Additional sparkle layer with different timing */
.gallery-item.queued .progress-overlay,
.gallery-item.processing .progress-overlay {
  background: var(--wine-dark);
  background-image:
    radial-gradient(1px 1px at var(--s3x, 15%) var(--s3y, 45%), rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at var(--s4x, 75%) var(--s4y, 30%), rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at var(--s1x, 45%) var(--s2y, 75%), rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at var(--s2x, 85%) var(--s1y, 70%), rgba(255,255,255,0.3) 0%, transparent 100%);
}
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

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

/* Reveal overlay for completed items */
.gallery-item .reveal-overlay {
  position: absolute;
  inset: 0;
  background: var(--wine-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-item.reveal-state:hover .reveal-overlay {
  background: var(--wine);
  transform: scale(1.05);
}


.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  transition: all 0.3s ease;
  grid-column: 1 / -1;
}

.empty-state:hover {
  border-color: var(--wine);
  background: var(--wine-subtle);
}

.load-more-container {
  text-align: center;
  margin-top: 20px;
  padding: 16px 0;
  animation: fadeIn 0.3s ease;
}

.load-more-container button {
  min-width: 150px;
  transition: all 0.3s ease;
}

.load-more-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.load-more-container button:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* Error state for gallery items */
.gallery-item.error,
.gallery-item.load-error {
  background: var(--bg-elevated);
  border-color: var(--error);
}

.gallery-item .error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--error);
  padding: 20px;
}

.gallery-item .error-icon {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
  opacity: 0.6;
}

.gallery-item .error-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.gallery-item.load-error img {
  display: none;
}

.gallery-item.load-error::after {
  content: 'Failed to load';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--error);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hidden {
  display: none !important;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
}

.modal-content {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--wine);
}

.modal-content h2 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 22px;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 16px 0;
}

.modal-content input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  background: var(--bg-hover);
  color: var(--text);
}

.modal-content input:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px var(--wine-glow);
}

.modal-content input::placeholder {
  color: var(--text-dim);
}

.modal-buttons {
  display: flex;
  gap: 10px;
}

.modal-buttons button {
  flex: 1;
}

/* Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

.lightbox-image-wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .lightbox-img {
    max-width: 98vw;
    max-height: 85vh;
    border-radius: 8px;
  }
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.lightbox-nav-prev {
  left: 12px;
}

.lightbox-nav-next {
  right: 12px;
}

@media (max-width: 640px) {
  .lightbox-nav {
    width: 36px;
    height: 36px;
  }

  .lightbox-nav svg {
    width: 24px;
    height: 24px;
  }

  .lightbox-nav-prev {
    left: 8px;
  }

  .lightbox-nav-next {
    right: 8px;
  }
}

.lightbox-actions {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  padding: 0 16px;
}

.lightbox-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 64px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.lightbox-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-2px);
}

.lightbox-action-btn svg {
  width: 22px;
  height: 22px;
}

.lightbox-action-delete {
  color: rgba(255, 100, 100, 0.8);
}

.lightbox-action-delete:hover {
  background: rgba(255, 100, 100, 0.15);
  border-color: rgba(255, 100, 100, 0.3);
  color: #ff6464;
}

.lightbox-action-delete.confirm {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 0, 0, 0.5);
  color: #ff4444;
}

.lightbox-action-delete.confirm:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.7);
}

@media (max-width: 640px) {
  .lightbox-actions {
    bottom: 12px;
    gap: 8px;
  }

  .lightbox-action-btn {
    padding: 8px 8px;
    min-width: 56px;
    font-size: 10px;
  }

  .lightbox-action-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-wine);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.gallery-item.processing .progress-overlay {
  animation: pulse 1.5s ease-in-out infinite;
}

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

.gallery-item {
  animation: galleryItemFadeIn 0.4s ease forwards;
}

/* Stagger animation for multiple items */
.gallery-item:nth-child(1) { animation-delay: 0ms; }
.gallery-item:nth-child(2) { animation-delay: 50ms; }
.gallery-item:nth-child(3) { animation-delay: 100ms; }
.gallery-item:nth-child(4) { animation-delay: 150ms; }
.gallery-item:nth-child(5) { animation-delay: 200ms; }
.gallery-item:nth-child(6) { animation-delay: 250ms; }
.gallery-item:nth-child(7) { animation-delay: 300ms; }
.gallery-item:nth-child(8) { animation-delay: 350ms; }
.gallery-item:nth-child(n+9) { animation-delay: 400ms; }

/* Screen Capture Overlay */
.capture-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: crosshair;
  z-index: 99999;
}

.capture-selection {
  position: absolute;
  border: 2px solid var(--wine);
  background: rgba(139, 41, 66, 0.2);
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--wine-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--wine);
}

/* Select dropdown styling for dark mode */
select option {
  background: var(--bg-card);
  color: var(--text);
}



.brand-name {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.brand-vixie {
  color: #e8e8eb;
}

.brand-art {
  color: var(--wine-light);
}

.credit-count {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.btn-text:hover {
  color: var(--wine-light);
}

.btn-primary {
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: white;
  border: 1px solid var(--wine-light);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(139, 41, 66, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 41, 66, 0.3);
}

/* Footer - Full Bleed (Edge-to-Edge) */
.footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100vw;
  margin-left: -16px;
  margin-right: -16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.footer-account-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-account-btn:hover {
  color: var(--wine);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--wine-light);
}

.footer-separator {
  color: var(--text-dim);
}

.footer-help-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wine);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(139, 41, 66, 0.3);
}

.footer-help-btn:hover {
  background: var(--wine-light);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 41, 66, 0.4);
}

/* Below-Footer Legal Links */
.below-footer-links {
  width: 100vw;
  margin-left: -16px;
  margin-right: -16px;
  background: var(--bg);
  padding: 10px 20px;
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  border-top: 1px solid rgba(42, 42, 50, 0.5);
}

.legal-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 10px;
}

.legal-link:hover {
  color: var(--wine-light);
}

.legal-separator {
  margin: 0 8px;
  color: var(--text-dim);
  opacity: 0.5;
}

/* Login Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.login-modal-content {
  max-width: 380px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.modal-close:hover {
  border-color: var(--wine);
  background: var(--wine-subtle);
  color: var(--wine-light);
}

.login-screen h2 {
  color: var(--text);
  margin: 0 0 8px 0;
  font-size: 24px;
}

.login-subtitle {
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.5;
}

.login-trust-signals {
  margin-top: 20px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.login-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}

.user-display {
  font-size: 13px;
  color: var(--text);
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-display:hover {
  background: var(--bg-hover);
  border-color: var(--wine);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input[type="email"] {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}

.login-form input[type="email"]:focus {
  outline: none;
  border-color: var(--wine);
  background: var(--bg-elevated);
}

.login-status {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.login-status.error {
  background: rgba(224, 85, 85, 0.1);
  color: var(--error);
  border: 1px solid rgba(224, 85, 85, 0.3);
}

.login-status.success {
  background: rgba(63, 176, 108, 0.1);
  color: var(--success);
  border: 1px solid rgba(63, 176, 108, 0.3);
}

.login-status.info {
  background: var(--wine-subtle);
  color: var(--wine-light);
  border: 1px solid var(--border-wine);
}

/* OTP Input */
.otp-input-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.2s;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--wine);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px var(--wine-glow);
}

#verify-code-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
}

#resend-code-btn {
  width: 100%;
  margin-top: 8px;
  font-size: 0.85em;
}

#verify-email {
  color: var(--wine-light);
  font-weight: 600;
}

/* How it Works Modal */
.how-it-works-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
}

.how-it-works-section h3 {
  color: var(--text);
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.how-it-works-section p {
  color: var(--text-muted);
  margin: 0 0 8px 0;
  line-height: 1.6;
}

.how-it-works-section ul {
  margin: 8px 0 0 20px;
  color: var(--text-muted);
  line-height: 1.8;
}

.how-it-works-section strong {
  color: var(--wine-light);
  font-weight: 600;
}

.how-it-works-content h2 {
  color: var(--text);
  font-size: 24px;
  margin-bottom: 8px;
}

/* Account Modal */
/* Account Modal Sections */
.account-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.account-btn-full {
  width: 100%;
}

.account-info {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.account-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-user-id {
  color: var(--text);
  font-weight: 600;
  font-family: monospace;
  font-size: 12px;
  margin-top: 6px !important;
}

/* Account Settings */
.account-setting {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-setting-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.account-setting-desc {
  font-size: 11px;
  color: var(--text-dim);
}

/* Offer Code */
.offer-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offer-code-input {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}

.offer-code-input:focus {
  border-color: var(--wine-light);
}

.offer-code-btn {
  padding: 7px 14px;
  background: var(--wine);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.offer-code-btn:hover {
  background: var(--wine-light);
}

.offer-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.offer-code-msg {
  font-size: 12px;
  margin: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--wine);
  border-color: var(--wine-light);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: white;
}

/* Source Images Preview */
.source-preview {
  position: relative;
  max-width: 500px;
  margin: 1.5rem auto;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.source-preview.hidden {
  display: none;
}

/* Grid of source image thumbnails */
.source-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* 1-3 images: 2 columns on mobile, 4 on desktop */
.source-preview-grid.single {
  grid-template-columns: repeat(2, 1fr);
}

/* Multiple images (4+): responsive grid */
.source-preview-grid.multi {
  grid-template-columns: repeat(2, 1fr);
}

.source-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  min-height: 140px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.source-thumb:hover {
  border-color: var(--wine);
}

.source-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.source-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  opacity: 0;
  pointer-events: none;
}

.source-thumb:hover .source-thumb-remove {
  opacity: 1;
  pointer-events: auto;
}

.source-thumb-remove:hover {
  background: var(--error);
}

/* Upload More tile */
.source-upload-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 3 / 4;
  min-height: 140px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  padding: 0;
}

.source-upload-more:hover {
  border-color: var(--wine);
  background: var(--wine-subtle);
}

.source-upload-more img {
  width: 64px;
  height: auto;
  opacity: 0.5;
}

.source-upload-more span {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Clear All button */
.source-clear-all-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.source-clear-all-btn:hover {
  border-color: var(--error);
  color: var(--error);
  background: rgba(224, 85, 85, 0.1);
}

.source-clear-all-btn.hidden {
  display: none;
}

@media (min-width: 641px) {
  .source-preview-grid.single,
  .source-preview-grid.multi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .source-preview-grid.single,
  .source-preview-grid.multi {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .source-thumb-remove {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Create Button - Styled like Top Up button */
.btn-create {
  width: 100%;
  max-width: 500px;
  margin: 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-wine);
}

.btn-create:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 41, 66, 0.4);
}

.btn-create:active:not(:disabled) {
  transform: translateY(0);
}

.btn-create:disabled {
  background: linear-gradient(135deg, #666 0%, #555 100%);
  color: #aaa;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-create.loading {
  opacity: 0.85;
  cursor: wait;
  background: linear-gradient(135deg, #5a2a3a, #7a3a4a) !important;
  pointer-events: none;
}

.btn-create.loading .btn-spinner {
  vertical-align: middle;
}

.btn-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

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

@media (max-width: 640px) {
  .source-preview {
    max-width: 100%;
    margin: 1rem 0;
  }

  .btn-create {
    margin: 1rem 0;
  }
}

/* Highlight animation for missing requirements */
.input-area.highlight-needed {
  border-color: var(--wine) !important;
  background: var(--wine-subtle);
  animation: pulseHighlight 0.5s ease 3;
}

@keyframes pulseHighlight {
  0%, 100% {
    border-color: var(--wine);
    box-shadow: 0 0 0 0 var(--wine-glow);
  }
  50% {
    border-color: var(--wine-light);
    box-shadow: 0 0 0 8px var(--wine-glow);
  }
}

/* Buy Diamonds Modal */
.buy-diamonds-modal-content {
  max-width: 600px;
  width: 92%;
}

@media (max-width: 640px) {
  .buy-diamonds-modal-content {
    padding: 20px 16px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .buy-diamonds-modal-content h2 {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .buy-diamonds-modal-content .modal-subtitle {
    font-size: 12px;
    margin-bottom: 12px;
  }
}

.diamond-packs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  padding: 4px;
}

.diamond-packs-grid .diamond-pack-card {
  width: calc(50% - 6px);
}

.diamond-packs-grid .payment-method-tabs {
  width: 100%;
}

@media (min-width: 641px) {
  .diamond-packs-grid {
    gap: 16px;
  }
  .diamond-packs-grid .diamond-pack-card {
    width: calc(33.333% - 11px);
  }
}

.pack-loading,
.pack-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.pack-error {
  color: var(--error);
}

.payment-method-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  grid-column: 1 / -1;
}

.payment-method-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-method-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.payment-method-tab.active {
  background: var(--wine);
  color: white;
}

.diamond-pack-card {
  position: relative;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: visible;
}

.diamond-pack-card:hover {
  border-color: var(--wine);
  background: var(--wine-subtle);
  transform: translateY(-2px);
  box-shadow: var(--shadow-wine);
}

.diamond-pack-card.pack-disabled {
  opacity: 0.4;
  pointer-events: auto;
  cursor: not-allowed;
}

.diamond-pack-card.pack-disabled:hover {
  border-color: var(--border);
  background: var(--surface);
  transform: none;
  box-shadow: none;
}

.pack-credits {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.pack-credits-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.pack-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--wine-light);
  margin-bottom: 4px;
}

.pack-per-diamond {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.pack-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: pack-spin 0.8s linear infinite;
  margin: 20px auto;
}

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

.diamond-pack-card.loading {
  pointer-events: none;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

/* Mobile: Smaller pack cards */
@media (max-width: 640px) {
  .pack-credits {
    font-size: 28px;
    margin-bottom: 2px;
  }

  .pack-credits-label {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .pack-price {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .pack-per-diamond {
    font-size: 9px;
  }

  .diamond-pack-card {
    padding: 16px 12px;
  }
}

.pack-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.pack-badge-popular {
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: white;
}

.pack-badge-value {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
}

.trust-signals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.trust-signal {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg-elevated);
  border-radius: 6px;
  border: 1px solid var(--border);
}

@media (max-width: 640px) {
  .trust-signals {
    gap: 8px;
  }

  .trust-signal {
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* Color Picker Section */
.color-picker-section {
  margin-top: 16px;
}

.color-picker-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--wine-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.color-picker-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.color-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  position: relative;
  flex-shrink: 0;
}

.color-circle:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-circle.selected {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px var(--wine-glow);
}

.color-circle-custom {
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.3), transparent 60%), #8b2942;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.color-circle-custom .picker-icon {
  width: 18px;
  height: 18px;
  color: white;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.color-circle-custom input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .color-circle {
    width: 36px;
    height: 36px;
  }

  .color-picker-grid {
    gap: 8px;
  }
}

/* Referral Callout */
.referral-callout {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(139, 69, 89, 0.15) 0%, rgba(88, 28, 48, 0.25) 100%);
  border: 1px solid rgba(139, 69, 89, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.referral-callout-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.referral-callout-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.referral-callout-text strong {
  color: var(--text);
  font-size: 13px;
}

.referral-callout-text span {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.3;
}

.btn-referral-copy {
  background: var(--wine);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
  text-align: center;
}

.btn-referral-copy:hover {
  background: var(--wine-light);
}

/* Retry button on gallery items */
.retry-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.gallery-item:hover .retry-btn {
  opacity: 1;
}

.retry-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.1);
}

.retry-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
