/* Beyond AI Lab - Responsive (shared) */

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
  }

  .header {
    padding: 1rem;
  }

  .nav-links {
    top: 57px;
  }

  .hero {
    padding: 4rem 1.5rem 3rem;
  }

  .creator {
    padding: 2rem 1.5rem;
  }

  .creator-card {
    padding: 2rem;
  }

  .labs {
    padding: 3rem 1.5rem 4rem;
  }

  .labs-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 4rem 1.5rem 3rem;
  }

  .home-section {
    padding: 3rem 1.5rem;
  }

  .home-labs-grid {
    grid-template-columns: 1fr;
  }

  .lab-hub-grid {
    grid-template-columns: 1fr;
  }

  .lab-feature-grid {
    grid-template-columns: 1fr;
  }

  .lab-workflow-grid {
    grid-template-columns: 1fr;
  }

  .lab-hub-section,
  .lab-feature-section,
  .lab-workflow-section,
  .latest-additions-section,
  .quick-add-section,
  .archive-stats-section,
  .featured-favorites-section,
  .continue-creating-section,
  .recent-activity-section {
    padding: 3rem 1.5rem;
  }

  .home-hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .home-hero-actions .btn-cta {
    min-width: 200px;
    text-align: center;
  }

  .home-featured-grid {
    grid-template-columns: 1fr;
  }

  .home-visuals-grid {
    grid-template-columns: 1fr;
  }

  .image-library-hero,
  .prompt-library-hero,
  .music-library-hero,
  .story-library-hero,
  .unified-search-hero,
  .add-entry-hero {
    padding: 4rem 1.5rem 2rem;
  }

  .library-quick-add {
    margin-top: 1rem;
  }

  .library-quick-add-link {
    display: inline-block;
    min-height: 44px;
    padding: 0.6rem 1.25rem;
    box-sizing: border-box;
  }

  .library-empty-action {
    margin-top: 1.5rem;
  }

  .library-empty-action-link {
    min-height: 44px;
    padding: 0.6rem 1.25rem;
    box-sizing: border-box;
  }

  .image-library-section,
  .prompt-library-section,
  .music-library-section,
  .story-library-section,
  .unified-search-section,
  .add-entry-section {
    padding: 0 1.5rem 2rem;
  }

  .music-library-modal-content,
  .story-library-modal-content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .music-library-favorite-toggle,
  .story-library-favorite-toggle {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }

  .music-library-copy-button,
  .music-library-modal-copy-button,
  .story-library-copy-button,
  .story-library-modal-copy-button {
    min-height: 36px;
    padding: 0.45rem 0.85rem;
  }

  .image-library-controls,
  .prompt-library-controls,
  .music-library-controls,
  .story-library-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .image-library-search,
  .prompt-library-search,
  .music-library-search,
  .story-library-search {
    min-width: 0;
  }

  .prompt-library-grid,
  .music-library-grid,
  .story-library-grid,
  .unified-search-grid {
    grid-template-columns: 1fr;
  }

  .unified-search-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .unified-search-input {
    min-width: 0;
  }

  .prompt-library-modal-content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .prompt-library-favorite-toggle {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }

  .landing-hero {
    padding: 4rem 1.5rem 3rem;
  }

  .hero-creator-name {
    font-size: 1.5rem;
  }

  .landing-section {
    padding: 3rem 1.5rem;
  }

  .featured-music-grid {
    grid-template-columns: 1fr;
  }

  .featured-visuals-grid {
    grid-template-columns: 1fr;
  }

  .visual-gallery {
    grid-template-columns: 1fr;
  }

  .landing-impact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 1.5rem;
    gap: 1.5rem;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-bottom {
    padding: 1.25rem 1.5rem 2rem;
  }

  .footer-mantra {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
  }

  .prompt-lab-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .prompt-lab-form-section {
    padding: 0 1.5rem;
  }

  .prompt-lab-card {
    padding: 1.5rem;
  }

  .music-lab-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .music-lab-content {
    padding: 0 1.5rem 3rem;
  }

  .filter-bar {
    gap: 0.4rem;
    margin-bottom: 1.5rem;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  .song-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .story-lab-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .story-section {
    padding: 0 1.5rem 3rem;
  }

  .story-card {
    padding: 1.75rem;
  }

  .journey-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 1rem;
  }

  .journey-year {
    font-size: 0.85rem;
  }

  .philosophy-card {
    padding: 2rem 1.5rem;
  }

  .philosophy-mantra {
    font-size: 1.35rem;
    letter-spacing: 0.1em;
  }

  .visual-lab-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .visual-lab-content {
    padding: 0 1.5rem 3rem;
  }

  .image-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .gallery {
    padding: 30px 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .impact-lab-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .impact-section {
    padding: 0 1.5rem 3rem;
  }

  .impact-card {
    padding: 1.75rem;
  }

  .impact-highlights {
    grid-template-columns: 1fr 1fr;
  }

  .impact-flow {
    grid-template-columns: 1fr;
  }

  .vibe-coding-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .vibe-section {
    padding: 0 1.5rem 3rem;
  }

  .vibe-card {
    padding: 1.75rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .workflow-flow {
    padding: 1.5rem;
    gap: 0.35rem;
  }

  .workflow-step {
    font-size: 0.85rem;
  }

  .vibe-philosophy {
    font-size: 1.1rem;
  }
}

.visual-filter {
  margin-bottom: 20px;
}

.visual-filter button,
.visual-filter .filter-btn {
  background: rgba(0, 255, 255, 0.15);
  border: 1px solid rgba(0, 255, 255, 0.35);
  color: #0ff;
  padding: 8px 14px;
  margin-right: 8px;
  margin-bottom: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.visual-filter button:hover,
.visual-filter .filter-btn:hover {
  background: rgba(0, 255, 255, 0.25);
  border-color: rgba(0, 255, 255, 0.5);
}

.visual-filter button.active,
.visual-filter .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.12);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.gallery-item {
  width: 300px;
  margin: 10px;
  display: inline-block;
  vertical-align: top;
}

.gallery-item img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.gallery-info {
  padding: 12px 0 0;
}

.gallery-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery-info .visual-category {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.08em;
}

.visual-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

.gallery-item {
  width: 300px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.12);
}

