/* Aesthetic Prompt Studio - Theme & Layout */
:root {
  --bg-main: #0b0d14;
  --bg-card: rgba(19, 23, 34, 0.75);
  --bg-card-hover: rgba(28, 34, 51, 0.9);
  --bg-input: #1a2238;
  --bg-input-hover: #1f2945;
  --bg-input-focus: #202c4b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-input: rgba(148, 163, 184, 0.26);
  --border-input-hover: rgba(148, 163, 184, 0.48);
  --border-focus: #6366f1;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-amber: #f59e0b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow spheres */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}
.glow-1 {
  top: -150px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1, transparent);
}
.glow-2 {
  top: 30%;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #06b6d4, transparent);
}

/* Header */
.app-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 13, 20, 0.8);
  backdrop-filter: blur(16px);
  padding: 2.25rem 1.5rem 1.75rem;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.brand {
  max-width: 760px;
}
.brand-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}
.brand h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
}
.tagline {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
}
.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Controls Section */
.controls-section {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 1.5rem auto 1rem;
  padding: 0 1.5rem;
}
.controls-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-card);
}
@media (min-width: 900px) {
  .controls-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Search Box */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.search-wrapper input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 2.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}
.search-wrapper input:hover {
  background: var(--bg-input-hover);
  border-color: var(--border-input-hover);
}
.search-wrapper input:focus {
  outline: none;
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.search-wrapper input::placeholder {
  color: #64748b;
}
.clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.clear-btn:hover {
  color: #fff;
}

/* Filter Groups */
.filter-group, .category-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0.4rem 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}
.pill.pill-sample-toggle {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.35);
  color: #a5f3fc;
  margin-left: 0.6rem;
}
.pill.pill-sample-toggle:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.6);
  color: #fff;
}
.pill.pill-sample-toggle.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(99, 102, 241, 0.35));
  border-color: #06b6d4;
  color: #fff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
}

.styled-select {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.styled-select:hover {
  background: var(--bg-input-hover);
  border-color: var(--border-input-hover);
}
.styled-select:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Status Bar */
.meta-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  padding: 0 0.5rem;
}
.tip-badge {
  color: var(--accent-cyan);
  font-size: 0.8rem;
  background: rgba(6, 182, 212, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Grid & Cards */
.grid-container {
  max-width: 1400px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 5;
}
.aesthetics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px -5px var(--primary-glow);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.badge-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.card-cari-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 2px 7px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.card-cari-link:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}
.decade-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.category-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 160px;
}
.sample-badge-mini {
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.02em;
}

/* Card Sample Thumbnail */
.card-sample-wrapper {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.85rem;
  background: #000;
  border: 1px solid var(--border-subtle);
}
.card-sample-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}
.card:hover .card-sample-img {
  transform: scale(1.04);
}
.card-sample-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0.6rem;
}

.card-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Color Palette Bar */
.palette-bar {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.palette-bar.large {
  height: 38px;
  border-radius: 8px;
}
.palette-swatch {
  flex: 1;
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: flex 0.2s ease, transform 0.2s ease;
}
.palette-swatch:hover {
  flex: 1.8;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Card Chips */
.card-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.dna-chip {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
  color: #cbd5e1;
}

/* Card Footer */
.card-footer {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}
.card-footer .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.82rem;
  padding: 0.55rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  max-width: 480px;
  margin: 0 auto;
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  overflow-y: auto;
}
.modal-dialog {
  background: #111420;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Modal Header */
.modal-header {
  padding: 2.25rem 2.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
}
.modal-meta-top {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.period-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-muted);
}
.cari-archive-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 9px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-left: auto;
}
.cari-archive-link:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}
.modal-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.modal-summary {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.modal-palette-section {
  background: rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.palette-title {
  font-weight: 700;
  color: #fff;
}
.palette-subtitle {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  margin-left: 0.35rem;
}
.click-copy-hint {
  color: var(--accent-cyan);
  font-size: 0.75rem;
}

/* Color Scheme Control */
.color-scheme-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.85rem;
}
.scheme-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.scheme-label {
  font-weight: 600;
  color: var(--text-muted);
}
.active-scheme-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  color: #a5b4fc;
}
.scheme-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.scheme-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.scheme-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.scheme-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Custom Color Box */
.custom-color-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.custom-color-box input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.custom-color-box input:hover {
  background: var(--bg-input-hover);
  border-color: var(--border-input-hover);
}
.custom-color-box input:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.custom-color-box input::placeholder {
  color: #64748b;
}
.btn-sm {
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
}

