/* Custom styles only. Tailwind is loaded via CDN - use Tailwind classes in HTML. */

:root {
  --bg-charcoal: #1a1d24;
  --bg-0: #020617;
  --bg-1: #0b1220;
  --bg-2: #111a2d;
  --surface-1: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.12);
  --text-1: #f8fafc;
  --text-2: rgba(226, 232, 240, 0.78);
  --text-3: rgba(203, 213, 225, 0.56);
  --accent-1: #8b5cf6;
  --accent-2: #3b82f6;
  --accent-3: #14b8a6;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-charcoal);
  color: var(--text-1);
  background-image:
    radial-gradient(1200px 700px at -15% -20%, rgba(139, 92, 246, 0.2), transparent 60%),
    radial-gradient(1000px 600px at 110% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 46%, var(--bg-2) 100%);
}

/* ========== Visual refresh: reusable premium UI tokens ========== */
.web3-shell {
  min-height: 100vh;
}

.web3-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .web3-container {
    padding-inline: 1.5rem;
  }
}

.web3-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.62));
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  box-shadow:
    0 10px 30px rgba(2, 6, 23, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.web3-card-soft {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.56), rgba(15, 23, 42, 0.42));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.9rem;
}

.web3-section-title {
  letter-spacing: -0.02em;
}

.web3-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.web3-btn-primary,
.web3-btn-secondary,
.web3-btn-muted {
  min-height: 2.9rem;
  border-radius: 0.85rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.web3-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 25px -12px rgba(59, 130, 246, 0.8);
}

.web3-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -13px rgba(139, 92, 246, 0.8);
}

.web3-btn-secondary {
  color: rgba(241, 245, 249, 0.98);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.web3-btn-secondary:hover {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.65);
}

.web3-btn-muted {
  color: rgba(226, 232, 240, 0.92);
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.web3-btn-muted:hover {
  background: rgba(30, 41, 59, 0.7);
}

.nft-field {
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  background: rgba(15, 23, 42, 0.7) !important;
  color: #f8fafc !important;
  border-radius: 0.85rem !important;
}

.nft-field::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.nft-field:focus {
  border-color: rgba(139, 92, 246, 0.9) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Form polish across all pages without touching business logic */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* Fade-in animations (CSS only) */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.animation-delay-100 { animation-delay: 0.15s; }
.animation-delay-200 { animation-delay: 0.3s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Success card green glow */
.nft-success-card {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px -10px rgba(16, 185, 129, 0.4);
}

/* Success modal entrance */
.success-modal-backdrop.flex {
  display: flex;
  animation: successModalBackdropIn 0.25s ease-out forwards;
}

.success-modal-card {
  animation: successModalCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0.92);
  opacity: 0;
}

.success-modal-icon {
  animation: successModalIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
  transform: scale(0);
}

.success-modal-cta {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.success-modal-cta:hover {
  transform: translateY(-1px);
}

.success-modal-cta-primary:hover {
  box-shadow: 0 8px 25px -8px rgba(139, 92, 246, 0.5);
}

@keyframes successModalBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes successModalCardIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes successModalIconPop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Loading spinner for mint buttons */
#mint-nft-btn.loading,
.js-mint-btn.loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

#mint-nft-btn.loading::after,
.js-mint-btn.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mint loading overlay and success modal display */
#mint-loading-overlay.flex {
  display: flex;
}
#success-modal.flex,
.success-modal-backdrop.flex {
  display: flex;
}

/* Form message - same style as admin/login alerts */
.nft-form-message {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nft-form-message.hidden {
  display: none;
}

.nft-form-message--error {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: rgb(254 226 226);
}

.nft-form-message--success {
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
  color: rgb(209 250 229);
}

.nft-preview-placeholder {
  min-height: 200px;
}

/* Sticky mint bar on mobile */
@media (max-width: 767px) {
  .sticky-mint-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 12px 16px;
    background: linear-gradient(to top, var(--bg-charcoal) 85%, transparent);
  }
}

/* ========== Web3 premium navbar ========== */
.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 24, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-web3 {
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.header-web3-gradient-bar {
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #22c55e, #7c3aed);
  background-size: 200% 100%;
  animation: headerWeb3GradientMove 6s linear infinite;
}

@keyframes headerWeb3GradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Logo area */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9945FF, #14F195);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(153, 69, 255, 0.35);
}

.logo-text {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.header-web3-logo-icon {
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  border-radius: 10px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-web3-logo-text {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  font-size: 1.125rem;
}

/* Nav links */
.header-web3-links {
  gap: 30px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header-web3-link {
  display: block;
  padding: 0.48rem 0.72rem;
  color: #cbd5f5;
  font-weight: 500;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.header-web3-link:hover {
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-1px);
}

.header-web3-link-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.34), rgba(59, 130, 246, 0.28));
  border-color: rgba(167, 139, 250, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Dashboard button */
.header-web3-dashboard {
  background: linear-gradient(135deg, #7c3aed, #1d4ed8);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.625rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dashboard-btn {
  background: linear-gradient(135deg, #9945FF, #14F195);
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 0 20px rgba(153, 69, 255, 0.35);
}

.header-web3-dashboard:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.35);
}

.header-web3-dashboard-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Wallet address pill (disconnect when connected) */
.header-web3-wallet-pill {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(167, 139, 250, 0.42);
  color: #e9d5ff;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.18);
  transition: all 0.2s ease;
}

.header-web3-wallet-pill:hover {
  transform: translateY(-1px);
  background: rgba(124, 58, 237, 0.25);
}

.wallet-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.wallet-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header-web3-connect.wallet-btn,
.header-web3-wallet-pill.wallet-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.header-web3-connect.wallet-btn:hover,
.header-web3-wallet-pill.wallet-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Connect wallet button - micro animation */
.header-web3-connect {
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px -13px rgba(59, 130, 246, 0.8);
}

.header-web3-connect:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px -13px rgba(124, 58, 237, 0.75);
}

/* ========== Visual refresh: dashboard cards and metadata panels ========== */
.dashboard-panel {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.6));
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
}

.dashboard-stat-card {
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.72));
}

