:root {
  --deep-violet: #2D1B69;
  --rich-sapphire: #1E3A8A;
  --accent-magenta: #9D174D;
  --gold: #F59E0B;
  --gold-light: #FCD34D;
  --soft-cream: #FEF3C7;
  --pure-white: #FFFFFF;
  --bg-dark: #0C0915;
  --card-bg: rgba(45, 27, 105, 0.4);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--pure-white);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Particles Background */
.particles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--accent-magenta) 100%);
  opacity: 0.2;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation: floatParticle 15s ease-in-out infinite;
}

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.1; }
  50% { transform: translateY(-100px) rotate(180deg); opacity: 0.3; }
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--deep-violet) 0%, var(--rich-sapphire) 50%, var(--accent-magenta) 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.app-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L40 20L20 40L0 20z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
  animation: patternScroll 20s linear infinite;
}

@keyframes patternScroll {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-40px) translateY(-40px); }
}

.header-content {
  position: relative;
  z-index: 1;
}

.title-row {
  position: relative;
  display: inline-block;
}

.app-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--pure-white);
  text-shadow: 0 2px 20px rgba(245, 158, 11, 0.3);
}

.pro-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  vertical-align: middle;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.title-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmerTitle 3s ease-in-out infinite;
}

@keyframes shimmerTitle {
  0% { left: -100%; }
  100% { left: 100%; }
}

.tagline {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Quality Mode Selector */
.quality-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.quality-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quality-btn:hover {
  color: var(--pure-white);
  background: rgba(255, 255, 255, 0.05);
}

.quality-btn.active {
  background: linear-gradient(135deg, var(--deep-violet) 0%, var(--rich-sapphire) 100%);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(30, 58, 138, 0.4);
}

/* Prompt Section */
.prompt-section {
  margin-bottom: 2rem;
}

.textarea-wrapper {
  position: relative;
}

.prompt-input {
  width: 100%;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  color: var(--pure-white);
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.prompt-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.2);
}

.prompt-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0 0.75rem;
}

.char-count, .keyboard-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Style Sections */
.style-section, .modifier-section, .palette-section {
  margin: 1.5rem 0;
}

.section-label {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.style-grid, .modifier-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.style-chip, .modifier-chip {
  padding: 0.6rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.style-chip:hover, .modifier-chip:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--gold);
  color: var(--pure-white);
}

.style-chip.active {
  background: linear-gradient(135deg, var(--deep-violet) 0%, var(--accent-magenta) 100%);
  border-color: transparent;
  color: var(--pure-white);
  box-shadow: 0 4px 15px rgba(157, 23, 77, 0.3);
}

.modifier-chip.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-color: transparent;
  color: var(--bg-dark);
  font-weight: 600;
}

/* Palette Grid */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .palette-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.palette-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.palette-chip:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.palette-chip.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold);
  color: var(--pure-white);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.palette-colors {
  display: flex;
  gap: 4px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Action Row */
.action-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.inspire-btn {
  padding: 1rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--pure-white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.inspire-btn:hover {
  background: rgba(157, 23, 77, 0.2);
  border-color: var(--accent-magenta);
  transform: translateY(-2px);
}

.generate-btn {
  padding: 1rem 3rem;
  background: linear-gradient(135deg, var(--deep-violet) 0%, var(--rich-sapphire) 100%);
  border: none;
  border-radius: 14px;
  color: var(--pure-white);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 30px rgba(30, 58, 138, 0.4);
  position: relative;
  overflow: hidden;
}

.generate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.generate-btn:hover::before {
  transform: translateX(100%);
}

.generate-btn:hover:not(:disabled) {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 10px 40px rgba(30, 58, 138, 0.5);
}

.generate-btn.ultra {
  background: linear-gradient(135deg, var(--gold) 0%, var(--accent-magenta) 100%);
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.3);
}

.generate-btn.masterpiece {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  color: var(--bg-dark);
  animation: goldShine 2s ease-in-out infinite;
}

@keyframes goldShine {
  0%, 100% { box-shadow: 0 6px 30px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 10px 50px rgba(245, 158, 11, 0.6); }
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.loading-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Variations Section */
.variations-section {
  margin: 2rem 0;
  text-align: center;
}

.variations-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.variations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.variation-item {
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid var(--glass-border);
  transition: all 0.3s ease;
}

.variation-item:hover {
  border-color: var(--gold);
  transform: scale(1.02);
}

.variation-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variation-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--gold);
  font-weight: 600;
}

.variation-item:hover .variation-overlay {
  opacity: 1;
}

