:root{
  /* Dark terminal / cyber palette */
  --bg-0: #050505;       /* page nearly black */
  --bg-1: #0b0b0b;       /* matte surface */
  --panel: #0a0a0a;      /* row panels */
  --panel-hover: #111111;/* hover */
  --muted: #7a7a7a;      /* secondary text */
  --muted-2: #a1a1aa;    /* light gray tag */
  --text: #d4d4d4;       /* primary text */
  --divider: #1a1a1a;    /* thin divider */
  --accent-green: #4ade80;/* neon green accent */
  --accent-orange: #fb923c;/* muted orange */
  --card-shadow: rgba(0,0,0,0.6);
  --max-content-width:1200px;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  color-scheme: dark;
  font-size: 16px;
  letter-spacing: 0.02em;
}

/* subtle full-page background with faint glow behind main area */
html,body{
  height:100%;
  margin:0;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(10,30,10,0.03), transparent 6%),
              radial-gradient(900px 400px at 90% 90%, rgba(30,10,10,0.02), transparent 6%),
              linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-y:auto;
}

/* support banner: matte, compact */
#support-banner{
  width:100%;
  background:linear-gradient(180deg, rgba(0,0,0,0.35), rgba(8,8,8,0.35));
  color:var(--text);
  font-weight:700;
  font-size:0.9rem;
  padding:8px 12px;
  text-align:center;
  border-radius:6px;
  margin-bottom:10px;
  border:1px solid var(--divider);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6), 0 0 18px rgba(10,200,120,0.02);
}
#support-banner a{color:var(--accent-green);text-decoration:underline;word-break:break-word}

/* red looping marquee for important notices */
.marquee{
  display:inline-block;
  color:#f87171; /* red */
  font-weight:900;
  letter-spacing:0.06em;
  white-space:nowrap;
  animation: marquee-slide 6s linear infinite;
  -webkit-animation: marquee-slide 6s linear infinite;
}
/* duplicate the text visually so the loop looks continuous on larger widths */
#support-banner .marquee::after{
  content: "   Join discord server to never lose the site";
  padding-left:12px;
  color:inherit;
}
@keyframes marquee-slide{
  0%{ transform: translateX(0%); }
  100%{ transform: translateX(-100%); }
}
@-webkit-keyframes marquee-slide{
  0%{ -webkit-transform: translateX(0%); }
  100%{ -webkit-transform: translateX(-100%); }
}

/* Mobile-first reset & layout */
*{box-sizing:border-box}
body{display:flex;flex-direction:column;align-items:stretch;padding:12px;min-height:100vh;background:transparent}
#app{width:100%;max-width:var(--max-content-width);display:flex;flex-direction:column;gap:12px;min-height:auto}

/* typography scale */
:root {
  --h1: clamp(1.1rem, 2.6vw, 1.6rem);
  --h2: clamp(1rem, 2.2vw, 1.25rem);
  --body: clamp(0.9rem, 1.8vw, 1rem);
  --small: clamp(0.75rem,1.6vw,0.85rem);
}
body, input, button, select, textarea { font-size: var(--body); line-height: 1.3; color: var(--text); font-weight: 400 }

/* toolbar / header (keeps layout) */
.toolbar{
  display:flex;align-items:center;gap:8px;width:100%;
  background:transparent;padding:6px 6px;border-radius:6px;
}
#hamburger{
  width:44px;height:44px;min-width:44px;border-radius:6px;border:1px solid var(--divider);
  background:var(--bg-1);color:var(--text);font-size:20px;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6), 0 0 10px rgba(74,222,128,0.01);
}
#hamburger:active{transform:scale(.98)}
.toolbar .balance{display:flex;flex-direction:column;align-items:flex-start;margin-right:6px;min-width:82px}
.toolbar .balance label{font-size:var(--small);color:var(--muted);margin-bottom:4px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase}
.toolbar #balance{
  background:var(--bg-1);padding:8px 10px;border-radius:6px;border:1px solid var(--divider);
  font-weight:700;color:var(--text);min-width:72px;text-align:center;font-size:var(--small);
}

/* search bar: terminal style */
.toolbar input{
  flex:1;min-height:44px;border-radius:6px;padding:10px 12px;border:1px solid #202020;
  background:linear-gradient(180deg, rgba(0,0,0,0.65), rgba(8,8,8,0.7));
  color:var(--text);outline:none;font-family:inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), inset 0 -6px 18px rgba(0,0,0,0.6);
  border-left:3px solid rgba(0,0,0,0.35);
}
.toolbar input::placeholder{color:#6b6b6b}

/* mobile nav (compact matte) */
#mobile-nav{
  position:absolute;top:66px;left:12px;right:12px;display:none;background:var(--bg-1);
  border-radius:8px;padding:8px;border:1px solid var(--divider);z-index:50;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
#mobile-nav ul{list-style:none;margin:0;padding:6px;display:flex;flex-direction:column;gap:8px}
#mobile-nav .nav-link{
  background:transparent;border:0;padding:10px;border-radius:6px;text-align:left;color:var(--muted);font-weight:700;
  font-family:inherit;
}

