/* ============================================================
   ClaimSOL - Dark Theme Styles
   ============================================================ */

:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #12131a;
  --bg-card: #1a1b25;
  --bg-card-hover: #222330;
  --border: #2a2b3a;
  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #555568;
  --accent: #9945ff;
  --accent-hover: #b06aff;
  --accent-glow: rgba(153, 69, 255, 0.3);
  --green: #14f195;
  --green-dim: rgba(20, 241, 149, 0.15);
  --red: #ff4545;
  --red-dim: rgba(255, 69, 69, 0.15);
  --orange: #ffa726;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Network Toggle --- */
.network-toggle {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.3s;
}

.network-toggle:hover {
  border-color: var(--accent);
}

.network-opt {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: color 0.25s;
  letter-spacing: 0.3px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.network-opt.active {
  color: var(--text-primary);
}

.network-opt.active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

#net-opt-mainnet.active::before {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

#net-opt-devnet.active::before {
  background: var(--orange);
  box-shadow: 0 0 6px var(--orange);
}

.network-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  width: calc(50% - 3px);
  border-radius: 20px;
  background: var(--bg-card-hover);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
  z-index: 1;
}

.network-toggle.devnet .network-slider {
  transform: translateX(100%);
}


.social-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.social-link:hover {
  color: var(--text-primary);
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.lang-btn:hover:not(.active) {
  border-color: var(--accent);
  color: var(--text-primary);
}

.wallet-btn {
  background: linear-gradient(135deg, var(--accent), #7b2ff2);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.wallet-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.wallet-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wallet-btn.connected {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* --- Main Content --- */
.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 60px 0;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 42px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 20px;
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #7b2ff2);
  color: white;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

/* --- Accounts Section --- */
#accounts-section {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.refresh-btn:active svg {
  animation: spin 0.5s ease;
}

.scanning {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 16px;
}

.scanning::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

.empty-msg {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.error-msg {
  text-align: center;
  padding: 20px;
  color: var(--red);
  background: var(--red-dim);
  border-radius: var(--radius);
}

.accounts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.select-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.select-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.accounts-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.accounts-grid::-webkit-scrollbar {
  width: 6px;
}

.accounts-grid::-webkit-scrollbar-track {
  background: transparent;
}

.accounts-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.account-row:hover {
  background: var(--bg-card-hover);
}

.account-row.selected {
  border-color: var(--accent);
  background: rgba(153, 69, 255, 0.08);
}

.account-row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.account-info {
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
}

.account-mint {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

.account-rent {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

/* --- Summary --- */
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 700;
}

.summary-row .label {
  color: var(--text-secondary);
}

.summary-row .value {
  font-weight: 600;
}

.summary-row.total .value {
  color: var(--green);
}

.summary-row.fee .value {
  color: var(--orange);
}

.claim-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: linear-gradient(135deg, var(--green), #0cbe7a);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.claim-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 241, 149, 0.3);
}

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

.share-x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 24px;
  background: #000;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.share-x-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #555568;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.share-x-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Results --- */
#result-section {
  display: none;
  margin-top: 24px;
}

.result-success {
  background: var(--green-dim);
  color: var(--green);
  padding: 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

.result-partial {
  background: rgba(255, 167, 38, 0.15);
  color: var(--orange);
  padding: 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

.result-error {
  background: var(--red-dim);
  color: var(--red);
  padding: 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

.result-tx {
  padding: 8px 0;
}

.result-tx a {
  color: var(--accent);
  text-decoration: none;
  font-family: monospace;
  font-size: 14px;
}

.result-tx a:hover {
  text-decoration: underline;
}

/* --- Live Stats Strip --- */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 36px;
  padding: 16px 28px;
  background: rgba(153, 69, 255, 0.08);
  border: 1px solid rgba(153, 69, 255, 0.25);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* --- Clean Groups --- */
.clean-group {
  margin-bottom: 20px;
}

.clean-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.clean-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.group-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.group-badge.safe {
  color: var(--green);
  border-color: rgba(20, 241, 149, 0.35);
}

.group-badge.risky {
  color: #ffb020;
  border-color: rgba(255, 176, 32, 0.35);
}

.group-select-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.group-select-btn:hover {
  color: #b06bff;
}

.group-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: -6px 0 12px;
}

/* --- Deep Clean Toggle --- */
.deep-panel {
  margin-top: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 16px 20px;
}

.deep-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.deep-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.deep-panel-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 520px;
}

.deep-switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.deep-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.deep-switch.on {
  background: rgba(255, 176, 32, 0.25);
  border-color: rgba(255, 176, 32, 0.6);
}

.deep-switch.on::after {
  transform: translateX(20px);
  background: #ffb020;
}

.deep-warning {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 176, 32, 0.1);
  border: 1px solid rgba(255, 176, 32, 0.4);
  color: #ffb020;
  font-size: 13px;
  font-weight: 600;
}

/* --- Account Row Extras --- */
.prog-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  border: 1px solid rgba(153, 69, 255, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.nft-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffb020;
  border: 1px solid rgba(255, 176, 32, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.account-row.disabled {
  opacity: 0.55;
}

.skipped-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
}

/* --- How It Works --- */
.how-section {
  margin-top: 60px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.how-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.how-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.how-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.how-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Features --- */
.feat-section {
  margin-top: 60px;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.feat-card:hover {
  border-color: rgba(153, 69, 255, 0.5);
  transform: translateY(-2px);
}

.feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(153, 69, 255, 0.12);
  color: var(--accent);
  margin-bottom: 12px;
}

.feat-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.feat-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .how-grid,
  .feat-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    gap: 16px;
    padding: 14px 16px;
  }

  .stat-sep {
    display: none;
  }
}

/* --- Share Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 5, 10, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlay-in 0.2s ease;
}

.share-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(160deg, #171824, #101118);
  border: 1px solid rgba(153, 69, 255, 0.45);
  border-radius: 20px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(153, 69, 255, 0.15);
  animation: modal-pop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes overlay-in {
  from { opacity: 0; }
}

@keyframes modal-pop {
  from { transform: scale(0.85) translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.share-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}

.share-modal-close:hover {
  color: var(--text-primary);
}

.share-modal-eyebrow {
  font-size: 12px;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.share-modal-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.share-modal-title .hl {
  color: var(--green);
}

.share-modal-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0b0f;
  margin-bottom: 14px;
}

.share-modal-preview img {
  width: 100%;
  display: block;
}

.share-modal-loading {
  padding: 64px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.share-modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.share-modal-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.share-modal-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(153, 69, 255, 0.35);
  border-color: rgba(153, 69, 255, 0.6);
}

.share-modal-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.share-modal-skip {
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.share-modal-skip:hover {
  color: var(--text-primary);
}

body.modal-open {
  overflow: hidden;
}

/* --- FAQ --- */
.faq-section {
  margin-top: 60px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

/* --- Footer --- */
.footer {
  margin-top: 60px;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-primary);
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
  max-width: 400px;
}

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

.toast-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.toast-error {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: var(--red);
}

.toast-success {
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: var(--green);
}

/* --- Wallet Modal --- */
.wallet-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.wallet-modal-overlay.open {
  display: flex;
}

.wallet-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 380px;
  max-width: 92vw;
  max-height: 80vh;
  overflow: hidden;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wallet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.wallet-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.wallet-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.wallet-modal-close:hover {
  color: var(--text-primary);
}

.wallet-modal-body {
  padding: 8px;
  overflow-y: auto;
  max-height: 60vh;
}

.wallet-modal-section {
  padding: 10px 12px 4px;
}

.wallet-modal-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-size: 14px;
}

.wallet-option:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.wallet-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.wallet-option-name {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.wallet-option-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  padding: 3px 8px;
  border-radius: 12px;
}

.wallet-option.not-installed {
  opacity: 0.55;
}

.wallet-option.not-installed:hover {
  opacity: 0.8;
}

.wallet-option-install {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 3px 8px;
  border-radius: 12px;
}

.wallet-modal-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Wallet button icon when connected */
.wallet-btn-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 6px;
}

.wallet-btn.connected {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .header-right {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero h1,
  .hero .subtitle {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .main {
    padding: 24px 16px;
  }

  .account-info {
    flex-direction: column;
    gap: 4px;
  }

  .wallet-btn {
    padding: 6px 14px;
    font-size: 13px;
  }

  .network-opt {
    font-size: 11px;
    padding: 4px 10px;
  }

}

@media (max-width: 480px) {
  .hero h1,
  .hero .subtitle {
    font-size: 24px;
  }

  .lang-btn {
    padding: 3px 6px;
    font-size: 11px;
  }
}

/* ============================================================
   Retro Terminal Theme — green phosphor
   ============================================================ */
:root {
  --bg-primary: #0c1610;
  --bg-secondary: #0f1b13;
  --bg-card: #142219;
  --bg-card-hover: #1a2c20;
  --border: #2c4a37;
  --text-primary: #e9f7ee;
  --text-secondary: #93b29f;
  --text-muted: #5d7a68;
  --accent: #63f59b;
  --accent-hover: #85f7b1;
  --accent-glow: rgba(99, 245, 155, 0.25);
  --green: #63f59b;
  --green-dim: rgba(99, 245, 155, 0.12);
  --purple: #b18cff;
  --red: #ff5f5f;
  --red-dim: rgba(255, 95, 95, 0.15);
  --orange: #ffb020;
  --radius: 4px;
  --radius-sm: 2px;
  --font-display: 'Press Start 2P', 'IBM Plex Mono', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', monospace;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', monospace;
}

body {
  font-family: var(--font-mono);
  font-size: 14px;
  background:
    radial-gradient(1200px 480px at 50% -10%, rgba(99, 245, 155, 0.05), transparent 60%),
    var(--bg-primary);
}

/* subtle CRT scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0 1px, transparent 1px 3px);
}

::selection {
  background: var(--accent);
  color: #0c1610;
}

/* --- Display typography --- */
.logo,
.hero h1,
.hero .subtitle,
.section-title,
.stat-value,
.how-num,
.how-card h3,
.feat-card h3,
.deep-panel-title,
.claim-btn,
.wallet-btn,
.hero-cta,
.share-modal-title,
.share-modal-eyebrow,
.share-modal-btn,
.result-success,
.result-partial,
.lang-btn,
.network-opt,
.refresh-btn {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.logo {
  background: none;
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  font-size: 13px;
  text-shadow: 0 0 12px var(--accent-glow);
}

.hero h1 {
  text-transform: uppercase;
  line-height: 1.6;
  text-shadow: 0 0 20px rgba(99, 245, 155, 0.35);
}

.hero .subtitle {
  text-transform: uppercase;
  line-height: 1.6;
}

.section-title {
  text-transform: uppercase;
  font-size: 15px;
  line-height: 1.7;
  border-bottom: 2px solid var(--border);
  padding-bottom: 14px;
}

.how-num {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
}

.how-card h3,
.feat-card h3 {
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1.7;
}

.stat-value {
  text-shadow: 0 0 14px var(--accent-glow);
}

/* --- Mint action buttons --- */
.wallet-btn:not(.connected),
.hero-cta,
.claim-btn {
  background: var(--accent);
  color: #0c1610;
  border: 2px solid var(--accent);
  text-transform: uppercase;
  box-shadow: 0 0 18px var(--accent-glow);
}

.wallet-btn:not(.connected) {
  font-size: 10px;
  padding: 12px 18px;
}

.wallet-btn:not(.connected):hover:not(:disabled),
.hero-cta:hover,
.claim-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 28px rgba(99, 245, 155, 0.4);
  transform: translateY(-1px);
}

.wallet-btn.connected {
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--accent);
  font-size: 9px;
}

.wallet-btn.connected:hover {
  border-color: var(--accent);
}

.hero-cta {
  font-size: 12px;
  padding: 20px 30px;
}

.claim-btn {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  padding: 16px;
}

/* --- Header chips --- */
.lang-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  font-size: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0c1610;
}

.lang-btn:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

.social-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.network-toggle {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
}

.network-opt {
  font-size: 8px;
  padding: 8px 12px;
}

.network-opt.active {
  color: #0c1610;
}

.network-slider {
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.refresh-btn {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 9px 12px;
}

.refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Stats strip --- */
.stats-strip {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

/* --- Badges & switches: square --- */
.group-badge {
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 700;
}

.group-badge.safe {
  color: var(--accent);
  border-color: rgba(99, 245, 155, 0.45);
}

.group-badge.risky {
  color: var(--orange);
  border-color: rgba(255, 176, 32, 0.45);
}

.prog-badge {
  color: var(--purple);
  border-color: rgba(177, 140, 255, 0.5);
  border-radius: 2px;
}

.nft-badge {
  color: var(--orange);
  border-color: rgba(255, 176, 32, 0.5);
  border-radius: 2px;
}

.deep-switch {
  border-radius: var(--radius-sm);
  width: 46px;
  height: 24px;
  border-width: 2px;
}

.deep-switch::after {
  border-radius: 1px;
  width: 14px;
  height: 14px;
  top: 3px;
  left: 3px;
}

.deep-switch.on {
  background: rgba(255, 176, 32, 0.2);
  border-color: rgba(255, 176, 32, 0.65);
}

.deep-switch.on::after {
  transform: translateX(21px);
  background: var(--orange);
}

.deep-panel {
  border: 2px solid var(--border);
}

.deep-warning {
  border-width: 2px;
}

/* --- Rows & cards: chunky borders --- */
.account-row {
  border: 2px solid var(--border);
}

.account-row.selected {
  border-color: rgba(99, 245, 155, 0.55);
  background: rgba(99, 245, 155, 0.07);
}

.account-mint {
  font-family: var(--font-mono);
}

.how-card,
.feat-card,
.faq-item,
.summary-card {
  border: 2px solid var(--border);
}

.feat-card:hover {
  border-color: var(--accent);
  transform: none;
  box-shadow: 0 0 20px rgba(99, 245, 155, 0.12);
}

/* --- Results & toast --- */
.result-success {
  background: var(--green-dim);
  border: 2px solid rgba(99, 245, 155, 0.45);
  color: var(--accent);
}

.result-partial {
  border: 2px solid rgba(255, 176, 32, 0.45);
}

.result-error {
  border: 2px solid rgba(255, 95, 95, 0.45);
}

.result-tx a {
  color: var(--accent);
}

.toast {
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-family: var(--font-mono);
}

.toast-success {
  border-color: rgba(99, 245, 155, 0.55);
  color: var(--accent);
}

.toast-error {
  border-color: rgba(255, 95, 95, 0.55);
}

/* --- Share modal --- */
.share-modal-card {
  border-radius: 6px;
  border: 2px solid rgba(99, 245, 155, 0.5);
  background: linear-gradient(160deg, #122016, #0d1811);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 50px rgba(99, 245, 155, 0.12);
}

.share-modal-title .hl {
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
}

.share-modal-btn {
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.28);
  font-size: 10px;
  text-transform: uppercase;
  padding: 16px;
}

.share-modal-btn:hover:not(:disabled) {
  box-shadow: 0 0 22px rgba(99, 245, 155, 0.35);
  border-color: var(--accent);
}

/* --- Wallet modal --- */
.wallet-modal {
  border: 2px solid var(--border);
}

.wallet-modal-header h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 11px;
}

.wallet-option {
  border: 2px solid var(--border);
}

.wallet-option:hover {
  border-color: var(--accent);
}

.wallet-option-badge {
  border-radius: 2px;
}

.wallet-btn-icon {
  border-radius: 2px;
}

/* --- Footer & misc --- */
.footer {
  border-top: 2px solid var(--border);
  font-size: 12px;
}

.footer a {
  color: var(--accent);
}

.scanning,
.empty-msg,
.error-msg {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  padding: 24px 16px;
}

.empty-msg {
  color: var(--text-secondary);
}

.error-msg {
  color: var(--red);
}

.scanning {
  color: var(--accent);
}

.scanning::after {
  content: '▊';
  margin-left: 4px;
  animation: term-blink 1s steps(1) infinite;
}

@keyframes term-blink {
  50% { opacity: 0; }
}

.group-select-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 6px 12px;
  transition: border-color 0.2s, color 0.2s;
}

.group-select-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Scrollbars --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #234031;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* --- Logo tile: square corners for pixel aesthetic --- */
.logo-img {
  border-radius: 3px;
}

/* --- Share modal: full retro-terminal chrome --- */
.modal-overlay {
  background: rgba(4, 11, 7, 0.85);
}

.share-modal-eyebrow {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}

.share-modal-title {
  text-shadow: 0 0 18px rgba(99, 245, 155, 0.18);
}

.share-modal-preview {
  border-radius: var(--radius-sm);
  border: 2px solid rgba(99, 245, 155, 0.4);
  background: #0c1610;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.share-modal-loading {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.share-modal-loading::after {
  content: '▊';
  margin-left: 4px;
  animation: term-blink 1s steps(1) infinite;
}

.share-modal-desc {
  font-family: var(--font-mono);
  font-size: 12px;
}

.share-modal-close {
  color: var(--text-muted);
}

.share-modal-close:hover {
  color: var(--accent);
}

.share-modal-skip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.share-modal-skip:hover {
  color: var(--accent);
}
