/* ===== AlfaNetwork dApp — Premium Web3 Theme ===== */
:root {
  --bg: #060b1a;
  --card: #0f172a;
  --primary: #7c3aed;
  --accent: #3b82f6;
  --glow: #8b5cf6;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --success: #22c55e;
  --error: #ef4444;
  --border: rgba(139, 92, 246, 0.25);
  --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.2);
  --radius: 12px;
  --radius-lg: 16px;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Hide dashboard and app sections until wallet is connected */
body:not(.wallet-connected) .section-gated {
  display: none !important;
}

/* ----- Blockchain background ----- */
.blockchain-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(139, 92, 246, 0.08), transparent);
  pointer-events: none;
}

.blockchain-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* ----- Hero purple ray ----- */
.hero-ray {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 60%;
  max-height: 400px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(139, 92, 246, 0.15) 20%,
    rgba(124, 58, 237, 0.25) 50%,
    transparent
  );
  filter: blur(8px);
  animation: rayPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rayPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleY(0.9); }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1); }
}

/* ----- Navbar ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 11, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.logo:hover {
  color: var(--glow);
}

.logo-icon {
  color: var(--primary);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--glow));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(139, 92, 246, 0.1);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-icon {
  display: inline-flex;
  opacity: 0.85;
}

.nav-icon svg {
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contract-input-wrap {
  max-width: 200px;
}

.input-contract {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: monospace;
}

.input-contract::placeholder {
  color: var(--muted);
}

.input-contract:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.input-contract:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wallet-short {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: monospace;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
a.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.btn-primary:not(:disabled):hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.btn-glow {
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

a.btn {
  cursor: pointer;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 12rem;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.9);
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
  animation: tagGlow 3s ease-in-out infinite;
}

@keyframes tagGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.15); border-color: rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.3); border-color: rgba(139, 92, 246, 0.6); }
}

.hero-title {
  font-size: clamp(1.85rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 50%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .hero-steps {
    gap: 0.5rem 0.75rem;
    font-size: 0.85rem;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .hero-steps {
    gap: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .hero-step-num {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.75rem;
  }
}

.hero-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.25);
  color: var(--glow);
  font-weight: 700;
  font-size: 0.8rem;
}

.hero-step-arrow {
  color: var(--primary);
  opacity: 0.7;
  font-weight: 700;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.hero-btns .btn,
.hero-btns a.btn {
  min-width: 160px;
}

@media (max-width: 480px) {
  .hero-btns {
    width: 100%;
    max-width: 100%;
  }
}

/* ----- Blockchain chain animation (hero bottom) ----- */
.chain-wrap {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(95%, 900px);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 0;
  pointer-events: none;
}

.chain-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 92, 246, 0.2) 20%,
    rgba(139, 92, 246, 0.5) 50%,
    rgba(139, 92, 246, 0.2) 80%,
    transparent 100%
  );
}

.chain-streak {
  position: absolute;
  top: 50%;
  width: 120px;
  height: 3px;
  margin-top: -1.5px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7) 30%,
    rgba(139, 92, 246, 0.9) 50%,
    rgba(255, 255, 255, 0.7) 70%,
    transparent
  );
  border-radius: 2px;
  filter: blur(1px);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

.chain-streak-left {
  left: 50%;
  animation: streakLeft 2.5s ease-in-out infinite;
  transform: translateX(-50%);
}

.chain-streak-right {
  left: 50%;
  animation: streakRight 2.5s ease-in-out infinite;
  animation-delay: 0.4s;
  transform: translateX(-50%);
}

@keyframes streakLeft {
  0% { transform: translateX(-50%); opacity: 1; }
  100% { transform: translateX(calc(-50vw - 120px)); opacity: 0; }
}

@keyframes streakRight {
  0% { transform: translateX(-50%); opacity: 1; }
  100% { transform: translateX(calc(50vw - 0px)); opacity: 0; }
}

.chain-node {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.6);
  background: rgba(15, 23, 42, 0.8);
  box-shadow:
    0 0 15px rgba(139, 92, 246, 0.4),
    inset 0 0 12px rgba(139, 92, 246, 0.1);
  animation: nodePulse 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

.chain-node-left {
  left: calc(50% - 180px + var(--i) * 36px);
  transform: translate(-50%, -50%);
}

.chain-node-right {
  right: calc(50% - 180px + (4 - var(--i)) * 36px);
  left: auto;
  transform: translate(50%, -50%);
}

.chain-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.8);
  background: rgba(15, 23, 42, 0.9);
  box-shadow:
    0 0 30px rgba(139, 92, 246, 0.5),
    0 0 60px rgba(139, 92, 246, 0.2),
    inset 0 0 20px rgba(139, 92, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: centerPulse 2.5s ease-in-out infinite;
}

.chain-diamond {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.9);
  filter: drop-shadow(0 0 8px var(--glow));
}

@keyframes nodePulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4), inset 0 0 12px rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.6);
  }
  50% {
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6), inset 0 0 16px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.9);
  }
}