.nft-grid-card {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.74));
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nft-grid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.42);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.42);
}

.nft-meta-label {
  color: rgba(203, 213, 225, 0.58);
  letter-spacing: 0.09em;
}

/* ========== Responsive spacing improvements ========== */
@media (max-width: 767px) {
  .header-web3-links {
    gap: 0.55rem;
  }

  .dashboard-panel {
    border-radius: 0.9rem;
  }
}

/* ========== Site-wide coverage for remaining pages ========== */
/* Visual update: standardize section cards used across pricing/features/guides/about/faq/articles */
[class*="rounded-2xl"][class*="border-white/10"][class*="bg-white/5"] {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.64)) !important;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[class*="rounded-2xl"][class*="border-white/10"][class*="bg-white/5"]:hover {
  border-color: rgba(167, 139, 250, 0.38) !important;
}

/* Visual update: emphasize primary CTA blocks (used on CTA sections) */
[class*="rounded-3xl"][class*="from-violet-600/10"][class*="to-blue-600/10"] {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(124, 58, 237, 0.2), transparent 60%),
    radial-gradient(90% 120% at 100% 100%, rgba(37, 99, 235, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.75)) !important;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.36);
}

/* Visual update: premium button consistency across all pages */
a[class*="from-violet-600"][class*="to-blue-600"],
button[class*="from-violet-600"][class*="to-blue-600"] {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 24px -12px rgba(59, 130, 246, 0.8);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

a[class*="from-violet-600"][class*="to-blue-600"]:hover,
button[class*="from-violet-600"][class*="to-blue-600"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -14px rgba(139, 92, 246, 0.78);
  filter: saturate(1.05);
}

/* Visual update: secondary ghost buttons used on guides and utility links */
a[class*="border-white/20"][class*="hover:bg-white/10"],
button[class*="border-white/20"][class*="hover:bg-white/10"] {
  border-color: rgba(148, 163, 184, 0.36) !important;
  background: rgba(15, 23, 42, 0.5);
}

a[class*="border-white/20"][class*="hover:bg-white/10"]:hover,
button[class*="border-white/20"][class*="hover:bg-white/10"]:hover {
  border-color: rgba(148, 163, 184, 0.62) !important;
  background: rgba(30, 41, 59, 0.75) !important;
}

/* Visual update: article guide typography and readable hierarchy */
.prose.prose-invert {
  color: rgba(226, 232, 240, 0.84);
}

.prose.prose-invert h2,
.prose.prose-invert h3 {
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.prose.prose-invert p {
  color: rgba(203, 213, 225, 0.84);
  line-height: 1.78;
}

.prose.prose-invert a {
  text-decoration: none;
}

/* Visual update: contact/login/admin form shells and controls */
#contact-form,
main form[class*="space-y-5"],
#panel-settings form {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.65)) !important;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.32);
}

/* Visual update: admin and settings data surfaces */
#admin-tabs {
  border-bottom-color: rgba(148, 163, 184, 0.22) !important;
}

