/* at the very top of your style.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* reset default body margins so you can go truly edge-to-edge */
html, body {
  margin: 0 !important;
  padding: 0;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────
   SMALL FEAR & GREED GAUGE + LABEL (120×60 px) – centered
   ───────────────────────────────────────────────────────── */
#fearGreedWrapper {
  text-align: center;
  margin-bottom: 8px;    /* smaller gap before the tabs */
}
#fearGreedGauge {
  width: 120px;   /* 120 px wide, 60 px tall (half circle) */
  height: 60px;
  display: block;
  margin: 0 auto; /* center horizontally */
}
#fearGreedLabel {
  font-size: 14px;
  font-weight: 600;
  color: #37c978;    /* default to green; script.js will adjust red/green */
  margin-top: 4px;   /* small space below gauge */
}

/* MOBILE ADJUSTMENT: shrink gauge slightly on small screens */
@media (max-width: 768px) {
  #fearGreedGauge {
    width: 100px;
    height: 50px;
  }
  #fearGreedLabel {
    font-size: 12px;
  }
}

/* ─────────────────────────────────────────────────────────
   TITLE + CATEGORY FLEX CONTAINER
   ───────────────────────────────────────────────────────── */
.title-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #444;
  padding-bottom: 6px;
  margin-bottom: 6px; /* a bit less space now that gauge is smaller */
}
.title-row h1 {
  display: block;
  width: auto;
  border-bottom: none;
  margin: 0;
  padding: 0;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 5px;
  font-weight: 700;
  color: #f0f0f0;
}
.logo-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 10px;
  border-radius: 50%;
}

/* ─────────────────────────────────────────────────────────
   NEWS TICKER
   ───────────────────────────────────────────────────────── */
body {
  font-family: Arial, sans-serif;
  background-color: #000;
  background-image: url('background-logo.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: 500px;
  color: #fff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
.container {
  width: 100%;
  max-width: none;    /* no more 1200px cap */
  margin-left: auto;  /* equal on both sides */
  margin-right: auto;
  padding: 20px;      /* keep your breathing room */
}
.news-ticker {
  width: 100%;
  background-color: #111;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid #333;
  padding: 10px 0;
  margin-bottom: 12px;
}
#news-scroll {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 155s linear infinite; /* 95 s scroll speed */
}
.news-item {
  display: inline-block;
  margin-right: 50px;
  color: #f97316;
  font-weight: 600;
  font-size: 16px;
}
.news-item a {
  color: #FFA500;
  text-decoration: none;
}
.news-item a:hover {
  text-decoration: underline;
}
@keyframes scroll-left {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

/* ─────────────────────────────────────────────────────────
   TIMEFRAME TABS + “[+]” DROPDOWN
   ───────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  gap: 8px;
}
.tabs button {
  background-color: #222;
  border: 1px solid #888;
  color: #fff;
  padding: 6px 12px;   /* slightly smaller padding */
  cursor: pointer;
  font-size: 12px;     /* slightly smaller font */
  border-radius: 6px;
  transition: background-color 0.3s, border 0.3s;
}
.tabs button.active {
  background-color: #f97316;
  border: 1px solid #f97316;
  color: #000;
}
.tabs button:hover {
  border-color: #f97316;
  background-color: #333;
}
/* ─────────────────────────────────────────────────────── */
/* Timeframe dropdown (4 columns, 6px gap) – Flex fallback */
/* ─────────────────────────────────────────────────────── */
.timeframe-container.active .timeframe-dropdown {
  position: absolute;
  right: 0;
  top: 32px;
  background-color: #1e293b;
  border: 1px solid #999;
  padding: 8px;
  z-index: 99;
  width: 220px;
  border-radius: 6px;

  /* layout */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.timeframe-container.active .timeframe-dropdown label {
  /* each label takes up one quarter of the width, minus the 6px gap */
  width: calc(25% - 6px);
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  margin-bottom: 6px; /* vertical “gap” */
}

/* Anchor the [+] dropdown to its own container */
.timeframe-container {
  position: relative;         /* <-- critical */
  display: inline-block;      /* keeps the button + dropdown together */
}

/* (optional but tidy) default dropdown box styling */
.timeframe-dropdown {
  position: absolute;
  right: 0;
  top: 32px;
  /* the rest of your styles already set when active */
}

/* ─────────────────────────────────────────────────────────
   CATEGORY FILTER ROW
   ───────────────────────────────────────────────────────── */
.category-row {
  text-align: right;
  margin: 0;
}
.category-row label {
  font-size: 15px;
  margin-right: 6px;
  vertical-align: middle;
  font-weight: 600;
}
.category-row select {
  background-color: #222;
  border: 1px solid #888;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, border 0.3s;
}
.category-row select:hover {
  border-color: #f97316;
  background-color: #333;
}

/* ─────────────────────────────────────────────────────────
   Search Box next to Category Dropdown
───────────────────────────────────────────────────────── */
.category-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-row input#searchBox {
  background-color: #222;
  border: 1px solid #888;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
  width: 160px;
}
.category-row input#searchBox:focus {
  outline: none;
  border-color: #f97316;
}