.gallery-item img {
  width: 100%;
  display: block;
}

.gallery-info {
  padding: 14px;
}

.gallery-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #fff;
}

.visual-category {
  display: inline-block;
  font-size: 12px;
  color: #0ff;
  border: 1px solid rgba(0, 255, 255, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  overflow: auto;
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-width: 1100px;
  max-height: 90vh;
  width: 100%;
  background: rgba(8, 16, 24, 0.85);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.12);
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 36px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  color: #0ff;
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
}

.lightbox-media-wrap {
  flex: 0 0 auto;
  max-width: 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-media-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-info {
  flex: 1;
  min-width: 0;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lightbox-info-category {
  display: inline-block;
  font-size: 0.75rem;
  color: #0ff;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 999px;
  width: fit-content;
}

.lightbox-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem;
}

.lightbox-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.lightbox-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.lightbox-prompt-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.04);
}

.lightbox-prompt-box .prompt-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  font-family: var(--font-mono);
  margin: 0 0 10px;
}

.lightbox-pinterest-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: inset 0 0 16px rgba(0, 255, 255, 0.03);
}

.lightbox-pinterest-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.lightbox-related {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.lightbox-related .lightbox-info-label {
  margin-top: 0.75rem;
}

.lightbox-related .lightbox-info-label:first-child {
  margin-top: 0;
}

.lightbox-related-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.lightbox-linked-area {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.lightbox-linked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lightbox-link-btn {
  text-decoration: none;
  display: inline-block;
}

.link-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.link-prompt-modal--open {
  opacity: 1;
  visibility: visible;
}

.link-prompt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.link-prompt-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(8, 16, 24, 0.95);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.1);
}

.link-prompt-modal-title {
  font-size: 1.1rem;
  color: #0ff;
  margin: 0 0 0.5rem;
  letter-spacing: 0.04em;
}

.link-prompt-modal-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.4;
}