.admin-tab {
  border-radius: 0.8rem 0.8rem 0 0;
}

.admin-tab.active {
  box-shadow: inset 0 -2px 0 rgba(139, 92, 246, 0.8);
}

.admin-panel table {
  border-collapse: separate;
  border-spacing: 0;
}

.admin-panel thead {
  background: rgba(30, 41, 59, 0.72) !important;
}

.admin-panel tbody tr {
  background: rgba(15, 23, 42, 0.32);
}

.admin-panel tbody tr:hover {
  background: rgba(30, 41, 59, 0.48) !important;
}

/* Visual update: consistent readable body copy for static pages */
main p[class*="text-white/70"],
main p[class*="text-white/80"],
main dd[class*="text-white/80"] {
  color: rgba(203, 213, 225, 0.84) !important;
}

main p[class*="text-white/60"],
main p[class*="text-white/50"] {
  color: rgba(148, 163, 184, 0.84) !important;
}

@media (max-width: 767px) {
  [class*="rounded-2xl"][class*="border-white/10"][class*="bg-white/5"] {
    border-radius: 0.95rem !important;
  }

  .prose.prose-invert p {
    line-height: 1.65;
  }
}

/* ========== Mobile UX pass: nav + long guides/articles ========== */
@media (max-width: 767px) {
  /* Visual update: mobile menu becomes scrollable and easier to tap */
  #header-mobile-menu {
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .header-mobile-link {
    min-height: 52px;
    font-size: 0.98rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.42);
  }

  .header-mobile-link:hover {
    border-color: rgba(148, 163, 184, 0.45);
  }

  /* Visual update: breadcrumb wrapping and readability on narrow screens */
  .guide-breadcrumb ol {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  /* Visual update: mobile long-form typography hierarchy */
  .guide-article.prose.prose-invert {
    font-size: 0.98rem;
  }

  .guide-article.prose.prose-invert h2 {
    font-size: 1.45rem;
    margin-top: 2.4rem;
    margin-bottom: 0.9rem;
    line-height: 1.25;
  }

  .guide-article.prose.prose-invert p {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  /* Visual update: stack guide CTA actions for thumb reach */
  .guide-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-cta-row .guide-cta-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  /* Visual update: admin mobile density and scanability */
  #admin-tabs {
    padding-bottom: 2px;
    gap: 0.35rem;
    scroll-snap-type: x mandatory;
  }

  #admin-tabs .admin-tab {
    padding: 0.62rem 0.85rem;
    font-size: 0.83rem;
    line-height: 1.2;
    border-radius: 0.7rem 0.7rem 0 0;
    scroll-snap-align: start;
  }

  /* Mobile card lists in admin tabs */
  .admin-panel .md\:hidden {
    gap: 0.65rem !important;
  }

  .admin-panel .md\:hidden > div[class*="rounded-xl"] {
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.65)) !important;
    padding: 0.78rem !important;
    border-radius: 0.8rem !important;
  }

  .admin-panel .md\:hidden .font-mono {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .admin-panel .md\:hidden a[class*="text-violet-400"] {
    font-weight: 500;
  }

  .admin-panel .md\:hidden form button {
    min-width: 30px;
    min-height: 30px;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Compact but readable section rhythm for admin mobile */
  .admin-panel section {
    margin-bottom: 1.35rem !important;
  }

  .admin-panel h2[class*="uppercase"] {
    margin-bottom: 0.62rem !important;
    font-size: 0.7rem;
    letter-spacing: 0.09em;
  }
}
