body {
  margin: 0;
  background: #181818;
  color: #e0e0e0;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

a,
button {
  font-family: inherit;
  text-decoration: none;
}

a {
  color: #eb0029;
}

a:hover {
  text-decoration: underline;
}

.accent {
  color: #eb0029;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.5em;
  background: #202020;
  border-bottom: 1px solid #282828;
}

header h1 {
  flex: 1 1 auto;
  font-size: 1.5em;
  color: #fff;
  margin: 0.5em;
}

header h1 a {
  text-decoration: none;
  color: #fff;
  margin-right: 0.3em;
}

#header-wallet-info {
  margin: 0.5em;
  color: #fff;
}

#header-wallet-info p {
  margin: 0;
}

.pro-badge {
  background: #f5b301;
  padding: 0.3em 0.6em;
  border-radius: 5px;
  color: #000;
  font-weight: bold;
  margin-left: 0.5rem;
}

.free-badge {
  background: #666;
  padding: 0.3em 0.6em;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  margin-left: 0.5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h1 {
  margin: 0.5rem 0;
}

#scanner-section {
  background: #202020;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(235, 0, 41, 0.3);
  margin-top: 2rem;
}

#scanner-section h2 {
  margin-bottom: 1rem;
  color: #fff;
}

#scanner-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

#addressInput {
  width: 100%;
  max-width: 500px;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: #2a2a2a;
  color: #e0e0e0;
}

#scanBtn {
  background: #eb0029;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

#scanBtn:hover:enabled {
  background: #c00025;
}

.results-container {
  margin-top: 2rem;
}

.card {
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #fff;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  margin-bottom: 0.5rem;
}

.text-danger {
  color: #f44336;
}

.text-safe {
  color: #5af277;
}

.expand-details {
  margin-top: 1rem;
  cursor: pointer;
  display: inline-block;
  background: #2a2a2a;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.expand-details:hover {
  background: #333;
}

.details-content {
  margin-top: 1rem;
  display: none;
  border-top: 1px solid #333;
  padding-top: 1rem;
}

.trust-score {
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.score-high {
  background: #008f4c;
}

.score-med {
  background: #ffa500;
}

.score-low {
  background: #eb0029;
}

#connect-btn {
  background: red;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  margin: 0.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

#connect-btn:disabled {
  background: #444;
  cursor: not-allowed;
}

#connect-btn:hover:enabled {
  background: #c00025;
}

#chat-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #eb0029;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(235, 0, 41, 0.5);
  z-index: 999;
  transition: transform 0.2s;
}

#chat-btn:hover {
  transform: scale(1.05);
}

#chat-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 300px;
  max-height: 400px;
  background: #202020;
  border: 1px solid #333;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  z-index: 1000;
}

#chat-header {
  background: #282828;
  padding: 0.75rem;
  border-bottom: 1px solid #333;
}

#chat-header h4 {
  margin: 0;
  font-size: 1rem;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.message {
  margin-bottom: 0.75rem;
}

.message.user {
  text-align: right;
}

.message span {
  display: inline-block;
  background: #333;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  max-width: 80%;
  word-wrap: break-word;
}

.message.user span {
  background: #c00025;
}

#chat-input-container {
  display: flex;
  border-top: 1px solid #333;
}

#chat-input {
  flex: 1;
  border: none;
  padding: 0.75rem;
  background: #2a2a2a;
  color: #e0e0e0;
}

#chat-input:focus {
  outline: none;
}

#send-btn {
  background: #eb0029;
  border: none;
  color: #fff;
  width: 60px;
  cursor: pointer;
}

@media (max-width: 600px) {
  #chat-panel {
    width: 90%;
    right: 5%;
    bottom: 90px;
  }
}

footer {
  background: #111;
  padding: 1.5rem 0;
  text-align: center;
  color: #aaa;
  margin-top: 3rem;
}

footer a {
  color: #aaa;
  margin: 0 0.5rem;
  display: inline-block;
}

footer a:hover {
  color: #fff;
}

footer svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  fill: currentColor;
}

#report-section {
  max-width: 600px;
  margin: 2rem auto;
  background: #202020;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(235, 0, 41, 0.3);
  padding: 1rem;
}

#report-section h3 {
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
}

#report-section input {
  width: 100%;
  max-width: 300px;
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: #2a2a2a;
  color: #e0e0e0;
  margin-right: 0.5rem;
}

#reportBtn {
  background: #eb0029;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

#reportBtn:hover {
  background: #c00025;
}

#reportMsg {
  margin-top: 0.5rem;
  text-align: center;
  color: #5af277;
}

#scanLimitText {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #ccc;
  text-align: center;
}

/* ===== ticker polish ===== */
#ticker{
  padding:0 12px;
  border-bottom:1px solid #333;
}
.ticker-item{
  font-weight:600;
  letter-spacing:.2px;
}
.ticker-item span{font-weight:400}

/* hide placeholder items where no data yet */
.ticker-item b:empty,
.ticker-item span:empty{
  display:none;
}

/* ===== header alignment ===== */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:nowrap;
  gap:12px;
}

/* ===== timeframe buttons ===== */
.timeframe-btn{
  border:1px solid #444;
  border-radius:4px;
  background:#1e1e1e;
  transition:background .15s,border-color .15s;
}
.timeframe-btn:hover{background:#333}
.timeframe-btn.active{
  background:#eb0029;
  border-color:#eb0029;
  color:#fff;
}

/* ===== chart breathing room ===== */
#chart{
  padding:8px 0 0 0;    /* top padding keeps candles off header grid line */
}
.chart-wrapper{padding:0 8px}

