* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; background: #08111f; color: #eef4ff; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
body { min-height: 100vh; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; border: 1px solid rgba(255,255,255,.10); background: #111b31; color: #fff; border-radius: 14px; padding: 13px 14px; font-size: 16px; outline: none; }
textarea { resize: vertical; min-height: 120px; }
button { cursor: pointer; border: 0; }

.site-shell, .admin-shell { min-height: 100vh; }
.site-shell, .container, .card, .brand-copy, .header-actions, .nav-wrap, .top-nav { min-width: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 18px; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.22); }
.polished-card { border-radius: 20px; padding: 18px; }
.glass { background: rgba(12, 19, 33, .88); backdrop-filter: blur(12px); }

.refined-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); background: rgba(7, 13, 25, .84); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img, .logo-placeholder { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, #3dd598, #2c7ff5); object-fit: cover; display: grid; place-items: center; color: #04131a; font-weight: 800; }
.brand-name { font-size: 18px; font-weight: 800; line-height: 1.1; }
.brand-sub { font-size: 12px; color: #9bb0d7; margin-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.wallet-btn { min-width: 112px; }
.nav-wrap { display: flex; align-items: center; gap: 8px; position: relative; }
.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 12px; background: #15203a; color: #fff; flex: 0 0 auto; }
.top-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a { padding: 10px 13px; background: rgba(255,255,255,.04); border-radius: 12px; font-size: 14px; color: #e7efff; }
.top-nav a:hover { background: rgba(255,255,255,.08); }

.hero-card.compact-hero { padding: 16px 18px; }
.hero-topline { color: #41d49c; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.hero-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-card h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); }
.hero-text { margin: 0; color: #9fb0d7; line-height: 1.6; }
.quick-stats { display: grid; gap: 10px; }
.quick-stats-compact { grid-template-columns: repeat(3, minmax(110px, 1fr)); min-width: 420px; }
.quick-stats > div { background: rgba(255,255,255,.04); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.quick-stats span { color: #8fa3cf; font-size: 12px; }
.quick-stats strong { font-size: 15px; }
.notice-bar { background: rgba(61, 213, 152, .10); border: 1px solid rgba(61, 213, 152, .24); padding: 12px 14px; border-radius: 14px; color: #d9fff0; }
.compact-notice { margin-top: 12px; }

.home-grid { display: grid; gap: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 20px; }
.form-grid { display: grid; gap: 14px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
label { display: block; margin-bottom: 7px; color: #a7b8d9; font-size: 14px; }

.token-meta-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.meta-pill { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; display: grid; gap: 7px; }
.meta-pill span { color: #8fa3cf; font-size: 12px; }
.meta-pill strong { font-size: 15px; word-break: break-all; }

.btn { padding: 12px 18px; border-radius: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: linear-gradient(135deg, #3cd598, #2d7ef6); color: #07131a; }
.btn.outline { background: rgba(255,255,255,.04); color: #fff; border: 1px solid rgba(255,255,255,.12); }
.btn.ghost { background: rgba(255,255,255,.06); color: #fff; }
.btn.danger { background: #7f1d1d; color: #fff; }
.btn.small { padding: 9px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.tips-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #8ea2cf; font-size: 13px; margin-top: 12px; }
.tx-message { margin-top: 14px; padding: 13px 15px; border-radius: 14px; background: rgba(255,255,255,.04); }
.tx-message.success, .alert.success { background: rgba(19, 176, 117, .16); border-color: rgba(19, 176, 117, .35); color: #d8ffef; }
.tx-message.error, .alert.error { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .25); color: #ffe1e1; }
.tx-message.warn { background: rgba(245, 158, 11, .12); color: #ffe7c0; }
.muted { color: #8ea2cf; }
.alert { border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 14px 16px; margin: 16px 18px 0; }

.node-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.node-item { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; }
.node-item.disabled { opacity: .55; }
.node-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.node-name-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.node-url { color: #9ab0d8; font-size: 12px; word-break: break-all; }
.node-latency { color: #dff5ff; font-size: 12px; white-space: nowrap; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 0 rgba(255,255,255,.2); animation: pulse 1.4s infinite; }
.status-dot.online { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
.status-dot.offline { background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
.status-dot.unknown { background: #9ca3af; box-shadow: 0 0 0 0 rgba(156,163,175,.45); }
@keyframes pulse { 0% { transform: scale(.95); } 70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
th { color: #9fb0d7; font-size: 13px; }

.wallet-modal { position: fixed; inset: 0; background: rgba(3,7,14,.72); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 100; }
.wallet-modal.open { display: flex; }
.wallet-modal-card { width: min(460px, 100%); background: #0f1930; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.42); }
.wallet-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wallet-modal-head h3 { margin: 0; font-size: 20px; }
.wallet-close { width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.06); color: #fff; }
.wallet-list { display: grid; gap: 10px; }
.wallet-option { width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-option-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wallet-option-left img { width: 28px; height: 28px; border-radius: 10px; }
.wallet-dot { width: 28px; height: 28px; border-radius: 10px; background: linear-gradient(135deg, #3cd598, #2d7ef6); }
.wallet-empty { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); color: #a9badb; line-height: 1.6; }
.wallet-modal-foot { margin-top: 12px; font-size: 12px; }

.site-footer { padding: 22px 18px 36px; text-align: center; color: #8ea2cf; }
.single-page { padding-top: 20px; }
.prose { line-height: 1.8; }
.prose h1, .prose h2, .prose h3 { margin-top: 0; }
.prose ol, .prose ul { padding-left: 22px; }

.install-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(circle at top, #12203d, #090d18 60%); }
.install-wrap { width: min(760px, 100%); }
.install-links { display: flex; gap: 12px; justify-content: center; margin-top: 18px; color: #9fb0d7; }
.admin-login-card { width: min(480px, 100%); margin: 0 auto; }

.admin-body { background: #08111f; }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar { min-height: 100vh; padding: 22px; border-right: 1px solid rgba(255,255,255,.08); background: #0b1425; position: sticky; top: 0; }
.admin-brand { font-size: 20px; font-weight: 800; margin-bottom: 22px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); color: #dfe9ff; }
.admin-main { padding: 22px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-section { display: grid; gap: 16px; margin-bottom: 24px; }
.admin-section h1, .admin-section h2 { margin: 0; }
.admin-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.admin-card, .admin-panel { background: #101b31; border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 18px; }
.admin-card { display: grid; gap: 10px; }
.admin-card span { color: #8ea2cf; }
.admin-card strong { font-size: 28px; }
.checkbox-wrap { display: flex; align-items: center; }
.spacer-sm { height: 10px; }
.inline-form-row { display: grid; gap: 8px; }

@media (max-width: 1100px) {
  .quick-stats-compact { min-width: 0; }
  .node-status-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .two-cols, .admin-cards, .token-meta-row { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .hero-main { flex-direction: column; align-items: stretch; }
  .quick-stats-compact { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { min-height: auto; position: static; }
}

@media (max-width: 760px) {
  .container { padding: 12px; }
  .refined-header { padding: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; }
  .brand { width: auto; min-width: 0; }
  .brand img, .logo-placeholder { width: 36px; height: 36px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .header-actions { display: contents; }
  .wallet-btn { min-width: 92px; padding: 10px 12px; grid-column: 2; flex: 0 0 auto; }
  .nav-wrap { grid-column: 3; display: contents; }
  .nav-toggle { display: inline-grid !important; place-items: center; }
  .top-nav { grid-column: 1 / -1; position: static; display: flex !important; flex-wrap: nowrap; overflow-x: auto; gap: 8px; min-width: 0; padding-top: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { width: auto; white-space: nowrap; flex: 0 0 auto; padding: 9px 12px; }
  .card { padding: 14px; border-radius: 16px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .hero-card h1 { font-size: 22px; }
  .hero-main { gap: 12px; }
  .hero-text { font-size: 14px; }
  .quick-stats-compact { grid-template-columns: 1fr; }
  .token-meta-row { grid-template-columns: 1fr 1fr; }
  .tips-row { flex-direction: column; align-items: flex-start; }
  .site-shell main .table-wrap table,
  .site-shell main .table-wrap thead,
  .site-shell main .table-wrap tbody,
  .site-shell main .table-wrap tr,
  .site-shell main .table-wrap td { display: block; width: 100%; min-width: 0; }
  .site-shell main .table-wrap table { min-width: 0; border-collapse: separate; }
  .site-shell main .table-wrap thead { display: none; }
  .site-shell main .table-wrap tbody { display: grid; gap: 10px; }
  .site-shell main .table-wrap tr { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 10px 12px; }
  .site-shell main .table-wrap td { border: 0; padding: 7px 0; }
  .site-shell main .table-wrap td[data-label]::before { content: attr(data-label); display: block; color: #8ea2cf; font-size: 12px; margin-bottom: 4px; }
}



@media (max-width: 520px) {
  .refined-header { grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; }
  .brand-copy { min-width: 0; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wallet-btn { min-width: 84px; padding: 9px 10px; font-size: 13px; }
  .token-meta-row { grid-template-columns: 1fr; }
  .two-cols { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .meta-pill strong { font-size: 14px; }
}