/* ─────────────────────────────────────────────────────────
   CONTROLS ROW (Prev / Reset Grid / Next)
   ───────────────────────────────────────────────────────── */
.controls-row {
  text-align: center;
  margin-bottom: 12px;
}
.controls-row button {
  background-color: #222;
  border: 1px solid #888;
  color: #fff;
  padding: 6px 12px;
  margin: 0 3px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 6px;
  transition: background-color 0.3s, border 0.3s;
}
.controls-row button#resetBtn {
  background-color: #555;
  border: 2px solid #999;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 5px;
  transition: background-color 0.3s;
}
.controls-row button#resetBtn:hover {
  background-color: #f97316;
  color: #000;
}
.controls-row button:disabled {
  background-color: #444;
  border-color: #666;
  color: #888;
  cursor: not-allowed;
}
.controls-row button:hover:not(:disabled) {
  border-color: #f97316;
  background-color: #333;
}

/* ─────────────────────────────────────────────────────── */
/* HEATMAP GRID (10×10 via Flexbox & space-between gutters) */
/* ─────────────────────────────────────────────────────── */
.heatmap-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between; /* 9 gaps of leftover space → 8px each */
  align-content: flex-start;      /* rows pack to the top */
}

.heatmap-container .coin-box {
  /* 10 boxes take up (100%–72px), so each is (100%–72px)/10 */
  flex: 0 0 calc((100% - 72px) / 10);
  margin-bottom: 8px;             /* vertical gutter between rows */

  /* keep your existing styles: */
  overflow: hidden;
  height: 130px;
  perspective: 1000px;
  transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.coin-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
  position: relative;
  border-radius: 8px;
  background-color: transparent;
  z-index: 1;
}
.coin-box:hover .coin-inner {
  transform: rotateY(180deg);
}
.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  top: 0;
  left: 0;
  border-radius: 8px;
}
.coin-front {
  z-index: 2;
}
.coin-back {
  transform: rotateY(180deg);
  background-color: #1e293b;
  z-index: 1;
}
.coin-back div {
  font-size: 11px; /* smaller text on back */
  line-height: 1.3;
  word-wrap: break-word;
}
.coin-back a {
  color: white !important;
  font-family: "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  text-decoration: none;
  margin-top: 5px;
}
.green-bg {
  background-color: #16a34a !important;
}
.red-bg {
  background-color: #dc2626 !important;
}
.coin-logo {
  width: 30px;  /* slightly smaller icon */
  height: 30px;
  margin-bottom: 5px;
}
.coin-name {
  font-weight: bold;
  font-size: 15px;
}
.coin-price {
  font-size: 12px;
  margin: 3px 0;
}
.price-change {
  font-size: 12px;
}
.pulse-weak-green { animation: pulseEffectGreen 2s infinite; }
.pulse-medium-green { animation: pulseEffectGreen 1.5s infinite; }
.pulse-strong-green { animation: pulseEffectGreen 1s infinite; }
.pulse-weak-red { animation: pulseEffectRed 2s infinite; }
.pulse-medium-red { animation: pulseEffectRed 1.5s infinite; }
.pulse-strong-red { animation: pulseEffectRed 1s infinite; }

@keyframes pulseEffectGreen {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(22,163,74,0.3); }
  50%  { transform: scale(1.02); box-shadow: 0 0 10px rgba(22,163,74,0.5); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(22,163,74,0.3); }
}
@keyframes pulseEffectRed {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(220,38,38,0.3); }
  50%  { transform: scale(1.02); box-shadow: 0 0 10px rgba(220,38,38,0.5); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(220,38,38,0.3); }
}

