/* =============================================================================
   Imperial Heat — NFC Badge System Theme
   Dark emerald + gold, art deco / Gatsby style
   ============================================================================= */

:root {
  --emerald-bg: #0A261D;
  --emerald-light: #123d2f;
  --bg-dark: #051A13;
  --primary-emerald: #0A3B2B;
  --secondary-emerald: #145A45;
  --accent-gold: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #997A00;
  --text-light: #E8F1EE;
  --text-muted: #8AA89D;
  --surface-dark: #0d2e22;
}

/* ---- Base ---- */
.nfc-page {
  font-family: 'Montserrat', 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
}
.nfc-page h1, .nfc-page h2, .nfc-page h3 {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
}

/* ---- Glass Panel ---- */
.glass-panel {
  background: rgba(10, 59, 43, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ---- Gold Gradient Text ---- */
.gold-gradient-text {
  background: linear-gradient(to right, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Gold Gradient Background ---- */
.gold-gradient-bg {
  background: linear-gradient(135deg, #D4AF37 0%, #F3E5AB 50%, #D4AF37 100%);
}

/* ---- Deco Border (corner ornaments) ---- */
.deco-border {
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.deco-border::before,
.deco-border::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--accent-gold);
  pointer-events: none;
}
.deco-border::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}
.deco-border::after {
  top: -1px;
  right: -1px;
  border-top: 2px solid;
  border-right: 2px solid;
}
.deco-border-bottom::before,
.deco-border-bottom::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--accent-gold);
  pointer-events: none;
}
.deco-border-bottom::before {
  bottom: -1px;
  left: -1px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}
.deco-border-bottom::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

/* ---- Badge States ---- */
.badge-earned {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}
.badge-unearned {
  filter: brightness(0.3) sepia(1) hue-rotate(110deg) saturate(3);
  opacity: 0.4;
}

/* ---- Tier Animations ---- */
.tier-mythical {
  animation: holify 4s infinite linear;
  border-width: 4px !important;
}
@keyframes holify {
  0% { box-shadow: 0 0 15px #ff00ff, 0 0 25px #00ffff; border-color: #ff00ff; }
  33% { box-shadow: 0 0 20px #00ffff, 0 0 30px #ffff00; border-color: #00ffff; }
  66% { box-shadow: 0 0 20px #ffff00, 0 0 30px #ff00ff; border-color: #ffff00; }
  100% { box-shadow: 0 0 15px #ff00ff, 0 0 25px #00ffff; border-color: #ff00ff; }
}

.tier-legendary {
  animation: gold-pulse 2s infinite ease-in-out;
  border-color: #d4af37 !important;
  border-width: 4px !important;
}
@keyframes gold-pulse {
  0% { box-shadow: 0 0 10px rgba(212,175,55,0.6); }
  50% { box-shadow: 0 0 25px rgba(212,175,55,1); }
  100% { box-shadow: 0 0 10px rgba(212,175,55,0.6); }
}

.tier-rare {
  animation: blue-shimmer 3s infinite ease-in-out;
  border-color: #00f2ff !important;
  border-width: 4px !important;
}
@keyframes blue-shimmer {
  0% { box-shadow: 0 0 10px rgba(0,242,255,0.4); }
  50% { box-shadow: 0 0 20px rgba(0,242,255,0.8); }
  100% { box-shadow: 0 0 10px rgba(0,242,255,0.4); }
}

/* ---- Hexagonal Badge ---- */
.badge-hex {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
.gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #FBF5B7 50%, #D4AF37 100%);
}

/* ---- Art Deco Octagonal Frame ---- */
.art-deco-frame {
  position: relative;
}
.art-deco-frame::before,
.art-deco-frame::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent-gold);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.5);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px);
}
.art-deco-frame::after {
  inset: -16px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  clip-path: polygon(25px 0, calc(100% - 25px) 0, 100% 25px, 100% calc(100% - 25px), calc(100% - 25px) 100%, 25px 100%, 0 calc(100% - 25px), 0 25px);
}

/* ---- Skeleton Loading ---- */
.skeleton {
  background: linear-gradient(90deg, rgba(212,175,55,0.05) 25%, rgba(212,175,55,0.15) 50%, rgba(212,175,55,0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Gold Foil Button ---- */
.gold-foil-btn {
  background: linear-gradient(135deg, #b38728 0%, #fcf6ba 50%, #b38728 100%);
  background-size: 200% 200%;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.5);
  border: 1px solid #fcf6ba;
  color: var(--bg-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  cursor: pointer;
}
.gold-foil-btn:hover {
  background-position: right bottom;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* ---- Ornament Divider ---- */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-gold);
  font-size: 14px;
  opacity: 0.6;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* ---- Animations ---- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fade-in 0.4s ease-out;
}

@keyframes radiance {
  0% { box-shadow: 0 0 20px rgba(212,175,55,0.4); }
  50% { box-shadow: 0 0 40px rgba(212,175,55,0.8), 0 0 60px rgba(212,175,55,0.3); }
  100% { box-shadow: 0 0 20px rgba(212,175,55,0.4); }
}
.animate-radiance {
  animation: radiance 3s ease-in-out infinite;
}

@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

/* ---- Toast Notification ---- */
.badge-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: var(--surface-dark);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-left: 4px solid var(--accent-gold);
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 360px;
}
.badge-toast.show {
  transform: translateX(0);
}
.badge-toast .toast-icon {
  color: var(--accent-gold);
  font-size: 28px;
}
.badge-toast .toast-text {
  font-size: 14px;
  color: var(--text-light);
}
.badge-toast .toast-text strong {
  color: var(--accent-gold);
}

/* ---- Scrollbar ---- */
.nfc-page::-webkit-scrollbar { width: 6px; }
.nfc-page::-webkit-scrollbar-track { background: var(--bg-dark); }
.nfc-page::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 3px; }
.nfc-page::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.5); }
