* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #13152e;
  --bg-glass: rgba(255, 255, 255, 0.08);
  --bg-glass-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #6b7280;
  --accent: #14f195;
  --accent-hover: #0fd981;
  --accent-purple: #764ba2;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #14f195 0%, #764ba2 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --glow: 0 0 30px rgba(20, 241, 149, 0.4);
  --glow-strong: 0 0 50px rgba(20, 241, 149, 0.6);
  --shadow-premium: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(20, 241, 149, 0.15) 0%, transparent 60%),
    radial-gradient(at 100% 100%, rgba(118, 75, 162, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #0a0e27 0%, #13152e 100%);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 20px;
}

header {
  text-align: center;
  padding: 60px 20px 40px;
  margin-bottom: 50px;
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

h1 {
  font-size: 4.5rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 auto 15px;
  letter-spacing: -2px;
  text-shadow: 0 0 40px rgba(20, 241, 149, 0.3);
  position: relative;
  text-align: center;
  width: 100%;
}

.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 50px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-premium), var(--glow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.card h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.5px;
  text-align: center;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.7;
  text-align: center;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-accent);
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-premium), var(--glow-strong);
  border-color: rgba(20, 241, 149, 0.3);
}

/* Already defined above with text-align */

.card h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.7;
  text-align: center;
}

/* Payment Section */
.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 20px;
}

.price-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--gradient-accent);
  padding: 15px 25px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(20, 241, 149, 0.3);
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bg-primary);
  line-height: 1;
}

.price-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bg-primary);
  opacity: 0.8;
}

.payment-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 25px;
  text-align: center;
}

.wallet-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--accent);
  word-break: break-all;
  font-weight: 500;
}

.royalties-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 241, 149, 0.12);
  border: 1px solid rgba(20, 241, 149, 0.3);
  border-left: 4px solid var(--accent);
  padding: 18px 20px;
  border-radius: 12px;
  margin: 25px 0;
}

.royalties-icon {
  font-size: 1.5rem;
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.btn-primary, .btn-secondary, .btn-outline {
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--bg-primary);
  box-shadow: 0 8px 25px rgba(20, 241, 149, 0.4);
  flex: 1;
  min-width: 200px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(20, 241, 149, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  width: 100%;
}

.btn-outline:hover {
  background: rgba(20, 241, 149, 0.1);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

/* NFT Section */
.nft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.nft-badge {
  background: var(--gradient-gold);
  color: var(--bg-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.nft-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.nft-image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1;
}

#nftCanvas {
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 400px;
  border-radius: 20px;
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(20, 241, 149, 0.3);
  object-fit: contain;
}

.nft-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(20, 241, 149, 0.3) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.nft-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nft-mint {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nft-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-value.verified {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden {
  display: none !important;
}

/* Articles Section */
.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.articles-header h2 {
  font-size: 2.8rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: -1px;
}

.search-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

#searchInput, #categoryFilter {
  padding: 14px 22px;
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

#searchInput {
  min-width: 300px;
  flex: 1;
}

#searchInput:focus, #categoryFilter:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(20, 241, 149, 0.2);
  background: var(--bg-glass-strong);
}

#categoryFilter {
  min-width: 200px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 30px;
  margin-top: 40px;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

article {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

article:hover {
  transform: translateY(-8px);
  box-shadow: var(--glow);
  border-color: rgba(20, 241, 149, 0.4);
}

article:hover::before {
  opacity: 1;
}

article h4 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

article .meta {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}

article p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.status-message {
  position: fixed;
  top: 30px;
  right: 30px;
  padding: 18px 28px;
  border-radius: 16px;
  backdrop-filter: blur(30px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  max-width: 420px;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-message.success {
  background: rgba(20, 241, 149, 0.25);
  border-color: var(--accent);
  color: var(--accent);
}

.status-message.error {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
}

.status-message.info {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #3b82f6;
}

footer {
  text-align: center;
  padding: 50px 20px;
  margin-top: 80px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

footer p {
  margin-bottom: 12px;
}

footer code {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Courier New', monospace;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .nft-display {
    grid-template-columns: 1fr;
  }

  .nft-image-container {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }

  .card {
    padding: 30px 20px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .articles-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    flex-direction: column;
  }

  #searchInput {
    min-width: 100%;
  }

  .payment-header {
    flex-direction: column;
    align-items: stretch;
  }

  .price-display {
    width: 100%;
    justify-content: center;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
  }

  header {
    padding: 40px 20px 30px;
  }
}