/* ─────────────────────────────────────────────────────────
   MOBILE-ONLY STYLES (screens ≤768px)
   ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding: 8px;
  }
  /* Stack title-container contents on mobile */
  .title-container {
    flex-direction: column;
    align-items: center;
  }
  .title-row {
    margin-bottom: 6px; /* space before category dropdown */
  }
  .category-row {
    text-align: center;
  }

  h1 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 0;
  }

  .controls-row {
    flex-wrap: wrap;
  }
  .controls-row button {
    margin: 4px;
  }
  .tabs {
    gap: 6px;
  }
  .tabs button {
    padding: 5px 8px;
    font-size: 11px;
    margin: 0; /* gaps handled by parent .tabs gap */
  }
  .category-row select {
    font-size: 12px;
  }
  .heatmap-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch;
  }
  .coin-box {
    width: 100% !important;
    min-height: 120px !important;
    height: auto !important;
    box-sizing: border-box;
  }
  .coin-logo {
    width: 24px;
    height: 24px;
  }
  .coin-name,
  .coin-price,
  .price-change {
    font-size: 12px;
  }
}

/* ─────────────────────────────────────────────────────────
   MOBILE-ONLY “FLIP” BUTTONS (↻ on front, ↩ on back)
   ───────────────────────────────────────────────────────── */
.flip-mobile-btn {
  display: none;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  cursor: pointer;
  background: #333;
  color: #fff;
  padding: 3px 6px;
  border-radius: 10px;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .flip-mobile-btn {
    display: block;
  }
}
.flip-mobile-btn-front {
  display: none;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 3px 5px;
  border-radius: 4px;
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 10;
  cursor: pointer;
}
@media (max-width: 768px) {
  .flip-mobile-btn-front {
    display: block;
  }
}
/* ───────────────────────────────────────────────
   Gainers Section under title – aligned to right
─────────────────────────────────────────────── */
.gainers-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 10px;
  margin-bottom: 16px;
}

.gainers-title {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

.gainers-column {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 100%;
}

.gainers-column .coin-box {
  background-color: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 6px;
  width: 110px;
  height: 100px;
  text-align: center;
  box-sizing: border-box;
}

.gainers-column .coin-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gainers-column .coin-logo {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.gainers-column .coin-name {
  font-size: 14px;
  font-weight: 600;
}

.gainers-column .coin-price,
.gainers-column .price-change {
  font-size: 12px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .gainers-bar {
    align-items: center;
  }

  .gainers-column {
    justify-content: center;
  }
}
.overview-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding: 0 10px;
}

.gainers-bar, .losers-bar {
  width: 180px;
}

.center-panel {
  flex: 1;
  text-align: center;
}

/* ─────────────────────────────────────────────
   Top Gainers (24h) – Horizontal style
───────────────────────────────────────────── */
.gainers-bar {
  width: 100%;
  margin: 0 0 16px 0;
  padding-left: 10px;
}

.gainers-title {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
}

.gainers-column {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0;
}

.gainers-column .coin-box {
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  width: 110px;
  height: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  align-items: center;
  box-sizing: border-box;
}

.gainers-column .coin-logo {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
}

.gainers-column .coin-name {
  font-weight: bold;
  font-size: 12px;
}

.gainers-column .coin-price,
.gainers-column .price-change {
  font-size: 11px;
  color: #ccc;
}
/* ─────────────────────────────────────────────
   Top Gainers (24h) – tFinal Graph Layout
───────────────────────────────────────────── */
.gainers-bar {
  width: 250px; /* wider, but still leaves center space */
  padding-left: 10px;
  margin-top: 10px;
}

.gainers-title {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
  text-align: left;
}

.gainers-graph {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.gainer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #ccc;
}

.gainer-bar .percent-label {
  width: 48px;
  text-align: right;
  font-weight: bold;
  color: #37c978;
}

.gainer-bar .bar {
  flex: 1;
  height: 10px;
  background-color: #37c978;
  border-radius: 3px;
  min-width: 4px;
}

/* ─────────────────────────────────────────────
   Top Gainers (24h) – CoinGecko-Inspired Graph
───────────────────────────────────────────── */
.gainers-bar {
  width: 250px;
  padding-left: 10px;
  margin-top: 10px;
}

.gainers-title {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
  text-align: left;
}

.gainers-graph {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.gainer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #ccc;
}

.gainer-label {
  width: 60px;
  font-weight: bold;
  text-align: left;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gainer-bar .bar-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  height: 8px;
  position: relative;
}

.gainer-bar .bar {
  position: absolute;
  height: 100%;
  background-color: #37c978;
  border-radius: 4px;
  top: 0;
  left: 0;
  transition: width 0.3s ease-in-out;
}

.gainer-percent {
  font-size: 11px;
  color: #37c978;
  text-align: right;
  width: 45px;
}

/* ─────────────────────────────────────────────
   Top Losers (24h) – CoinGecko-Inspired Graph
───────────────────────────────────────────── */
.losers-bar {
  width: 250px;
  padding-right: 10px;
  margin-top: 10px;
}

.losers-title {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
  text-align: right;
}

.losers-graph {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.loser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #ccc;
}

.loser-label {
  width: 60px;
  font-weight: bold;
  text-align: right;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loser-bar .bar-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  height: 8px;
  position: relative;
}

.loser-bar .bar {
  position: absolute;
  height: 100%;
  background-color: #f45b69;
  border-radius: 4px;
  top: 0;
  left: 0;
  transition: width 0.3s ease-in-out;
}

.loser-percent {
  font-size: 11px;
  color: #f45b69;
  text-align: left;
  width: 45px;
}

/* Center Panel Fix */
.overview-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.center-panel {
  flex: 1;
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
}
.heatmap-container {
  padding: 0 10px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .gainers-bar,
  .losers-bar {
    display: none !important;
  }

  .overview-row {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .title-row h1 {
    font-size: 18px;
    line-height: 1.1;
  }
}

/* ─────────────────────────────────────────────────────────
   Modal Overlay & Content
───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  /* a bit more transparent background */
  background: rgba(17, 17, 17, 0.9);
  /* subtle backdrop blur */
  backdrop-filter: blur(4px);

  color: #fff;
  padding: 20px;
  border-radius: 8px;

  /* wider maximum width */
  max-width: 700px;
  /* nearly full-width on mobile, but constrained on desktop */
  width: 95%;

  /* keep vertical scroll inside */
  max-height: 80%;
  overflow-y: auto;

  position: relative;
}

#infoCloseBtn {
  color: #f97316;           /* Coinstrending orange */
  background: transparent;
  border: none;
  font-size: 24px;
  position: absolute;
  top: 10px; right: 10px;
  cursor: pointer;
}
#infoCloseBtn:hover {
  color: #fff;
}


