/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  max-width: 600px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 500;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.nav-item .nav-icon {
  font-size: 1.35rem;
}

.nav-item.active {
  color: var(--accent-gold);
  font-weight: 700;
}

.nav-item:active {
  background-color: rgba(212, 175, 55, 0.1);
}

/* Touch-optimized Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-amber));
  color: #08090c;
  box-shadow: var(--shadow-gold);
}

.btn-primary:active {
  transform: scale(0.98);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:active {
  background: rgba(212, 175, 55, 0.15);
}

.btn-outline-gold {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-outline-gold:active {
  background: var(--accent-gold-glow);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
  background: rgba(239, 68, 68, 0.3);
}

.btn-copy {
  background: linear-gradient(135deg, #1e2336, #161927);
  color: var(--accent-gold-light);
  border: 1px solid var(--accent-gold);
  font-size: 1rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-copy:active {
  background: var(--accent-gold);
  color: #08090c;
}

.btn-copy.copied {
  background: var(--color-success) !important;
  color: #ffffff !important;
  border-color: var(--color-success) !important;
}

/* Prompt Cards */
.prompt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.prompt-card:active {
  transform: scale(0.99);
  border-color: var(--accent-gold);
}

.prompt-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.prompt-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.prompt-card-fav-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  transition: transform 0.2s ease;
}

.prompt-card-fav-btn.is-fav {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.prompt-card-fav-btn:active {
  transform: scale(1.25);
}

.prompt-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--accent-gold-light);
  margin-bottom: 10px;
}

.prompt-card-instruments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.prompt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 10px;

}

/* Rating Stars */
.rating-stars {
  display: inline-flex;
  gap: 2px;
  color: #4b5563;
  font-size: 1rem;
}

.rating-stars .star.filled {
  color: #f59e0b;
}

.rating-stars-interactive {
  display: inline-flex;
  gap: 8px;
  font-size: 1.8rem;
  cursor: pointer;
}

.rating-stars-interactive .star {
  color: #374151;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating-stars-interactive .star.active {
  color: #f59e0b;
}

/* Badges & Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.chip-gold {
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold-light);
  border-color: var(--border-subtle);
}

.chip-type {
  background: rgba(224, 138, 60, 0.15);
  color: var(--accent-amber);
  border-color: rgba(224, 138, 60, 0.3);
}

.chip-selectable {
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
}

.chip-selectable.selected {
  background: var(--accent-gold);
  color: #08090c;
  font-weight: 700;
  border-color: var(--accent-gold);
}

/* Stats Counter Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-card);
}

.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Search Bar & Forms */
.search-container {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  height: 50px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 45px 0 42px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label.required::after {
  content: " *";
  color: var(--accent-amber);
}

.form-control {
  width: 100%;
  height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-glow);
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 12px;
  line-height: 1.4;
  resize: vertical;
  font-family: inherit;
}

/* Modals & Bottom Sheets */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 18px calc(var(--bottom-nav-height) + 20px) 18px;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: var(--shadow-elevated);
}

.modal-overlay.active .bottom-sheet {
  transform: translateY(0);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold-light);
}

.sheet-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: var(--accent-gold);
  color: #08090c;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Code / Prompt Display Box */
.prompt-box {
  background: #0d0e15;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

/* Floating Quick Copy Bar */
.floating-copy-bar {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 560px;
  display: flex;
  gap: 10px;
  z-index: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}