.link-prompt-list {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.link-prompt-row {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 4px;
  text-align: left;
  background: rgba(0, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.link-prompt-row:hover {
  border-color: rgba(0, 255, 255, 0.4);
  background: rgba(0, 255, 255, 0.12);
}

.link-prompt-modal-actions {
  display: flex;
  gap: 0.75rem;
}

/* Artwork Manager */
.artwork-manager-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.artwork-manager-bar .export-btn {
  background: rgba(0, 255, 255, 0.12);
  border: 1px solid rgba(0, 255, 255, 0.35);
  color: #0ff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.artwork-manager-bar .export-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}

.gallery-item-actions {
  display: flex;
  gap: 6px;
  padding: 8px 14px 14px;
  flex-wrap: wrap;
}

.artwork-action-btn {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 255, 0.25);
  background: rgba(0, 255, 255, 0.06);
  color: #0ff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
}

.artwork-action-btn:hover {
  background: rgba(0, 255, 255, 0.15);
  border-color: rgba(0, 255, 255, 0.4);
}

.artwork-delete-btn:hover {
  border-color: rgba(255, 100, 100, 0.5);
  color: #ff8888;
  background: rgba(255, 100, 100, 0.1);
}

/* Edit / Add Artwork Modal */
.edit-artwork-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.edit-artwork-modal--open {
  opacity: 1;
  visibility: visible;
}

.edit-artwork-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.edit-artwork-modal-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(8, 16, 24, 0.97);
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 0 48px rgba(0, 255, 255, 0.12);
}

.edit-artwork-modal-title {
  font-size: 1.15rem;
  color: #0ff;
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
}

.edit-artwork-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.edit-artwork-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.edit-artwork-label:first-of-type {
  margin-top: 0;
}

.edit-artwork-featured-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-top: 0.75rem;
}

.edit-artwork-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #0ff;
  cursor: pointer;
}

.edit-artwork-input,
.edit-artwork-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.edit-artwork-input:focus,
.edit-artwork-textarea:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.15);
}

.edit-artwork-textarea {
  resize: vertical;
  min-height: 60px;
}

.edit-artwork-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.edit-artwork-save-btn {
  background: rgba(0, 255, 255, 0.2);
  border-color: rgba(0, 255, 255, 0.4);
  color: #0ff;
}

.edit-artwork-save-btn:hover {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.3);
}

.library-card--highlight {
  animation: library-card-highlight 2s ease-out;
}

@keyframes library-card-highlight {
  0% {
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
  }
  100% {
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .lightbox-content {
    flex-direction: column;
    max-height: 95vh;
  }

  .lightbox-media-wrap {
    max-width: 100%;
    padding: 16px;
  }

  .lightbox-media-wrap img {
    max-height: 50vh;
  }

  .lightbox-info {
    padding: 16px;
  }
}

.gallery-item img {
  cursor: pointer;
}

/* Visual cards (index.html Featured Visuals) */
.visual-gallery .visual-card {
  width: 300px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.visual-gallery .visual-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.visual-gallery .visual-card .visual-category {
  display: block;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #0ff;
  letter-spacing: 0.06em;
}

.visual-gallery .visual-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.18);
}

.visual-gallery .visual-card.hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.visual-gallery .visual-card.visible {
  opacity: 1;
  transform: scale(1);
  position: relative;
  visibility: visible;
}

.ai-generator {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
}

.ai-generator input {
  width: 60%;
  padding: 10px;
  margin-right: 10px;
  background: #0b0f14;
  border: 1px solid #0ff;
  color: white;
}

.ai-generator button {
  padding: 10px 16px;
  background: #0ff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.generated-card {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.visual-filter button {
  transition: all 0.25s ease;
}

.visual-filter button.active {
  background: #0ff;
  color: #081018;
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.35);
  transform: translateY(-1px);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 255, 255, 0.12);
  border: 1px solid rgba(0, 255, 255, 0.28);
  color: #0ff;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-nav:hover {
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.22);
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.gallery-toolbar label {
  color: #0ff;
  font-size: 14px;
}

.gallery-toolbar select {
  background: #0b0f14;
  color: white;
  border: 1px solid rgba(0, 255, 255, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #0ff;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(8, 16, 24, 0.72);
}