.coin-info-btn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 2px 6px;
  margin: 4px auto 0;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.coin-info-btn:hover {
  background: #f97316;
  border-color: #f97316;
}
.modal-close {
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────
   Modal: orange links + custom orange scrollbar
──────────────────────────────────────────────────────── */
.modal-content a {
  color: #f99b00;       /* Coinstrending orange */
}
.modal-content a:hover {
  text-decoration: underline;
}

/* WebKit browsers (Chrome, Edge, Safari) */
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
}
.modal-content::-webkit-scrollbar-thumb {
  background: #f99b00;
  border-radius: 4px;
}

/* Firefox */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #f99b00 rgba(255,255,255,0.1);
}

/* tweak the small-heading for a perfect fit */
.small-heading {
  font-size: 1em;        /* same size as body text */
  font-weight: 600;      /* a bit bolder or lighter as you like */
  line-height: 1.2;      /* tighten up the spacing */
  margin: 0.5em 0;       /* adjust top/bottom breathing room */
  color: #ffffff;        /* optional: accent the heading in orange */
}

/* make the category‐select + search box live in a flex container */
.category-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* on narrow viewports, stack them vertically */
@media (max-width: 600px) {
  .category-row {
    flex-direction: column;
    align-items: stretch;
  }
  .category-row select,
  .category-row input {
    width: 100%;
    margin: 4px 0;
  }
}

/* hide both flip arrows */
.flip-mobile-btn,
.flip-mobile-btn-front {
  display: none !important;
}

@media (max-width: 600px) {
  /* Stack the select + input, center them */
  .category-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;              /* small space between them */
    padding: 0 16px;       /* a little side padding so they don’t touch the edge */
  }

  /* Make each fill most of the width, but cap to avoid super-wide fields */
  .category-row select,
  .category-row #searchBox {
    width: 100%;
    max-width: 360px;
  }
}
/* ───────────────────────────────────────────────
   LiveCoinWatch widget — tight & non-clickable
─────────────────────────────────────────────── */
.livecoinwatch-widget-5 {
  display: inline-block;           /* centerable if you wrap it in a text-align:center container */
  overflow: hidden !important;     /* hide any extra height */
  white-space: nowrap !important;  /* keep everything on one line */
  padding: 0 !important;           
  margin: 0 auto;                  /* horiz center if you want */
  height: 60px !important;         /* tweak up/down for more/less room */
}

