/**
 * NFT Detail Page Styles
 * Cyberpunk-themed styling for the NFT detail view

   Used in nft.php to display single NFT information.
 */

/* ========================================
   NFT Page Container
   ======================================== */
.nft-page {
  min-height: 100vh;
  background: var(--cyber-black, #0a0a0f);
  color: var(--text-primary, #e0e0e0);
}

/* ========================================
   Loading State
   ======================================== */
.nft-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1rem;
  color: var(--text-muted, #888);
}

.nft-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color, #333);
  border-top: 3px solid var(--neon-cyan, #00f0ff);
  border-radius: 50%;
  animation: nft-spin 1s linear infinite;
}

@keyframes nft-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   Error State
   ======================================== */
.nft-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.error-content {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid rgba(255, 51, 102, 0.3);
  border-radius: 12px;
  max-width: 500px;
}

.error-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.error-content p {
  color: #ff6b6b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ========================================
   NFT Container & Layout
   ======================================== */
.nft-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.nft-layout {
  display: grid;
  /* Give the image a smaller column and the details more room */
  grid-template-columns: 40% 60%;
  gap: 3rem;
  align-items: start;
  width: 100%;
}

/* Limit image column on very wide screens so details stay readable */
.nft-image-section {
  max-width: 580px;
}

@media (max-width: 968px) {
  .nft-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ========================================
   NFT Image Section
   ======================================== */
.nft-image-section {
  position: sticky;
  top: 2rem;
}

.nft-image-container {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(160, 32, 240, 0.1));
  border: 2px solid var(--border-color, #333);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.nft-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 400px;
  font-size: 1.2rem;
  color: var(--text-muted, #888);
  background: rgba(0, 0, 0, 0.3);
}

/* ========================================
   NFT Details Section
   ======================================== */
.nft-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nft-title {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--neon-cyan, #00f0ff);
  margin: 0;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.nft-description {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-secondary, #aaa);
  margin: 0;
  text-align: justify;
}

/* ========================================
   NFT Status Grid
   ======================================== */
.nft-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .nft-status-grid {
    grid-template-columns: 1fr;
  }
}

.status-item {
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 0.4rem;
  text-align: center;
}

.status-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #888);
  margin-bottom: 0.25rem;
}

.status-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

/* ========================================
   NFT Sections
   ======================================== */
.nft-section {
  background: rgba(26, 26, 46, 0.4);
  border: 1px solid var(--border-color, #333);
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.nft-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neon-cyan, #00f0ff);
  margin: 0 0 1rem 0;
}

/* ========================================
   Traits Grid
   ======================================== */
.nft-traits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.trait-card {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.trait-type {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--neon-cyan, #00f0ff);
  margin-bottom: 0.25rem;
}

.trait-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}

.no-traits {
  color: var(--text-muted, #888);
  font-style: italic;
  margin: 0;
}

/* ========================================
   Evolution Path
   ======================================== */
.nft-evolution {
  text-align: center;
}

.evolution-path {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
  overflow-x: none;
  padding-bottom: 0.5rem;
}

.evolution-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.4;
  transition: all 0.3s;
  min-width: 110px;
}

.evolution-stage.active {
  opacity: 1;
  transform: scale(1.1);
}

.evolution-stage.completed {
  opacity: 0.7;
}

.stage-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--border-color, #333);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
}

.evolution-stage.active .stage-icon {
  box-shadow: 0 0 15px currentColor;
}

.stage-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.evolution-arrow {
  font-size: 1.5rem;
  color: var(--text-muted, #888);
}

.evolution-hint {
  font-size: 0.9rem;
  color: var(--text-secondary, #aaa);
  margin: 0;
  font-style: italic;
}

/* ========================================
   Wallet Info
   ======================================== */
.nft-wallet-info {
  padding: 1rem;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
}

.wallet-connected {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wallet-label {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
}

.wallet-address {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--neon-cyan, #00f0ff);
}

/* ========================================
   Action Buttons
   ======================================== */
.nft-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.nft-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(26, 26, 46, 0.4);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
}

.quantity-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quantity-input-group label {
  color: var(--text-muted, #888);
  font-size: 0.9rem;
  font-weight: 500;
}

.quantity-input {
  width: 80px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color, #333);
  border-radius: 4px;
  color: var(--text-primary, #e0e0e0);
  font-size: 1rem;
  text-align: center;
  transition: all 0.3s;
}

.quantity-input:focus {
  outline: none;
  border-color: var(--neon-cyan, #00f0ff);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
  opacity: 1;
}

.quantity-hint {
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  font-style: italic;
}

.nft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  border: 2px solid transparent;
  width: 100%;
}

.nft-btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan, #00f0ff), var(--neon-magenta, #ff00ff));
  color: #000;
  border: none;
}

.nft-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 240, 255, 0.4);
}

.nft-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nft-btn-secondary {
  background: transparent;
  color: var(--neon-cyan, #00f0ff);
  border: 2px solid var(--neon-cyan, #00f0ff);
}

.nft-btn-secondary:hover {
  background: rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
}

/* ========================================
   Contract Info Cards
   ======================================== */
.info-card {
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid var(--border-color, #333);
  padding: 1.25rem;
  border-radius: 8px;
  text-align: center;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary, #e0e0e0);
}

.info-card p {
  margin: 0;
  color: var(--text-muted, #888);
  font-size: 0.9rem;
}

.info-card .mono {
  font-family: monospace;
  font-size: 0.85rem;
}

/* ========================================
   Eligibility Message
   ======================================== */
.nft-eligibility-message {
  padding: 1rem;
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 8px;
  margin-top: 1rem;
}

.eligibility-warning {
  text-align: center;
}

.eligibility-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.eligibility-warning p {
  margin: 0.5rem 0;
  color: #ffa500;
}

.eligibility-hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

.eligibility-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--neon-cyan, #00f0ff);
  text-decoration: none;
  font-weight: 500;
}

.eligibility-link:hover {
  text-decoration: underline;
}

/* ========================================
   Burn Button Style
   ======================================== */
.nft-btn-burn {
  background: linear-gradient(135deg, #ff6400, #ff3200);
  color: #fff;
  border: none;
}

.nft-btn-burn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 100, 0, 0.4);
}

.nft-btn-burn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
  .nft-title {
    font-size: 1.4rem;
    word-break: break-word;
  }

  .nft-description {
    font-size: 0.95rem;
  }

  .nft-image-section {
    position: static;
    max-width: 100%;
  }

  .nft-image-container {
    max-height: 400px;
  }

  .nft-actions {
    flex-direction: column;
  }

  .nft-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .nft-container {
    padding: 0;
  }

  .nft-section {
    padding: 1rem;
  }

  .nft-section-title {
    font-size: 1.05rem;
  }

  .nft-status-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .nft-status-grid .status-item[style*="span 4"] {
    grid-column: span 2;
  }

  .status-value {
    font-size: 0.95rem;
  }

  .status-label {
    font-size: 0.65rem;
  }

  .evolution-path {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  .evolution-stage {
    min-width: 80px;
  }

  .stage-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .stage-name {
    font-size: 0.75rem;
  }

  .evolution-arrow {
    font-size: 1rem;
  }

  .nft-traits {
    grid-template-columns: repeat(2, 1fr);
  }

  .wallet-connected {
    flex-wrap: wrap;
    font-size: 0.85rem;
  }

  .quantity-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .info-card {
    padding: 0.75rem;
  }

  .info-card h3 {
    font-size: 0.9rem;
  }

  .info-card p {
    font-size: 0.8rem;
    word-break: break-all;
  }
}
