/* Image Detail Page - Terminal/Command Style for AFO */

/* Image Detail Layout */
.image-detail {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
}

/* Image Section - Terminal Display */
.image-section {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.main-image-wrapper {
  background: var(--terminal-surface);
  border: 2px solid var(--terminal-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.main-image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  z-index: 2;
}

.main-image-wrapper:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  transform: translateY(-2px);
}

.main-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
  cursor: zoom-in;
}

.main-image:hover {
  transform: scale(1.02);
}

/* Gallery for multiple images */
.gallery-item {
  display: none;
  position: relative;
  width: 100%;
  height: auto;
}

.gallery-item.active {
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* Gallery thumbnails - Terminal File Browser */
.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 1rem;
  background: var(--terminal-surface-light);
  border-top: 2px solid var(--terminal-border);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) var(--terminal-surface);
  position: relative;
}

.gallery-thumbnails::before {
  content: 'IMAGE_FILES:';
  position: absolute;
  top: -1.5rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: var(--terminal-surface);
  border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 3px;
}

.gallery-thumbnail {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--terminal-border);
  transition: all var(--transition-fast);
  position: relative;
  background: var(--terminal-surface);
}

.gallery-thumbnail::before {
  content: attr(data-index);
  position: absolute;
  top: 2px;
  left: 2px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-cyan);
  background: rgba(10, 14, 26, 0.8);
  padding: 1px 4px;
  border-radius: 2px;
  z-index: 2;
}

.gallery-thumbnail:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.gallery-thumbnail.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.1);
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.gallery-thumbnail:hover img {
  transform: scale(1.1);
}

/* Gallery Navigation */
.gallery-navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
  z-index: 10;
}

.gallery-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.gallery-prev,
.gallery-next {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.gallery-prev::before,
.gallery-next::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: var(--accent-cyan);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.gallery-prev:hover::before,
.gallery-next:hover::before {
  left: 100%;
}

.gallery-prev:disabled,
.gallery-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #666;
}

.gallery-counter {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

.gallery-nav-btn {
  background: rgba(44, 44, 44, 0.8);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  pointer-events: all;
  backdrop-filter: blur(10px);
}

.gallery-nav-btn:hover {
  background: var(--noble-gold);
  transform: scale(1.1);
}

.gallery-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-nav-btn:disabled:hover {
  background: rgba(44, 44, 44, 0.8);
  transform: none;
}

/* Info Section - Terminal Info Panel */
.info-section {
  background: var(--terminal-surface);
  border: 2px solid var(--terminal-border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  height: fit-content;
  position: sticky;
  top: 100px;
  width: 100%;
  max-width: 450px;
  overflow: hidden;
}

.info-section::before {
  content: 'INFO_PANEL:';
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
}

/* Artwork Header - Terminal Header */
.artwork-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--terminal-border);
  margin-top: 1.5rem;
}