.livecoinwatch-widget-5 table {
  border-collapse: collapse;       /* remove table gaps */
}

.livecoinwatch-widget-5 .lcw-table__row {
  display: inline-block;           
  margin: 0 !important;            
  padding: 0 12px !important;      /* adjust gutter between coins */
  vertical-align: middle;
}

.livecoinwatch-widget-5 .lcw-table__cell {
  padding: 0 8px !important;       /* tighten cell padding */
  font-size: 12px !important;      
  line-height: 1 !important;       
}

.livecoinwatch-widget-5 .lcw-icon {
  width: 16px !important;          /* shrink icons */
  height: 16px !important;
}

/* ───────────────────────────────────────────────
   LCW widget: block only the real links
─────────────────────────────────────────────── */
.livecoinwatch-widget-5 a {
  pointer-events: none !important;   /* anchors no longer receive clicks */
  cursor: default !important;
}
.livecoinwatch-widget-5 li {
  pointer-events: auto !important;   /* rows themselves still clickable */
  cursor: pointer !important;
}



/* ─────────────────────────────────────────────
   Pull controls & heatmap/cards closer
───────────────────────────────────────────── */

/* If your “Reset Grid” sits in a container like .controls-container: */
.controls-container {
  margin-bottom: -10px !important;   /* shrink space below the buttons */
}

/* And if your heatmap lives in #heatmap or .heatmap-container: */
#heatmap,
.heatmap-container {
  margin-top: -10px !important;      /* pull the cards upward */
}

/* ────────────────────────────────────────
   STAR ICON (yellow outline ☆ / filled ★)
────────────────────────────────────────── */
.coin-face.coin-back {
  position: relative;
}

.coin-face.coin-back .star-icon {
  position: absolute;
  top: -4px;
  left: -4px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: #f1c40f;     /* yellow ☆ by default */
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
  pointer-events: auto;
}

.coin-face.coin-back .star-icon:hover {
  color: #fff;        /* white on hover */
}

.coin-box.starred .coin-face.coin-back .star-icon {
  color: #f1c40f;     /* yellow ★ when starred */
}
.timeframe-container #toggleWatchlist {
  margin-left: 8px;
}
.timeframe-container #toggleWatchlist {
  /* existing rules… */
  position: relative;
  top: 1px;   /* or -1px, tweak as needed */
}

/*──────────────────────────────────────────────────────────
  OVERRIDES FOR SITE TITLE + LOGO SPACING
──────────────────────────────────────────────────────────*/
.title-row .site-title {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  color: #aaa !important;        /* force gray text */
}

.title-row .site-title .logo-icon {
  display: inline-block !important;
  margin-right: 4px !important;  /* tighten gap to taste */
  height: 32px !important;       /* adjust up/down as needed */
  width: auto !important;
}

.title-row .site-title .site-title-text {
  line-height: 1 !important;
  color: #aaa !important;        /* ensure the span itself is gray */
}
/*────────────────────────────────────────────────────────
  GLOBAL STATS: Gray labels, orange values, transparent bg
────────────────────────────────────────────────────────*/
.global-stats {
  background: transparent !important;
  padding: 4px 12px;
}

.global-stats span {
  color: #ddd;
  margin-right: 16px;
  font-size: 12px;
}

.global-stats .gs-value {
  color: #f97316 !important;  /* orange numbers */
  margin-left: 4px;
}

/* tighten gap under the global-stats bar */
.global-stats {
  margin-bottom: -20px !important;  /* was 4px default padding, tighten as needed */
}

/* bring the news-ticker up closer */
.news-ticker {
  margin-top: 0 !important;     /* remove any top margin */
  padding: 6px 0 !important;    /* reduce top/bottom padding from 10px to 6px */
  margin-bottom: 8px !important;/* optional: shrink bottom gap too */
}




/* ─────────────── AI Score Box ─────────────── */
.ai-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
  font-size: 11px;
  font-weight: bold;
}
.ai-row {
  display: flex;
  gap: 4px;
  align-items: center;
  color: orange;
}
.ai-label {
  font-size: 11px;
}
.ai-value {
  font-size: 12px;
}
.ai-sentiment {
  font-size: 11px;
  margin-top: 2px;
}
.sentiment-red {
  color: #fff;
}
.sentiment-green {
  color: #000;
}
.sentiment-neutral {
  color: #60a5fa;
}


