/* Styles spécifiques à la page de détails NFT */

/* Loading et Error States */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 0, 64, 0.3);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-state {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.error-content {
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.error-content h2 {
  font-family: var(--font-primary);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.error-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
  padding: 6rem 0 1rem;
  background: var(--background-medium);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-nav a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

/* NFT Header */
.nft-header {
  padding: 2rem 0;
  background: var(--background-medium);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nft-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.nft-title-section {
  flex: 1;
}

.nft-title {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nft-id {
  font-family: 'Courier New', monospace;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.nft-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-small);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: rgba(255, 0, 64, 0.2);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.favorite-btn.active {
  color: var(--primary-color);
  background: rgba(255, 0, 64, 0.1);
}

/* NFT Content */
.nft-content {
  padding: 3rem 0;
}

.nft-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* Media Section */
.media-section {
  position: sticky;
  top: 100px;
}

.media-container {
  position: relative;
  background: var(--background-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* كان داكن جدًا */
  margin-bottom: 1.5rem;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 320px; /* تحجيم العرض */
  margin: 0 auto;    /* لتوسيط الفيديو */
  aspect-ratio: 1;
}


.nft-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--background-dark);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.video-container:hover .video-overlay {
  opacity: 1;
}

.play-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 0, 64, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: auto;
}

.play-btn:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.gif-container {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.nft-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Media Controls */
.media-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.media-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-small);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.media-btn:hover {
  background: rgba(255, 0, 64, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Info Section */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-card {
  background: linear-gradient(145deg, var(--background-light), var(--background-medium));
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-title {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.nft-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

/* Attributes Grid */
.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.attribute-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: var(--border-radius-small);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.attribute-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.attribute-value {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Technical Details */
.technical-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-value {
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

/* IPFS Links */
.ipfs-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ipfs-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-small);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.ipfs-link:hover {
  background: rgba(255, 0, 64, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Related NFTs */
.related-nfts {
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.related-card {
  background: linear-gradient(145deg, var(--background-light), var(--background-medium));
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.related-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.related-card:hover .related-image {
  transform: scale(1.05);
}

.related-content {
  padding: 1.5rem;
}

.related-title {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.related-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Share Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content {
  background: var(--background-medium);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  font-family: var(--font-primary);
  color: var(--text-primary);
  margin: 0;
}

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

.close-btn:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 1.5rem;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.share-option {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-small);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 0.9rem;
}

.share-option:hover {
  background: rgba(255, 0, 64, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.share-url {
  display: flex;
  gap: 0.5rem;
}

.share-url input {
  flex: 1;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-small);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.copy-btn {
  padding: 0.75rem 1rem;
  background: var(--primary-color);
  border: none;
  border-radius: var(--border-radius-small);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.copy-btn:hover {
  background: #ff6b9d;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nft-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .media-section {
    position: static;
  }
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 5rem 0 1rem;
  }
  
  .nft-header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nft-actions {
    align-self: flex-start;
  }
  
  .nft-layout {
    gap: 2rem;
  }
  
  .info-card {
    padding: 1.5rem;
  }
  
  .attributes-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    gap: 0.75rem;
  }
  
  .media-controls {
    flex-direction: column;
  }
  
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .nft-content {
    padding: 2rem 0;
  }
  
  .info-card {
    padding: 1rem;
  }
  
  .modal {
    padding: 1rem;
  }
  
  .share-options {
    grid-template-columns: 1fr;
  }
  
  .share-url {
    flex-direction: column;
  }
  
  .breadcrumb-nav {
    flex-wrap: wrap;
  }
}

/* Animation pour l'apparition du contenu */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nft-details {
  animation: fadeInUp 0.6s ease-out;
}

/* Effet de chargement pour les médias */
.media-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

.media-container.loaded::before {
  display: none;
}

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

