/* public/css/style.css — GLOBAL */

/* ---- Design tokens ---- */
:root {
  --bg:           #0d1017;
  --bg-2:         #14181f;
  --bg-3:         #1a1f28;
  --border:       #1f242c;
  --border-2:     #2a3140;
  --text:         #e6e8eb;
  --text-muted:   #8a94a6;
  --text-dim:     #6b7280;
  --green:        #4ade80;
  --green-dim:    #14532d;
  --red:          #f87171;
  --red-dim:      #7f1d1d;
  --yellow:       #fbbf24;
  --font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.15s;
}
a:hover {
  opacity: 0.85;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 16, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

.nav-cta {
  padding: 8px 18px;
  background: var(--green);
  color: #0d1017;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  transition: filter 0.15s;
}

.nav-cta:hover {
  filter: brightness(1.1);
  opacity: 1;
}

/* ---- Buttons (shared) ---- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--green);
  color: #0d1017;
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover {
  background: var(--bg-3);
  opacity: 1;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 14px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.3px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-nav a:hover {
  color: var(--text);
  opacity: 1;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ============================================================ */
/*  WALLET BUTTON (navbar)                                       */
/* ============================================================ */

.nav-wallet {
  position: relative;
}

.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #1a1f28;
  border: 1px solid #2a3140;
  border-radius: 8px;
  color: #e6e8eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.wallet-btn:hover {
  background: #2a3140;
}

.wallet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
  transition: background 0.2s, box-shadow 0.2s;
}

.wallet-btn[data-state="connected"] {
  border-color: #14532d;
  color: #4ade80;
}
.wallet-btn[data-state="connected"] .wallet-dot {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

.wallet-btn[data-state="connected"] .wallet-label {
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* ---- Wallet dropdown menu ---- */
.wallet-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #14181f;
  border: 1px solid #2a3140;
  border-radius: 10px;
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  animation: menuIn 0.15s ease-out;
}
.wallet-menu.hidden { display: none !important; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wallet-menu-address {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8a94a6;
  border-bottom: 1px solid #1f242c;
  margin-bottom: 6px;
  user-select: all;
}

.wallet-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #e6e8eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  font-family: inherit;
}
.wallet-menu-item:hover {
  background: #1f242c;
}

.wallet-menu-item.danger {
  color: #f87171;
}
.wallet-menu-item.danger:hover {
  background: rgba(248, 113, 113, 0.1);
}

/* ============================================================ */
/*  WALLET MODAL                                                 */
/* ============================================================ */

.wallet-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}
.wallet-modal.hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wallet-modal-content {
  background: #14181f;
  border: 1px solid #2a3140;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.wallet-modal-icon {
  font-size: 42px;
  margin-bottom: 12px;
  line-height: 1;
}

.wallet-modal-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: #e6e8eb;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.wallet-modal-content > p {
  font-size: 14px;
  color: #8a94a6;
  line-height: 1.6;
  margin-bottom: 24px;
}

.wallet-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.wallet-modal-btn {
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
}

.wallet-modal-btn.primary {
  background: #4ade80;
  color: #0d1017;
}
.wallet-modal-btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.wallet-modal-btn.secondary {
  background: transparent;
  border: 1px solid #2a3140;
  color: #8a94a6;
}
.wallet-modal-btn.secondary:hover {
  background: #1a1f28;
  color: #e6e8eb;
}

.wallet-modal-hint {
  font-size: 12px;
  color: #8a94a6;
  margin: 0;
}
.wallet-modal-hint a {
  color: #4ade80;
  font-weight: 600;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}