@keyframes centerPulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5), 0 0 60px rgba(139, 92, 246, 0.2), inset 0 0 20px rgba(139, 92, 246, 0.15);
  }
  50% {
    box-shadow: 0 0 45px rgba(139, 92, 246, 0.7), 0 0 80px rgba(139, 92, 246, 0.35), inset 0 0 25px rgba(139, 92, 246, 0.25);
  }
}

/* ----- Primary button glow animation ----- */
.btn-primary.btn-glow {
  animation: btnGlow 2.5s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 32px rgba(139, 92, 246, 0.6), 0 0 48px rgba(139, 92, 246, 0.2); }
}

/* ----- Sections ----- */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

@media (max-width: 768px) {
  .section {
    padding: 2rem 1rem;
  }
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.25rem;
  opacity: 0.9;
}

.dashboard-chart-wrap {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--muted);
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  align-items: center;
  gap: 0.75rem;
}

.chart-bar-row .chart-bar-track {
  min-width: 0;
}

.chart-bar-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.chart-bar-track {
  height: 1.25rem;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease-out;
}

.chart-bar-staked {
  background: linear-gradient(90deg, var(--primary), var(--glow));
}

.chart-bar-earned {
  background: linear-gradient(90deg, var(--success), #16a34a);
}

.chart-bar-withdrawn {
  background: linear-gradient(90deg, var(--accent), #2563eb);
}

.chart-bar-value {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  color: var(--text);
}

.section-sub {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ----- Cards ----- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-glow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
}

.card-form {
  max-width: 480px;
}

/* ----- Dashboard ----- */
.dashboard-placeholder {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

.dashboard-not-registered {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
}

.dashboard-not-registered.hidden {
  display: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-card.glow {
  border-color: rgba(59, 130, 246, 0.3);
}

.stat-card-accent {
  border-color: rgba(34, 197, 94, 0.35);
  grid-column: 1 / -1;
}

.stat-card .stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.stat-address {
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

/* ----- Forms ----- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.input::placeholder {
  color: var(--muted);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-actions .btn {
  flex: 1;
  min-width: 120px;
}

.value-display {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--glow);
}

/* ----- Referral ----- */
.referral-row {
  display: flex;
  gap: 0.5rem;
}

.referral-row .input {
  flex: 1;
}

.referral-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.mini-stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.mini-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.referral-vesting-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--muted);
}

.referral-vesting-note strong {
  color: var(--text);
}

.referral-levels-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.referral-levels {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.referral-levels th,
.referral-levels td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.referral-levels th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.referral-levels td {
  color: var(--text);
}

.referral-levels tbody tr:hover {
  background: rgba(139, 92, 246, 0.06);
}

.referral-levels td:nth-child(2) {
  color: var(--glow);
  font-weight: 600;
}

/* ----- Contract stats grid ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ----- Utility ----- */
.hidden {
  display: none !important;
}

/* ----- Toast ----- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success);
  color: #fff;
}

.toast.error {
  background: var(--error);
  color: #fff;
}

.toast.info {
  background: var(--accent);
  color: #fff;
}

/* ----- Loading overlay ----- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 26, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  gap: 1rem;
}

.loading-text {
  color: var(--muted);
  font-weight: 500;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----- Animated counter (optional enhancement) ----- */
.animated-counter {
  transition: transform 0.2s ease;
}

/* ----- Tablet: stack nav earlier so connection block is never squeezed ----- */
@media (max-width: 900px) {
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-actions .contract-input-wrap {
    flex: 1 1 100%;
    max-width: none;
  }

  .nav-actions .btn {
    flex: 1 1 auto;
    min-width: 140px;
    white-space: nowrap;
  }

  .nav-actions .wallet-short {
    flex: 1 1 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    min-width: 0;
  }

  .navbar .logo {
    order: 0;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .nav-links {
    justify-content: center;
    order: 1;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .nav-actions {
    flex-direction: column;
    order: 2;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
  }

  .nav-actions .contract-input-wrap {
    width: 100%;
    max-width: none;
  }

  .nav-actions .input-contract {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .nav-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    padding: 0.65rem 1rem;
  }

  .nav-actions .wallet-short {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-size: 0.8rem;
  }

  .contract-input-wrap {
    max-width: none;
  }

  .hero {
    padding: 3rem 1rem 10rem;
    min-height: 65vh;
  }

  .hero-title {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
  }

  .hero-btns .btn,
  .hero-btns a.btn {
    min-width: 100%;
  }

  .chain-wrap {
    width: 100%;
    height: 70px;
    bottom: 1rem;
  }

  .chain-node {
    width: 24px;
    height: 24px;
  }

  .chain-node-left {
    left: calc(50% - 120px + var(--i) * 24px);
  }

  .chain-node-right {
    right: calc(50% - 120px + (4 - var(--i)) * 24px);
  }

  .chain-center {
    width: 44px;
    height: 44px;
  }

  .chain-diamond {
    font-size: 1.2rem;
  }

  .chain-streak {
    width: 80px;
  }

  .chart-bar-row {
    grid-template-columns: 70px 1fr 60px;
    gap: 0.5rem;
  }

  .chart-bar-value {
    font-size: 0.8rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .referral-row {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