/* table container */
.table-wrap{
  background:transparent;border-radius:8px;overflow:hidden;box-shadow:0 6px 20px var(--card-shadow);width:100%;
  border:1px solid var(--divider);
  padding:4px;
}

/* make the top tab/view switch horizontally scrollable on small/touch screens */
.view-switch{
  display:flex;
  gap:8px;
  align-items:center;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:6px 4px;
  /* ensure subtle spacing when scrolling */
  scrollbar-width: thin;
}
.view-switch::-webkit-scrollbar{ height:8px; }
.view-switch::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.04); border-radius:6px; }

/* keep buttons from flexing and ensure touch-friendly width */
.view-switch .btn{
  flex: 0 0 auto;
  white-space:nowrap;
}

/* mobile stacked rows -> matte panels */
table{width:100%;border-collapse:collapse;font-size:var(--small);display:block}
thead{display:none}
tbody{display:flex;flex-direction:column;gap:8px;padding:8px}
tr{
  display:block;
  background:var(--panel);
  padding:10px;border-radius:6px;border:1px solid #1c1c1c;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  transition: background .12s, box-shadow .12s, transform .06s;
}
tr:hover{
  background:var(--panel-hover);
  box-shadow: 0 4px 10px rgba(0,0,0,0.7), 0 0 10px rgba(74,222,128,0.015);
  transform: translateY(-1px);
}
td{display:flex;justify-content:space-between;padding:6px 4px;border-bottom:0;align-items:center}
td .label{
  color:var(--muted);font-size:var(--small);margin-right:8px;font-family:inherit;
}
td .value{font-weight:600;text-align:right;max-width:70%;font-family:inherit;color:var(--text)}
.actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;width:100%}

/* buttons: dark rectangular with subtle green glow on hover */
.btn{
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  padding:10px 12px;border-radius:6px;cursor:pointer;font-weight:700;min-width:44px;min-height:44px;
  font-family:inherit;
  transition: background .12s, box-shadow .12s, border-color .12s;
}
.btn:hover{
  background: #141414;
  border-color: #333333;
  box-shadow: 0 4px 18px rgba(74,222,128,0.06);
}
.btn:active{transform:translateY(1px)}
.btn.buy{
  background:#0d0d0d;border:1px solid #272727;color:#fff;padding:10px 14px;border-radius:6px;
}

/* badges / tags: dark pills with muted green/orange text & faint glow */
.badge{
  display:inline-block;padding:6px 8px;border-radius:999px;font-size:var(--small);
  background:#070707;color:var(--muted-2);border:1px solid #151515;font-weight:700;
  box-shadow: 0 2px 10px rgba(74,222,128,0.01);
  font-family:inherit;
}
.badge[data-kind="green"]{ color:var(--accent-green); box-shadow: 0 4px 24px rgba(74,222,128,0.03) }
.badge[data-kind="orange"]{ color:var(--accent-orange); box-shadow: 0 4px 18px rgba(251,146,60,0.02) }

/* header (desktop table headers) styling */
@media (min-width: 768px){
  thead{display:table-header-group}
  thead th{
    text-transform:uppercase;font-size:0.75rem;color:#8a8a8a;padding:10px 12px;letter-spacing:0.12em;font-weight:700;
    border-bottom:1px solid var(--divider);font-family:inherit;
  }
}

/* footer */
.footer{display:flex;justify-content:space-between;align-items:center;padding-top:6px;color:var(--muted);font-size:var(--small)}

/* modals - matte cards */
.pm-backdrop{
  position:fixed;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.75), rgba(0,0,0,0.82));
  display:flex;align-items:center;justify-content:center;padding:18px;z-index:9998;
}
.pm-card{
  background: #070707;color:var(--text);padding:14px;border-radius:8px;width:100%;max-width:560px;box-shadow:0 10px 40px rgba(0,0,0,0.8);
  position:relative;border:1px solid var(--divider);
}
.pm-title{font-weight:800;font-size:var(--h2);margin-bottom:8px;font-family:inherit}
.pm-body{color:var(--muted);margin-bottom:12px;font-size:var(--body);line-height:1.4;text-align:center;font-family:inherit}
.pm-actions{display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap}
.pm-btn{
  flex:1;min-width:84px;padding:12px;border-radius:6px;border:1px solid #222;background:#0b0b0b;color:#fff;cursor:pointer;font-weight:800;
  min-height:44px;font-family:inherit;transition:box-shadow .12s, transform .08s;
}
.pm-btn:hover{ box-shadow: 0 6px 30px rgba(74,222,128,0.04); transform: translateY(-1px) }
.pm-close{position:absolute;right:10px;top:10px;background:transparent;border:0;color:var(--muted);font-size:18px;padding:8px;border-radius:6px}

