/* Visual Creative Platform — Clean Light Theme */
:root {
  --bg: #faf8f5;
  --card-bg: #ffffff;
  --card: #ffffff;
  --card-hover: #f5f2ed;
  --accent: #2d8a7a;
  --accent-light: #e8f5f1;
  --accent-dim: #1a6b5e;
  --text: #2d2d2d;
  --text-secondary: #777777;
  --text-muted: #aaaaaa;
  --border: #e8e5e0;
  --border-light: #f0ede8;
  --danger: #e05555;
  --success: #3da06d;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Nav — light, minimal */
nav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-right: 20px;
  letter-spacing: -0.3px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}

nav a:hover { color: var(--text); background: var(--card-hover); }
nav a.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }

nav .spacer { flex: 1; }

nav .badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }

.hero {
  text-align: center;
  padding: 48px 24px 32px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

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

.card .icon { font-size: 2rem; margin-bottom: 10px; }

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.card .meta {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card .meta span { display: flex; align-items: center; gap: 4px; }

/* Section headers */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 4px 14px rgba(45,138,122,0.25);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: 6px; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

select, textarea, input[type=text] {
  width: 100%;
  padding: 10px 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select:focus, textarea:focus, input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,138,122,0.1);
}

textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

/* Prompt select cards */
.prompt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.prompt-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.prompt-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(45,138,122,0.1);
}

.prompt-card h4 { font-size: 0.95rem; margin-bottom: 4px; }
.prompt-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.gallery-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.gallery-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: #f0ede8;
}

.gallery-item .info { padding: 12px 14px 6px; }
.gallery-item .info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item .info .sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gallery-item .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 12px;
  font-size: 0.82rem;
}

.gallery-item .vote-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.gallery-item .vote-btn:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.gallery-item .vote-btn.voted { color: var(--accent); font-weight: 600; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.filter-bar .filter-chip {
  padding: 6px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.filter-bar .filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-bar .filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-running { background: #fff8e1; color: #c79100; }
.status-done { background: var(--accent-light); color: var(--accent); }
.status-error { background: #fce8e8; color: var(--danger); }

/* Result box */
.result-box {
  background: var(--card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 0 0 4px rgba(45,138,122,0.06);
}

.result-box img {
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px solid var(--border-light);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* Modal / Detail */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card);
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal img { width: 100%; display: block; border-radius: 12px 12px 0 0; }
.modal .modal-body { padding: 20px 24px; }
.modal .modal-body h2 { font-size: 1.2rem; margin-bottom: 6px; }
.modal .modal-body .meta-row {
  display: flex;
  gap: 16px;
  margin: 8px 0 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.modal .modal-body .desc { font-size: 0.9rem; line-height: 1.7; color: var(--text-secondary); margin: 12px 0; }
.modal .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Guide sections */
.guide-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.guide-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
}

.guide-section code {
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent-dim);
  font-weight: 500;
}

.guide-section pre {
  background: #f5f2ed;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.84rem;
  margin: 8px 0;
  border: 1px solid var(--border-light);
}

/* Sitemap */
.sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.sitemap a {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.sitemap a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  background: var(--accent-light);
}

.sitemap .path {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 3px;
  font-weight: 600;
}

.sitemap .desc { font-size: 0.82rem; color: var(--text-secondary); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 300;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--accent); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }

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

/* Empty state */
.empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.6; }
.empty p { font-size: 0.95rem; }

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 16px 12px; }
  nav { padding: 0 12px; }
  nav a { padding: 6px 10px; font-size: 0.8rem; }
  .hero { padding: 36px 12px 24px; }
  .hero h1 { font-size: 1.5rem; }
  .card-grid, .prompt-list { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .sitemap { grid-template-columns: 1fr; }
  .modal { max-width: 100%; border-radius: 12px 12px 0 0; margin-top: auto; }
}

/* ── Toast Animation ───────────────────────────── */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

