:root{
  --bg:#05070b;
  --card: rgba(6, 12, 10, .72);
  --muted:#89a59a;
  --text:#e7fff2;
  --line: rgba(0,255,102,.18);
  --accent:#00ff66;
  --danger:#ef4444;
  --ok:#22c55e;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial;
  background: var(--bg);
  color:var(--text);
}
a{color:var(--accent); text-decoration:none}
#matrix{position:fixed; inset:0; z-index:-1;}
.container{max-width:1140px; margin:0 auto; padding:24px}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border:1px solid var(--line); border-radius:16px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(10px);
  position: sticky; top: 14px; z-index: 10;
}
.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:40px; height:40px; border-radius:12px;
  background: linear-gradient(135deg, rgba(0,255,102,.9), rgba(16,185,129,.25));
  box-shadow: 0 10px 30px rgba(0,255,102,.18);
}
.h1{font-size:16px; font-weight:800; letter-spacing:.3px}
.sub{font-size:12px; color:var(--muted)}
.btn{
  border:1px solid var(--line);
  background: rgba(0,0,0,.35);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  white-space:nowrap;
}
.btn.primary{
  border-color: rgba(0,255,102,.35);
  background: rgba(0,255,102,.08);
}
.grid{display:grid; grid-template-columns: 1.15fr .85fr; gap:16px; margin-top:18px}
@media (max-width: 940px){ .grid{grid-template-columns:1fr} .nav{position:relative; top:0}}
.card{
  border:1px solid var(--line);
  background: var(--card);
  border-radius:18px;
  padding:18px;
}
.card h2{margin:0 0 10px; font-size:14px}
.p{margin:0; color:var(--muted); line-height:1.6; font-size:13px}
.kv{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.badge{border:1px solid var(--line); border-radius:999px; padding:6px 10px; font-size:12px; color:var(--muted)}
.hr{height:1px; background:var(--line); margin:14px 0}
.form{display:grid; gap:12px}
label{font-size:12px; color:var(--muted); display:block; margin-bottom:6px}
input, textarea{
  width:100%;
  border:1px solid var(--line);
  background: rgba(0,0,0,.35);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  min-height:44px;
  outline: none;
}
.row{display:flex; gap:12px; align-items:flex-end}
.row>*{flex:1}
.table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.table th{font-weight:700}
.table th, .table td{
  border-bottom:1px solid rgba(0,255,102,.12);
  padding:10px 6px;
  text-align:left;
  vertical-align:top;
}
.muted{color:var(--muted)}
.right{text-align:right}
.ok{color:var(--ok)}
.danger{color:var(--danger)}
.small{font-size:12px}
.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.6);
  color: var(--text);
  display:none;
  max-width: 460px;
  z-index: 200;
}
.toast.show{display:block}
.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(0,255,102,.30);
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  overflow:auto;
}
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 150;
}
.modal.show{ display:flex; }
.modal .box{
  width: min(860px, 96vw);
  border:1px solid var(--line);
  background: rgba(0,0,0,.55);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
}
.modalHeader{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  justify-content: space-between;
}

.langSelect{border:1px solid var(--line);background: rgba(0,0,0,.35);color:var(--text);padding:10px 12px;border-radius:12px;min-height:44px;}

.logoImg{width:40px;height:40px;border-radius:12px;object-fit:contain;box-shadow:0 10px 30px rgba(0,255,102,.18);background: rgba(0,0,0,.25);border:1px solid rgba(0,255,102,.18);}

.brandText{display:flex;flex-direction:column;gap:2px;}
.h1Row{display:flex;align-items:center;gap:10px;}
.navRight{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}

.twoCol{display:grid;grid-template-columns:1.05fr .95fr;gap:16px;align-items:start;}
@media (max-width:980px){.twoCol{grid-template-columns:1fr;}}

.globalBox{max-height:210px;overflow:auto;border:1px solid var(--line);border-radius:14px;margin-top:10px;}

/* Large Font Patch */
html{font-size:16px;}
body{font-size:16px;}

.h1{font-size:18px;}
.sub{font-size:14px;}
.p{font-size:15px;}
label{font-size:14px;}

.badge{font-size:13.5px; padding:7px 12px;}
.btn{font-size:14.5px; padding:11px 14px;}
input, textarea{font-size:15px; min-height:48px; padding:12px 14px;}

.table{font-size:14px;}
.table th, .table td{padding:12px 8px;}

.small{font-size:13.5px;}
.code{font-size:13.5px; padding:12px 14px;}
.toast{font-size:14px; padding:14px 16px;}

/* order detail formatting */
.code{white-space: pre-wrap; line-height:1.55;}

/* ===== Mobile layout fix for xinwangguoji ===== */

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  -webkit-text-size-adjust: 100%;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px;
  overflow-x: hidden;
}

.card,
.twoCol,
.globalMini,
.ratesBox,
.form,
.row,
.nav,
.brand,
.navRight {
  min-width: 0;
}

.twoCol > * {
  min-width: 0;
}

.row > * {
  min-width: 0;
}

.globalBox {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 10px;
}

.globalBox .table {
  width: 100%;
  min-width: 620px;
  table-layout: fixed;
}

.globalBox .table th,
.globalBox .table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
}

input, textarea, select, button {
  max-width: 100%;
}

.nav {
  gap: 12px;
}

.brand {
  min-width: 0;
  flex: 1 1 260px;
}

.brandText {
  min-width: 0;
}

.h1Row,
.h1 {
  min-width: 0;
}

.h1 {
  word-break: break-word;
  line-height: 1.3;
}

.navRight {
  justify-content: flex-end;
  flex: 1 1 280px;
}

.kv {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .container {
    padding: 14px;
  }

  .nav {
    position: relative;
    top: 0;
  }

  .twoCol {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px;
    border-radius: 16px;
  }

  .brand {
    width: 100%;
    flex: none;
    align-items: center;
  }

  .logoImg {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .brandText {
    flex: 1 1 auto;
  }

  .h1 {
    font-size: 16px;
  }

  .sub {
    font-size: 12px;
  }

  .navRight {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    justify-content: stretch;
    align-items: stretch;
  }

  .navRight .btn,
  .navRight .langSelect,
  .navRight a.btn {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .card h2 {
    font-size: 13px;
    line-height: 1.4;
  }

  .p {
    font-size: 14px;
    line-height: 1.65;
  }

  .kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .badge {
    width: 100%;
    border-radius: 14px;
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
  }

  .form {
    gap: 10px;
  }

  .row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .row > * {
    width: 100%;
    flex: none;
  }

  input,
  textarea,
  .langSelect {
    min-height: 46px;
    font-size: 14px;
    padding: 11px 12px;
  }

  .btn {
    min-height: 46px;
    font-size: 14px;
    padding: 10px 12px;
  }

  .globalHeader .row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .globalHeader .row > * {
    width: auto;
    flex: 0 0 auto;
  }

  .globalBox {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .globalBox .table {
    min-width: 560px;
    font-size: 13px;
  }

  .globalBox .table th,
  .globalBox .table td {
    padding: 10px 6px;
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }

  .modal {
    padding: 10px;
  }

  .modal .box {
    width: 100%;
    max-width: 100%;
    padding: 14px;
    border-radius: 16px;
  }

  .modalHeader {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 8px;
  }

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

  .h1 {
    font-size: 15px;
  }

  .globalBox .table {
    min-width: 520px;
  }
}

/* ===== End mobile layout fix ===== */