/* Pattern Section */
.pattern-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.pattern-frame {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 3/4;
  background: var(--card-bg);
  border-radius: 24px;
  border: 3px solid var(--glass-border);
  overflow: hidden;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.pattern-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeScaleIn 0.6s ease;
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.pattern-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
}

.placeholder-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.placeholder-sub {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.6;
}

.pattern-skeleton {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--deep-violet) 0%, var(--rich-sapphire) 100%);
  position: relative;
  overflow: hidden;
}

.skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

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

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.loading-icon {
  font-size: 3rem;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

.loading-text-display {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.pattern-badges {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

.mode-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.mode-badge.standard {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.mode-badge.ultra {
  background: linear-gradient(135deg, var(--gold) 0%, var(--accent-magenta) 100%);
  color: white;
}

.mode-badge.masterpiece {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
}

.nobel-badge {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-dark);
  animation: nobelGlow 1.5s ease-in-out infinite;
}

@keyframes nobelGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
  50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.8); }
}

/* Pattern Actions */
.pattern-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.action-btn {
  padding: 0.6rem 1.2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--pure-white);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.action-btn:hover {
  background: rgba(30, 58, 138, 0.3);
  border-color: var(--rich-sapphire);
  transform: translateY(-2px);
}

.action-btn.gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(252, 211, 77, 0.2) 100%);
  border-color: var(--gold);
  color: var(--gold);
}

.action-btn.gold:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--bg-dark);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--accent-magenta) 0%, var(--deep-violet) 100%);
  border: none;
}

.action-btn.primary:hover {
  box-shadow: 0 4px 20px rgba(157, 23, 77, 0.4);
}

/* Prompt Panel Toggle */
.prompt-panel-toggle {
  margin-top: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.prompt-panel-toggle:hover {
  color: var(--pure-white);
}

/* Prompt Panel */
.prompt-panel {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  animation: slideDown 0.3s ease;
}

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

.prompt-panel-item {
  margin-bottom: 1rem;
}

.prompt-panel-item:last-child {
  margin-bottom: 0;
}

.prompt-panel-item label {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.prompt-panel-item p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.enhanced-prompt {
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.6) !important;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
}

/* Gallery Toggle */
.gallery-toggle {
  width: 100%;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  cursor: pointer;
  padding: 1rem;
  text-align: left;
  transition: color 0.2s;
  font-weight: 500;
}

.gallery-toggle:hover {
  color: var(--pure-white);
}

/* Gallery */
.gallery-section {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  animation: slideDown 0.3s ease;
}

.gallery-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.gallery-search {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--pure-white);
  font-size: 0.9rem;
}

.gallery-search:focus {
  outline: none;
  border-color: var(--gold);
}

.gallery-filter {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--pure-white);
  font-size: 0.9rem;
  cursor: pointer;
}

.gallery-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-item {
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease;
  border: 2px solid transparent;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--gold);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-mode-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.5rem;
}

.delete-btn {
  background: rgba(239, 68, 68, 0.9);
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  align-self: flex-start;
  transition: background 0.2s;
}

.delete-btn:hover {
  background: rgb(239, 68, 68);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  max-width: 600px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.modal-content img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.modal-info {
  padding: 1.5rem;
}

.modal-prompt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Playfair Display', serif;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0,0,0,0.8);
}

/* Footer */
.app-footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

.pattern-count {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.tip {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin-bottom: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.footer-link {
  color: var(--accent-magenta);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--deep-violet), var(--rich-sapphire));
  color: white;
  padding: 1rem 2rem;
  border-radius: 14px;
  font-size: 0.9rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 200;
  animation: toastIn 0.4s ease;
  border: 1px solid var(--glass-border);
}

.toast-notification.achievement {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-dark);
  font-weight: 600;
}

.toast-notification.error {
  background: linear-gradient(135deg, #DC2626, #991B1B);
}

.toast-notification.success {
  background: linear-gradient(135deg, #059669, #047857);
}

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

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .app-title {
    font-size: 1.75rem;
  }
  
  .pro-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
  
  .quality-selector {
    flex-direction: column;
  }
  
  .quality-btn {
    font-size: 0.8rem;
  }
  
  .generate-btn {
    width: 100%;
    padding: 1rem 2rem;
  }
  
  .pattern-frame {
    max-width: 320px;
  }
  
  .action-row {
    flex-direction: column;
  }
  
  .inspire-btn, .generate-btn {
    width: 100%;
  }
  
  .pattern-actions {
    gap: 0.4rem;
  }
  
  .action-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }
}