/* ───── AI Score + Sentiment Layout ───── */
.ai-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
  font-size: 11px;
}
.ai-top-row {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
  color: #facc15;
  font-weight: bold;
}
.ai-label {
  font-size: 11px;
}
.ai-value {
  font-size: 12px;
}
.ai-timeframe {
  font-size: 10px;
  color: #444;
}
.ai-sentiment {
  font-size: 12px;
  font-weight: bold;
  margin-top: 2px;
}
.sentiment-green {
  color: #000;
}
.sentiment-red {
  color: #fff;
}
.sentiment-neutral {
  color: #60a5fa;
}

/* ───── INLINE NAVIGATION BAR ───── */
.top-nav-inline {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 6px 12px;
  background: #000;
  border-bottom: 1px solid #333;
}
.top-nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.top-nav-links li a {
  color: #f49d25;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.top-nav-links li a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ───── ALIGN TOP NAV TIGHTLY ───── */
.top-nav-inline {
  margin-top: -26px;
  padding: 4px 12px 4px;
}
/* ───── Dropdown under Learn ───── */
.has-dropdown {
  position: relative;
}
.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 24px;
  left: 0;
  background: #1e1e1e;
  border: 1px solid #444;
  padding: 6px 0;
  min-width: 180px;
  z-index: 999;
}
.has-dropdown .dropdown li {
  padding: 0;
}
.has-dropdown .dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #ccc;
  text-decoration: none;
}
.has-dropdown .dropdown a:hover {
  background: #333;
  color: #fff;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown .dropdown:hover {
  display: block;
}


#backToTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 999;
  background-color: transparent;
  border: none;
  outline: none;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  width: 60px;
  height: 60px;
  transition: transform 0.3s;
}

#backToTopBtn:hover {
  transform: scale(1.1);
}

#backToTopBtn img.arrow-icon {
  width: 78%;
  height: 78%;
  display: block;
  border-radius: 50%;
}

/* Drag ghost appearance override */
.sortable-ghost {
  opacity: 0.7 !important;
  background: #1a1a1a !important;
  border: 1px dashed #999 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* When a coin is being dragged, disable animations and visuals */
.coin-box.is-dragging .coin-inner {
  transform: none !important;
  animation: none !important;
  box-shadow: none !important;
  background: #1a1a1a !important;
}

/* ───────────── Trending DEX Cards ───────────── */
#dexGrid .coin-box {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  width: 120px;
  text-align: center;
  font-size: 12px;
  box-sizing: border-box;
}
#dexGrid .coin-name {
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}
#dexGrid .coin-price {
  font-size: 13px;
  margin-top: 4px;
  color: #f97316;
}
#dexGrid .price-change {
  font-size: 11px;
  color: #ccc;
  margin-top: 2px;
}

@media screen and (max-width: 900px) {
  .scrolling-bar {
    margin-top: 40px; /* space below market cap bar */
  }

  #hamburgerToggle {
    position: absolute !important;
    top: 4px !important;
    right: 12px !important;
    z-index: 9999 !important;
    background: none;
    border: none;
    font-size: 28px;
    color: #f49d25;
    cursor: pointer;
    pointer-events: auto !important;
    display: block;
  }
}

@media (max-width: 900px) {
  .news-ticker {
    margin-top: 44px; /* nudge lower to avoid overlapping global stats */
  }

  .top-nav-links {
    display: none;
  }

  .top-nav-links.nav-open {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 50px;
    right: 16px;
    background: #111;
    padding: 10px;
    border: 1px solid #333;
    z-index: 9999;
  }
}

@media (max-width: 768px) {
  .top-nav-inline {
    display: none !important;
  }
}
#hamburgerWrapper {
  display: none; /* hide by default */
}