/* Modal Body */
.modal-body {
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Modal AI Sample Showcase */
.modal-sample-showcase {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.sample-showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sample-badge-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sample-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(99, 102, 241, 0.25));
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 3px 9px;
  border-radius: 100px;
}
.sample-filename {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.sample-actions-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sample-thumbs-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sample-thumb-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sample-thumb-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.sample-thumb-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.6);
  color: #a5f3fc;
}
/* Sample prompt hints */
.sample-prompt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sample-prompt-btn:hover,
.sample-prompt-btn:focus-visible {
  background: rgba(99, 102, 241, 0.32);
  color: #fff;
  outline: none;
}
.card-sample-prompt-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #c7d2fe;
  border: 1px solid rgba(165, 180, 252, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}
.card-sample-prompt-btn:hover,
.card-sample-prompt-btn:focus-visible {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
  outline: none;
}

/* Sample prompt modal */
.prompt-modal-backdrop {
  z-index: 1100;
}
.prompt-modal-dialog {
  max-width: 720px;
}
.prompt-modal-body {
  padding: 2rem 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.prompt-modal-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-right: 2.5rem;
}
.prompt-modal-thumb {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: #06080e;
}
.prompt-modal-title {
  margin: 0.4rem 0 0.25rem;
  font-size: 1.15rem;
  color: var(--text-main);
}
.prompt-modal-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.prompt-modal-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #0a0d16;
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  box-sizing: border-box;
}
.prompt-modal-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.prompt-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}
.prompt-modal-edited {
  margin-right: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-amber);
}
@media (max-width: 600px) {
  .prompt-modal-body { padding: 1.5rem 1.1rem 1.25rem; }
  .prompt-modal-thumb { width: 84px; }
  .prompt-modal-textarea { min-height: 220px; }
}

.sample-view-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.15s ease;
}
.sample-view-link:hover {
  color: #fff;
  text-decoration: underline;
}
.sample-img-container {
  width: 100%;
  max-height: 440px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #06080e;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-subtle);
}
.sample-img-container img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.sample-img-container img:hover {
  opacity: 0.95;
}

/* DNA Details Grid */
.dna-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.dna-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.dna-box h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
}
.tags-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tag-item {
  font-size: 0.85rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tag-item::before {
  content: "•";
  color: var(--primary);
}

/* Builder Section */
.builder-section {
  background: rgba(18, 22, 34, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.section-title-row {
  margin-bottom: 1.5rem;
}
.section-title-row h3 {
  font-size: 1.3rem;
  font-weight: 700;
}
.sub-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.input-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.input-field.full-width {
  grid-column: 1 / -1;
}
.input-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}
.input-field input {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-field input:hover {
  background: var(--bg-input-hover);
  border-color: var(--border-input-hover);
}
.input-field input:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.input-field input::placeholder {
  color: #64748b;
  opacity: 0.9;
}

/* Quick Suggestion Chips */
.chips-suggestions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.sug-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  color: #cbd5e1;
  padding: 2px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sug-chip:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
}

/* Model Selector Tabs */
.model-tabs-wrapper {
  margin-bottom: 1.25rem;
}
.tabs-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.model-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.model-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.55rem 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.model-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.model-tab.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #a5b4fc;
}

/* Output Cards */
.prompt-output-card, .negative-prompt-card {
  background: #090c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.output-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.output-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
}
.output-model-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}
.output-actions-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.bundle-neg-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}
.bundle-neg-label input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
}
.model-format-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.prompt-codeblock {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #f8fafc;
  word-break: break-word;
  white-space: pre-wrap;
  user-select: all;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.negative-codeblock {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #ef4444;
  word-break: break-word;
  background: rgba(239, 68, 68, 0.04);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Preset Cards */
.presets-section {
  margin-top: 2rem;
}
.presets-section h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: #e2e8f0;
}
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.preset-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all 0.2s ease;
}
.preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
}
.preset-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
}
.preset-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}
.preset-card .btn {
  align-self: flex-start;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10b981;
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 2000;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem;
  background: rgba(11, 13, 20, 0.9);
  position: relative;
  z-index: 10;
  text-align: center;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-inner a {
  color: #a5b4fc;
  text-decoration: none;
}
.footer-inner a:hover {
  text-decoration: underline;
}
.copyright-note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #4b5563;
}

/* Responsiveness */
@media (max-width: 640px) {
  .brand h1 {
    font-size: 1.8rem;
  }
  .modal-dialog {
    margin: 0;
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }
  .modal-header, .modal-body {
    padding: 1.25rem;
  }
}
