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

:root {
  --bg: #f5f3ef;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --accent: #c4e86c;
  --accent-dark: #a8cc5a;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.08);
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: flex-end;
}

.counter {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
}

/* Main Card */
.card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
}

/* Logo */
.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.slop-blob {
  width: 100%;
  height: 100%;
  color: var(--text);
  animation: wobble 3s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.05); }
}

h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.tagline {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}

.mode-btn {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: var(--text);
}

.mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Sections */
.section {
  display: none;
}

.section.active {
  display: block;
}

/* Input */
.input-wrapper {
  position: relative;
  margin-bottom: 15px;
}

#prompt {
  width: 100%;
  padding: 16px 70px 16px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

#prompt:focus {
  border-color: var(--text);
}

#prompt::placeholder {
  color: #999;
}

.char-count {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-muted);
}

/* Generate Button */
.generate-btn {
  background: var(--accent);
  border: none;
  border-radius: 50px;
  padding: 16px 40px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.generate-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.02);
}

.generate-btn:active {
  transform: scale(0.98);
}

.generate-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.generate-btn .btn-loading {
  display: none;
}

.generate-btn.loading .btn-text {
  display: none;
}

.generate-btn.loading .btn-loading {
  display: inline;
}

/* Result */
.result {
  margin-top: 30px;
  animation: fadeIn 0.3s ease;
}

.result.hidden {
  display: none;
}

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

#slop-image {
  width: 100%;
  max-width: 350px;
  border-radius: 16px;
  border: 2px solid var(--border);
  margin-bottom: 15px;
}

.result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.action-btn {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--text);
  color: var(--card-bg);
  border-color: var(--text);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-item:hover {
  transform: scale(1.05);
}

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

.gallery-empty {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.online {
  margin-top: 5px;
  color: var(--accent-dark);
  font-weight: 500;
}

.x-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.x-link:hover {
  background: #333;
  transform: scale(1.05);
}

.x-link svg {
  flex-shrink: 0;
}

/* Contract Address */
.ca-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}

.ca-label {
  font-weight: 600;
  color: var(--text-muted);
}

.ca-address {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  max-width: 280px;
}

.copy-btn {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--accent-dark);
}

.copy-btn.copied {
  background: #2ecc71;
  color: white;
}

/* Buy Links */
.buy-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.buy-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.buy-btn.pump {
  background: linear-gradient(135deg, #00d1b2, #00b89c);
  color: white;
}

.buy-btn.pump:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 209, 178, 0.4);
}

.buy-btn.dex {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: white;
}

.buy-btn.dex:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(26, 26, 46, 0.4);
}

/* Mobile */
@media (max-width: 500px) {
  .card {
    padding: 30px 20px;
  }
  
  h1 {
    font-size: 36px;
  }
  
  .mode-toggle {
    flex-direction: column;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}