@media (max-width: 768px) {
  #hamburgerWrapper {
    display: block !important; /* show on mobile only */
  }
}
/* Mobile Learn Dropdown */
.dropdown-mobile {
  display: none;
  padding-left: 12px;
  margin-top: 6px;
}
.has-dropdown-mobile:hover .dropdown-mobile {
  display: block;
}
.dropdown-mobile li a {
  color: #f49d25;
  font-size: 13px;
}
.dropdown-mobile li a:hover {
  color: #fff;
}
/* Mobile Learn Dropdown – Styled Like Desktop */
@media (max-width: 768px) {
  .has-dropdown-mobile a {
    font-weight: bold;
    color: #f49d25;
    display: block;
    padding: 8px 12px;
  }

  .dropdown-mobile {
    display: none;
    background: #1e1e1e;
    border: 1px solid #444;
    padding: 6px 0;
    margin-top: 4px;
    border-radius: 6px;
  }

  .dropdown-mobile li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: #ccc;
    text-decoration: none;
  }

  .dropdown-mobile li a:hover {
    background: #333;
    color: #fff;
  }
}

/* Mobile nav styles */
#hamburgerWrapper { position: fixed; top: 6px; right: 12px; z-index: 10000; }
#hamburgerToggle { background: none; border: none; font-size: 28px; color: #f49d25; cursor: pointer; }
.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 9999; }
.nav-overlay.open { opacity: 1; visibility: visible; }
.mobile-nav { position: fixed; top: 0; right: -260px; width: 260px; height: 100%; background: #d3d3d3; box-shadow: -2px 0 5px rgba(0,0,0,0.3); transition: right 0.3s ease; overflow-y: auto; z-index: 10000; padding-top: 60px; }
.mobile-nav.open { right: 0; }
.mobile-nav-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: #333; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { margin: 16px 0; }
.mobile-nav a { color: #333; text-decoration: none; font-size: 18px; padding: 8px 16px; display: block; }
/* dropdown mobile */
.dropdown-mobile { display: none; list-style: none; margin: 8px 0 0 16px; padding: 0; }
.dropdown-mobile li a { font-size: 16px; }
.has-dropdown-mobile.open > .dropdown-mobile { display: block; }

/* ── Remove bullets from desktop “Learn” dropdown ── */
.has-dropdown > .dropdown {
  list-style: none;    /* no bullets on the UL */
  margin: 0;           /* zero out default indent/margin */
  padding: 0;          /* zero out default padding */
}
.has-dropdown > .dropdown li {
  list-style: none;    /* extra safety on each LI */
  margin: 0;           /* remove any LI indent */
  padding: 0;          /* remove LI padding (if any) */
}

/* ───────────── NEWS PAGE STYLES ───────────── */
.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 100%;    /* was 1200px */
  margin: 0 auto;
  box-sizing: border-box;
}
.news-card {
  background: #1c1c1c;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.news-card:hover {
  transform: scale(1.02);
}

.news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.news-content {
  padding: 15px;
}

.news-title {
  font-size: 16px;
  color: #f49d25;
  margin-bottom: 8px;
  font-weight: bold;
}

.news-title a {
  color: #f49d25;
  text-decoration: none;
}

.news-title a:hover {
  text-decoration: underline;
}

.news-summary {
  font-size: 14px;
  color: #bbb;
  margin-bottom: 10px;
}

.news-meta {
  font-size: 12px;
  color: #999;
  margin-top: auto;
}

.live-badge {
  display: inline-block;
  background-color: #f49d25;
  color: #000;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;   /* Key to make z-index work */
  z-index: 2;            /* Lift it above the ticker text */
}
#news-scroll {
  position: relative;
  z-index: 1;
}

/* hide only the placeholder blocks on screens ≤600px wide */
@media only screen and (max-width: 600px) {
  /* hides the flex container that wraps all the placeholders */
  .placeholder-wrapper {
    display: none !important;
  }

  /* in case any stray .placeholder-card remain */
  .placeholder-card {
    display: none !important;
  }
}

/* ─── Modal Accent Overrides & Chart Container ─── */
:root {
  --ct-modal-accent: #f99b00; /* your blue accent */
}

/* Change all orange links & “×” in the modal to blue */
.modal-content a,
#infoCloseBtn {
  color: var(--ct-modal-accent) !important;
}
#infoCloseBtn:hover {
  color: #fff !important;
}

/* Modal scrollbar thumb */
.modal-content::-webkit-scrollbar-thumb {
  background: var(--ct-modal-accent) !important;
}

/* Reserve space at top of modal body for the chart */
#modalBody {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Placeholder div where TradingView will draw the chart */
#tv-chart-container {
  width: 100%;
  height: 300px;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
}
#tv-chart-container { width:100%; height:300px; background:#111; }

/* ── Tighter spacing in the Coin Info modal ── */
#modalBody {
  /* reduce the gap between items */
  gap: 6px !important;
}