/* giftcard amount picker */
.pm-giftcard{max-width:560px}
.gc-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.gc-btn{
  padding:14px 12px;border-radius:8px;border:1px solid #222;background:#0b0b0b;color:#fff;cursor:pointer;
  font-weight:900;font-size:1.05rem;min-height:52px;font-family:inherit;transition:box-shadow .12s, transform .08s;
}
.gc-btn:hover{box-shadow:0 6px 30px rgba(74,222,128,0.05);transform:translateY(-1px)}
@media (min-width:480px){.gc-grid{grid-template-columns:repeat(4,1fr)}}
.gc-code-box{margin-top:14px;border-top:1px solid var(--divider);padding-top:12px;text-align:left}
.gc-code-label{color:var(--muted);font-size:0.9rem;margin-bottom:8px;font-weight:700}
.gc-code-row{display:flex;gap:8px}
.gc-code-input{
  flex:1;min-width:0;padding:12px;border-radius:6px;border:1px solid #222;background:#0b0b0b;color:#fff;
  font-family:inherit;font-size:0.95rem;
}
.gc-code-input:focus{outline:none;border-color:var(--accent-green)}
.gc-code-msg{margin-top:8px;font-size:0.85rem;color:var(--muted);min-height:1em}

/* address + timer styles */
#ltc-addr,#btc-addr,#cash-addr{
  display:block;margin-top:6px;padding:12px 14px;background:#070707;border-radius:6px;border:1px solid #161616;
  font-weight:700;color:var(--text);word-break:break-all;text-align:center;font-family:inherit;
}
.pm-code{
  display:block;margin-top:10px;padding:10px 12px;background:#0b0b0b;border-radius:8px;border:1px solid #222;
  font-weight:900;color:var(--accent-green);letter-spacing:0.15em;text-align:center;font-family:inherit;font-size:1.05rem;
  box-shadow: 0 6px 24px rgba(74,222,128,0.02);
}
.pm-warning{
  margin-top:8px;color:var(--muted);font-size:0.88rem;text-align:center;padding:0 6px;
}
#ltc-timer,#btc-timer,#cash-timer{
  background:#0b0b0b;padding:8px 12px;border-radius:6px;font-weight:900;color:var(--text);
}

/* toast */
#toast{
  transition:opacity .25s,transform .2s;transform-origin:right bottom;
  font-family:inherit;
}

/* Utility: focus outlines for keyboard users (subtle green) */
body.show-focus-outlines button:focus, body.show-focus-outlines input:focus, body.show-focus-outlines .nav-link:focus {
  outline:2px solid rgba(74,222,128,0.12); outline-offset:2px; border-radius:6px;
}

/* Prevent horizontal scroll */
html,body{overflow-x:hidden}

/* Breakpoints (mobile-first) */
@media (min-width: 320px){ }

@media (min-width: 480px){
  .toolbar{padding:6px 4px}
  tr{padding:12px}
  td .value{max-width:60%}
}

@media (min-width: 768px){
  body{padding:18px}
  /* table layout restored for tablets and up */
  table{display:table;font-size:0.95rem}
  tbody{display:table-row-group;padding:0}
  tr{display:table-row;padding:0;border-radius:0;background:transparent;border:0;box-shadow:none}
  td{display:table-cell;padding:10px;vertical-align:middle}
  .table-wrap{overflow:auto;background:transparent;border:1px solid var(--divider);padding:0}
  /* desktop rows use subtle separators */
  tbody tr { background: transparent; border-bottom:1px solid var(--divider); padding:0; }
  tbody tr td { padding:12px 10px; background:transparent; }
  thead th { background:transparent }
  #mobile-nav{display:none !important}
}

@media (min-width: 1024px){
  :root{font-size:16.5px}
  .pm-card{max-width:640px}
}

@media (min-width: 1440px){
  :root{font-size:17px}
  #app{padding:22px}
}

/* touch target improvements */
.btn, .pm-btn, #hamburger, .nav-link { min-height:44px; min-width:44px; touch-action:manipulation }

/* ensure forms use appropriate keyboard on mobile */
input[type="tel"]{ime-mode:tel}

/* animated gold header for Cheap Food view */
.gold-header{
  margin:8px 6px 12px;
  padding:10px 12px;
  border-radius:8px;
  text-align:center;
  font-weight:800;
  color:#1b1000;
  background: linear-gradient(90deg, #8a6b2b, #ffd36b, #b07a2b);
  background-size: 300% 100%;
  box-shadow: 0 6px 24px rgba(181,142,40,0.08), 0 0 28px rgba(255,215,102,0.03);
  border:1px solid rgba(255,215,102,0.12);
  animation: goldShift 3.6s linear infinite;
  font-family: inherit;
  letter-spacing: 0.06em;
}

/* subtle shimmering movement */
@keyframes goldShift{
  0%{ background-position:0% 50% }
  50%{ background-position:100% 50% }
  100%{ background-position:0% 50% }
}

/* small boxed info used in Buy Crypto tab */
.info-box{
  margin:8px;
  padding:12px;
  border-radius:10px;
  background: linear-gradient(180deg, rgba(10,10,10,0.6), rgba(8,8,8,0.5));
  border:1px solid var(--divider);
  color:var(--muted);
  font-weight:800;
  text-align:center;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.info-box a{
  color:var(--accent-green);
  text-decoration:underline;
  font-weight:900;
}