/**
 * NFT Cards Styles
 * Styling for NFT grid, cards, and social sharing
   Used in origins.php, ascendant.php and sentient.php to display NFT collections.
 */

/* ============================================
   NFT Grid Layout
   ============================================ */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

@media (max-width: 640px) {
  .nft-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ============================================
   NFT Card Base
   ============================================ */
.nft-card {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 35, 0.95));
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.nft-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 12px 40px rgba(0, 255, 255, 0.15);
}

.nft-card.sold-out {
  opacity: 0.7;
}

.nft-card.sold-out .nft-image::after {
  content: 'SOLD OUT';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: rgba(255, 0, 0, 0.8);
  color: white;
  padding: 8px 24px;
  font-weight: bold;
  font-size: 18px;
  border-radius: 4px;
}

/* ============================================
   NFT Image Container
   ============================================ */
.nft-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.nft-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.nft-card:hover .nft-image img {
  transform: scale(1.05);
}

.nft-image .loading-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   Bonus Badge
   ============================================ */
.bonus-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  animation: pulse-badge 2s infinite;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bonus-badge i {
  font-size: 12px;
}

@keyframes pulse-badge {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.85; 
    transform: scale(1.02);
  }
}

/* Token ID Badge */
.token-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #0ff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  backdrop-filter: blur(4px);
}

/* ============================================
   NFT Info Section
   ============================================ */
.nft-info {
  padding: 16px;
}

.nft-info h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-price {
  font-size: 20px;
  font-weight: bold;
  color: #0ff;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nft-price .eth-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   Supply Progress Bar
   ============================================ */
.supply-container {
  margin: 12px 0;
}

.supply-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.supply-progress {
  height: 100%;
  background: linear-gradient(90deg, #0ff, #00ff88);
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
}

.supply-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.supply-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}

/* ============================================
   Burn Rewards Section
   ============================================ */
.burn-rewards {
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.1), rgba(255, 50, 0, 0.05));
  border: 1px solid rgba(255, 100, 0, 0.3);
  border-radius: 8px;
  padding: 10px;
  margin: 12px 0;
}

.burn-rewards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.burn-rewards-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #ff6400;
  font-weight: 600;
}

.burn-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.burn-progress {
  height: 6px;
  background: rgba(255, 100, 0, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.burn-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6400, #ff3200);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.bonus-available {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #FFD700;
  margin-top: 6px;
  font-weight: 600;
}

.bonus-available i {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* ============================================
   Action Buttons
   ============================================ */
.nft-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-mint,
.btn-burn,
.btn-evolve {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-mint {
  background: linear-gradient(135deg, #0ff, #00cccc);
  color: #000;
}

.btn-mint:hover:not(:disabled) {
  background: linear-gradient(135deg, #00ffff, #00e6e6);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
}

.btn-burn,
.btn-evolve {
  background: linear-gradient(135deg, #ff6400, #ff3200);
  color: #fff;
}

.btn-burn:hover:not(:disabled),
.btn-evolve:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff7a1a, #ff4a1a);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 100, 0, 0.4);
}

.btn-mint:disabled,
.btn-burn:disabled,
.btn-evolve:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Wallet Not Connected button */
.btn-connect-wallet {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 2px dashed rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
  padding: 9px 16px;
  border-radius: 8px;
}

.btn-connect-wallet::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer-connect 2s infinite;
}

@keyframes shimmer-connect {
  0% { left: -100%; }
  100% { left: 100%; }
}

.btn-connect-wallet i {
  color: rgba(255, 255, 255, 0.5);
}

/* Secondary button style */
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.5);
  color: #0ff;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(0, 255, 255, 0.1);
  border-color: #0ff;
}

/* View Metadata button style */
.btn-view-metadata {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(160, 32, 240, 0.5);
  border-radius: 8px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: transparent;
  color: #a020f0;
  text-decoration: none;
}

.btn-view-metadata:hover {
  background: rgba(160, 32, 240, 0.15);
  border-color: #a020f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(160, 32, 240, 0.3);
}

/* ============================================
   Social Share Section
   ============================================ */
.social-share {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  transform: scale(1.15);
  opacity: 0.9;
}

.share-btn.twitter {
  background: #1DA1F2;
}

.share-btn.facebook {
  background: #4267B2;
}

.share-btn.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-btn.copy {
  background: rgba(255, 255, 255, 0.2);
}

.share-btn.copy:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Collection Header
   ============================================ */
.collection-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px;
}

.collection-header h1 {
  font-size: 48px;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(135deg, #0ff, #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.collection-header .subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

.collection-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: #0ff;
  font-family: 'Orbitron', sans-serif;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

/* ============================================
   Filters & Search
   ============================================ */
.collection-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 16px;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-box i {
  color: rgba(255, 255, 255, 0.4);
  margin-right: 10px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.3);
  color: #0ff;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding: 20px 0;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled),
.page-btn.active {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.3);
  color: #0ff;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(0, 255, 255, 0.2);
  border-top-color: #0ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: #0ff;
  margin-top: 20px;
  font-size: 18px;
  font-family: 'Rajdhani', sans-serif;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(30, 30, 50, 0.95);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  padding: 16px 20px;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(10px);
  max-width: 350px;
}

.toast.success {
  border-color: rgba(0, 255, 100, 0.5);
}

.toast.success i {
  color: #00ff64;
}

.toast.error {
  border-color: rgba(255, 50, 50, 0.5);
}

.toast.error i {
  color: #ff3232;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  backdrop-filter: blur(8px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.98), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 24px;
  font-family: 'Orbitron', sans-serif;
  color: #0ff;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 50, 50, 0.3);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .collection-header h1 {
    font-size: 32px;
  }
  
  .collection-stats {
    gap: 20px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .nft-info h3 {
    font-size: 16px;
  }
  
  .nft-price {
    font-size: 18px;
  }
  
  .social-share {
    gap: 8px;
  }
  
  .share-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