.image-title {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1.3;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.image-title::before {
  content: '$ ./';
  color: var(--accent-green);
  font-size: 1.2rem;
}

.artwork-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.creator-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.creator-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.creator-label::before {
  content: '[AUTHOR] ';
  color: var(--accent-green);
}

.creator-name {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.artwork-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.like-btn {
  background: transparent;
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.like-btn::before {
  content: '[LIKE]';
  margin-right: 0.25rem;
}

.like-btn:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.like-btn.liked {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.like-btn.liked::before {
  content: '[LIKED]';
  color: var(--text-success);
}

.like-btn.liked svg {
  fill: currentColor;
}

.like-btn.liked svg path {
  stroke: currentColor;
  fill: currentColor;
}

/* Section Titles - Terminal Commands */
.section-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.section-title::before {
  content: '# ';
  color: var(--accent-green);
}

.section-description {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* Tags - Terminal Labels */
.artwork-tags {
  margin-bottom: 2rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tag {
  background: var(--terminal-surface-light);
  color: var(--accent-purple);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--terminal-border);
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.1rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tag::before {
  content: '[TAG]';
  margin-right: 0.25rem;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.tag:hover {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.tag-icon {
  font-weight: 700;
  opacity: 0.8;
}

.tag-text {
  font-weight: 500;
}

/* Prompts Section - Simplified Structure */
.artwork-prompts {
  margin-bottom: 2rem;
}

.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin-top: 1rem;
}

.prompt-item {
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  padding: 0.8rem;
  position: relative;
  transition: all var(--transition-fast);
  max-width: 100%;
  overflow: hidden;
}

.prompt-item::before {
  content: '$';
  position: absolute;
  top: 8px;
  left: 8px;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-weight: 700;
  animation: blink 2s infinite;
  font-size: 0.9rem;
}

.prompt-item:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  white-space: nowrap;
}

.prompt-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.prompt-number {
  background: var(--accent-green);
  color: var(--terminal-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.prompt-language {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prompt-title h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-left: 1rem;
}

.prompt-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.prompt-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-success);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  max-height: 300px;
  overflow-y: auto;
  /* margin: 0.8rem 0 0.5rem 1.5rem;
  padding: 0.5rem; */
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) transparent;
}

.prompt-text::-webkit-scrollbar {
  width: 4px;
}

.prompt-text::-webkit-scrollbar-track {
  background: transparent;
}

.prompt-text::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 2px;
}

.prompt-text::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

.prompt-copy,
.copy-btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.prompt-copy::before,
.copy-btn::before {
  content: '[COPY]';
}

.prompt-copy:hover,
.copy-btn:hover {
  background: var(--accent-cyan);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.prompt-copy.copied,
.copy-btn.copied {
  background: var(--text-success);
}

.prompt-copy.copied::before,
.copy-btn.copied::before {
  content: '[COPIED]';
}

/* Share Section - Terminal Export Commands */
.share-section {
  margin-top: 2rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.share-btn {
  background: var(--terminal-surface-light);
  border: 2px solid var(--terminal-border);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.share-btn::before {
  content: '[EXPORT]';
  color: var(--text-muted);
  font-size: 0.7rem;
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-cyan);
}

.share-btn.twitter:hover {
  background: #1da1f2;
  border-color: #1da1f2;
  color: white;
  box-shadow: 0 0 15px rgba(29, 161, 242, 0.4);
  transform: translateY(-2px) scale(1.05);
}

.share-btn.twitter:hover::before {
  content: '[TWITTER]';
  color: rgba(255, 255, 255, 0.9);
}

.share-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: white;
  box-shadow: 0 0 15px rgba(24, 119, 242, 0.4);
  transform: translateY(-2px) rotate(1deg);
}

.share-btn.facebook:hover::before {
  content: '[FACEBOOK]';
  color: rgba(255, 255, 255, 0.9);
}

.share-btn.pinterest:hover {
  background: #e60023;
  border-color: #e60023;
  color: white;
  box-shadow: 0 0 15px rgba(230, 0, 35, 0.4);
  transform: translateY(-2px) scale(1.05);
}

.share-btn.pinterest:hover::before {
  content: '[PINTEREST]';
  color: rgba(255, 255, 255, 0.9);
}

.share-btn.copy-link:hover {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: white;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.share-btn.copy-link:hover::before {
  content: '[LINK]';
  color: rgba(255, 255, 255, 0.9);
}

.share-btn.copied {
  background: var(--text-success);
  border-color: var(--text-success);
  color: white;
}

.share-btn.copied::before {
  content: '[COPIED]';
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .image-detail {
    grid-template-columns: 1fr 380px;
    gap: 2rem;
  }

  .image-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .image-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .image-section {
    position: static;
  }

  .info-section {
    position: static;
    padding: 2rem 1.5rem;
  }

  .image-title {
    font-size: 1.8rem;
  }

  .artwork-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .like-btn {
    align-self: flex-start;
  }

  .gallery-thumbnails {
    padding: 1rem;
    gap: 8px;
    padding-bottom: 4rem;
  }

  .gallery-thumbnail {
    width: 60px;
    height: 60px;
  }

  .gallery-nav {
    bottom: 1rem;
    padding: 0.4rem 0.8rem;
    gap: 0.75rem;
  }

  .gallery-prev,
  .gallery-next {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .gallery-counter {
    font-size: 0.8rem;
  }

  .share-buttons {
    gap: 0.75rem;
  }

  .share-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .image-title {
    font-size: 1.5rem;
  }

  .info-section {
    padding: 1.5rem 1rem;
  }

  .gallery-navigation {
    padding: 0 0.5rem;
  }

  .gallery-nav-btn {
    width: 40px;
    height: 40px;
  }

  /* .gallery-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 1rem 1rem 0 0;
    padding: 0.75rem;
  }

  .gallery-thumbnails {
    padding-bottom: 1rem;
  } */

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    justify-content: center;
  }
}

/* Animations */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Loading state */
.image-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--museum-ivory);
  border-radius: 12px;
}

.image-loading .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--noble-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Additional styles for consistency */
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-description {
  color: var(--text-secondary);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .artwork-header {
    padding: 1.5rem 1rem;
  }

  .image-title {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .section-description {
    font-size: 0.9rem;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }
}