/* ===== tooltip ===== */
.tooltip{
  background:#222;
  border:1px solid #444;
  box-shadow:0 0 4px rgba(0,0,0,.7);
}

/* ===== mobile tweaks ===== */
@media (max-width:430px){
  #ticker{font-size:12px}
  header h1{font-size:1.2rem}
  .timeframe-btn{font-size:11px;padding:2px 6px}
  .price{font-size:13px}
}


/* ===== carousel ===== */
.carousel{
  position:relative;
  overflow:hidden;
  background:#111;
  border-bottom:1px solid #333;
}
.carousel .track{
  display:flex;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
}
.carousel .card{
  flex:0 0 200px;              /* fixed width */
  scroll-snap-align:center;
  background:#1e1e1e;
  color:#ddd;
  margin:4px 6px;
  padding:8px;
  border-radius:6px;
  box-shadow:0 0 4px rgba(0,0,0,.6);
  font-size:13px;
}
.card .sym   {font-weight:700;margin-bottom:2px}
.card .price {font-weight:600}
.card .change.up{color:#4caf50}
.card .change.dn{color:#f44336}
.card .vol   {font-size:11px;color:#aaa}

.nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:20px;height:20px;border:none;background:transparent;
  color:#888;font-size:20px;cursor:pointer;user-select:none;
}
.nav:hover{color:#fff}
.nav.left {left:4px}
.nav.right{right:4px}

/* hide scrollbar for track */
.track::-webkit-scrollbar{display:none}
.track{ -ms-overflow-style:none; scrollbar-width:none }


/* moving average legend dot */
.ma-legend{display:inline-block;width:8px;height:8px;border-radius:50%;
           background:#f1c40f;margin-right:4px}

/* nicer chart grid */
.lightweight-charts .background { background:#000 !important; }
.lightweight-charts .grid-line   { stroke:#222 !important; }

@media (max-width:480px){
  .timeframes{flex-wrap:wrap;gap:4px;}
  #chart{height:55vh}
}


/* ─── swap panel ─────────────────────────── */
.swap-panel{
  background:#1e1e1e;
  border:1px solid #333;
  border-radius:8px;
  padding:16px;
  margin:18px 8px 0 8px;
  box-shadow:0 0 4px rgba(0,0,0,.6);
}
.swap-header h3{
  margin:0 0 6px 0;
  font-size:1.1rem;
  display:flex;
  align-items:center;
  gap:6px;
}
#swap-dex{font-weight:400;color:#aaa;font-size:.9rem}
#swap-desc{margin:4px 0 12px 0;font-size:.9rem;color:#ccc}
#swap-btn{
  background:#00c6ff;
  border:0;
  padding:8px 18px;
  border-radius:6px;
  font-weight:600;
  cursor:pointer;
  transition:background .15s;
}
#swap-btn:hover:enabled{background:#009ed0}
#swap-btn:disabled{background:#444;cursor:not-allowed}
.disclaimer{display:block;margin-top:8px;font-size:11px;color:#777}
@media(max-width:480px){.swap-panel{padding:12px}}


/* spacing between chart and swap panel */
.chart-wrapper{
  padding:0 8px;
  margin-bottom:18px;   /* <-- new: pushes panel down */
}

.swap-panel{
  margin-top:80px;      /* optional fine-tune */
}

/* ───── swap panel layout ───── */
.swap-panel{
  background:#1e1e1e;
  border:1px solid #333;
  border-radius:8px;
  padding:18px;
  margin:28px 8px 0 8px;  /* extra top spacing under chart */
  box-shadow:0 0 4px rgba(0,0,0,.6);
}

.swap-header{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
}
.beta-tag{
  background:#f5b301;
  color:#000;
  font-size:.75rem;
  padding:2px 6px;
  border-radius:4px;
  text-transform:uppercase;
  letter-spacing:.3px;
}

.swap-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.swap-row label{width:40px;font-size:.9rem;color:#aaa}

.swap-row input,
.swap-row select{
  flex:1 1 auto;
  padding:6px 8px;
  border:1px solid #444;
  border-radius:4px;
  background:#252525;
  color:#eee;
}

#swap-btn{
  background:#444;
  border:0;
  padding:10px 20px;
  border-radius:6px;
  font-weight:600;
  cursor:not-allowed;
  width:100%;
}

.disclaimer{display:block;margin-top:10px;font-size:11px;color:#777}

@media(max-width:480px){
  .swap-panel{padding:14px}
  .swap-row label{width:34px}
}

/* consistent 2-column layout in each swap row */
.swap-row{
  display:grid;
  grid-template-columns: 1fr 1fr;   /* token | amount  (equal width) */
  gap:10px;
  align-items:center;
}
.swap-row label{
  grid-column:1 / -1;               /* label spans full width */
  margin-bottom:4px;
  color:#aaa;
  font-size:.9rem;
}

/* make selects look like the inputs */
.swap-row select,
.swap-row input{
  width:100%;
  padding:8px 10px;
  background:#252525;
  border:1px solid #444;
  border-radius:4px;
  color:#eee;
  font-family:inherit;
}


/* === extra breathing-room between chart and swap panel === */
.chart-wrapper{
  margin-bottom:80px;   /* was 18-28px */
}

@media(max-width:480px){
  .chart-wrapper{margin-bottom:32px;}
}