#modalBody p {
  /* remove extra margins */
  margin: 0 !important;
  /* give just a tiny bit of breathing room */
  padding: 4px 0 !important;
  /* tighten up line height if you like */
  line-height: 1.3 !important;
}
/* ── Orange interval buttons with white text ── */
.tv-intervals button {
  background-color: #f49d25 !important;
  color: #fff !important;
  border: none;
}
.tv-intervals button:hover {
  background-color: #e58f1c !important;
}
/* ── Centered affiliate banners ── */
.affiliate-banners {
  display: flex;
  justify-content: center;    /* center items horizontally */
  align-items: center;        /* align them vertically if heights differ */
  gap: 8px;
  margin-top: 16px;
  width: 100%;                /* fill the modal width */
}
.affiliate-banners img {
  width: 180px;
  height: auto;
  border-radius: 4px;
}
.tradingview-widget-container {
  width: 100%;
  margin-bottom: 12px;
}

.footer-social { display: inline-flex; gap: 12px; align-items: center; color: #aaa; }
.footer-social a:hover { color: #fff; }
.footer-social svg { width: 24px; height: 24px; fill: currentColor; }

/* ─────────────────────────────────────────────────────── */
/* FIX CARD-FLIP GLITCH: hide backface & preserve 3D      */
/* ─────────────────────────────────────────────────────── */
.heatmap-container .coin-inner {
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.heatmap-container .coin-inner > * {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Center Show More button */
#showMoreNews {
  display: block;
  margin: 20px auto; /* Centers horizontally */
  padding: 10px 20px;
  background-color: #f49d25;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#showMoreNews:hover {
  background-color: #ffb84d;
}

/* Trade Icons and Label */
.exchange-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.exchange-icons img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.exchange-icons img:hover {
  transform: scale(1.1);
}

/* Glowing Trade Here label */
.trade-label {
  font-size: 13px;
  font-weight: bold;
  color: #f49d25;
  margin-right: 10px;
  display: flex;
  align-items: center;
  text-shadow: 0 0 10px #ffb84d, 0 0 20px #f49d25;
}

.trade-label .arrow {
  margin-left: 6px;
  font-size: 16px;
  color: #f49d25;
  animation: arrowGlow 1.2s infinite alternate;
}

@keyframes arrowGlow {
  0% { text-shadow: 0 0 5px #ffb84d; transform: translateX(0); }
  100% { text-shadow: 0 0 15px #f49d25; transform: translateX(5px); }
}
/* --- Screenshot-safe fronts (minimal, no side effects) --- */
.heatmap-container .coin-inner.green-bg .coin-front,
.heatmap-container .coin-box.green-bg  .coin-front { 
  background-color: #16a34a !important; /* solid green */
}
.heatmap-container .coin-inner.red-bg .coin-front,
.heatmap-container .coin-box.red-bg  .coin-front  { 
  background-color: #dc2626 !important; /* solid red */
}

/* Optional: tighten space between "Trade here" and icons on news cards */
.news-card .trade-label { margin-right: 6px; } /* was 10px */

/* ==== CTREN Countdown (namespaced) ==== */
.ctren-hero{
  margin:40px auto; padding:28px 16px; max-width:1100px;
  background:#0b0b0b url('assets/images/bg-grid-gold.png') center/cover no-repeat;
  border:1px solid #333; border-radius:14px; text-align:center
}
.ctren-title{font-size:28px; color:#fff; letter-spacing:.5px; margin-bottom:14px}
.ctren-timer{display:flex; justify-content:center; gap:16px; flex-wrap:wrap; margin:18px 0}
.ctren-timebox{
  width:200px; max-width:45vw; background:rgba(0,0,0,.5);
  border:2px solid rgba(255,255,255,.15); border-radius:12px; padding:18px 10px
}
.ctren-timebox span{display:block; font-size:48px; font-weight:800; color:#fff}
.ctren-timebox label{display:block; margin-top:6px; color:#cfcfcf; font-weight:600; letter-spacing:.4px}
.ctren-sub{color:#e7c26a; margin:10px 0 18px}
.ctren-cta{
  display:inline-block; background:#f4a62a; color:#101010; font-weight:800;
  padding:12px 18px; border-radius:10px; text-decoration:none
}
.ctren-cta:hover{filter:brightness(1.05)}
@media (max-width:700px){ .ctren-timebox span{font-size:38px} .ctren-timebox{width:160px} }
