/* =========================
   RESET & GLOBAL
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui;
  background: #050816;
  color: #f8fafc;
}

/* =========================
   PAGE CONTAINER
========================= */
.oz-news-page {
  padding: 40px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(34,197,94,0.10), transparent 30%),
    #050816;
}

/* =========================
   GRID LAYOUT (FIX)
========================= */
.oz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 420px;
  gap: 20px;
  align-items: start;
}

/* =========================
   CARDS
========================= */
.oz-card {
  position: relative;
  background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(2,6,23,0.95));
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(148,163,184,0.15);
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
  backdrop-filter: blur(16px);
  transition: 0.3s ease;
}

.oz-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 120px rgba(0,0,0,0.8);
}

/* glow effect */
.oz-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, #3b82f6, transparent, #22c55e);
  opacity: 0.10;
  z-index: -1;
}

/* =========================
   HEADERS
========================= */
.oz-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.oz-card-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.oz-card-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

/* =========================
   BADGE
========================= */
.oz-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

/* =========================
   COIN ACTIVITY
========================= */
.oz-chart-card {
  height: 640px;
  display: flex;
  flex-direction: column;
}

.oz-bars {
  overflow-y: auto;
  max-height: 540px;
  padding-right: 6px;
}

.oz-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.oz-bar-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.oz-bar-label img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.oz-bar-track {
  height: 16px;
  background: rgba(148,163,184,0.12);
  border-radius: 999px;
  overflow: hidden;
}

.oz-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.oz-bar-fill.up {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.oz-bar-fill.down {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* =========================
   TEXT COLORS
========================= */
.txt-up {
  color: #4ade80;
}

.txt-down {
  color: #f87171;
}

/* =========================
   SENTIMENT
========================= */
.oz-sentiment-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.oz-score-ring {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.oz-score-ring div {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #020617;
  display: grid;
  place-items: center;
}

.oz-score-ring strong {
  font-size: 22px;
}

.oz-score-ring span {
  font-size: 13px;
  color: #94a3b8;
}

/* stats */
.oz-sentiment-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.oz-sentiment-list div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(148,163,184,0.08);
  text-align: center;
}

.oz-sentiment-list strong {
  font-size: 22px;
}

/* =========================
   SIDE PANEL
========================= */
.oz-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 640px;
  overflow-y: auto;
}

.oz-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.oz-mini-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(148,163,184,0.08);
}

.oz-mini-card strong {
  font-size: 22px;
}

.oz-mini-card span {
  font-size: 13px;
  color: #94a3b8;
}

/* =========================
   WATCHLIST
========================= */
.oz-watch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(148,163,184,0.1);
}

.oz-watch-row img {
  width: 30px;
}

.oz-watch-row strong {
  display: block;
}

/* =========================
   TABLE
========================= */
.oz-market-table {
  margin-top: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 12px;
  text-align: left;
  color: #94a3b8;
  font-size: 12px;
}

td {
  padding: 14px;
  border-top: 1px solid rgba(148,163,184,0.1);
}

.oz-asset {
  display: flex;
  gap: 10px;
  align-items: center;
}

.oz-asset img {
  width: 28px;
}

/* =========================
   NEWS
========================= */
.oz-news-head {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.oz-filters select {
  background: #0b1220;
  color: white;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(59,130,246,0.3);
}

/* grid */
.oz-news-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* card */
.oz-news-item {
  padding: 18px;
  border-radius: 20px;
  background: rgba(15,23,42,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.1);
  transition: 0.3s;
}

.oz-news-item:hover {
  transform: translateY(-5px);
}

.oz-news-item.hidden {
  display: none !important;
}

/* meta */
.oz-news-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.oz-news-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

/* sentiment colors */
.positive {
  background: rgba(34,197,94,0.2);
}

.negative {
  background: rgba(239,68,68,0.2);
}

.neutral {
  background: rgba(148,163,184,0.2);
}

/* =========================
   SCROLLBAR
========================= */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.3);
  border-radius: 999px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
  .oz-grid {
    grid-template-columns: 1fr;
  }

  .oz-side {
    max-height: none;
  }

  .oz-chart-card {
    height: auto;
  }

  .oz-bars {
    max-height: none;
  }

  .oz-news-list {
    grid-template-columns: 1fr;
  }
}


/* =========================
   FIX GRID HARD (IMPORTANT)
========================= */
.oz-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 420px !important;
  gap: 20px;
  align-items: start;
}

/* Empêche débordement */
.oz-grid > * {
  min-width: 0;
}

/* Fix cartes */
.oz-chart-card,
.oz-card {
  width: 100%;
}

/* Empêche un élément de casser la grille */
.oz-bars,
.oz-sentiment-box,
.oz-side {
  max-width: 100%;
}

/* Empêche wrap bizarre */
.oz-side {
  grid-column: 3;
}




/* =========================
   RESPONSIVE FINAL FIX
========================= */

.oz-grid {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr) minmax(340px, 420px) !important;
  gap: 20px !important;
  align-items: start !important;
}

.oz-grid > * {
  min-width: 0 !important;
}

.oz-grid > .oz-chart-card:nth-of-type(1) {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.oz-grid > .oz-chart-card:nth-of-type(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.oz-grid > .oz-side {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.oz-chart-card,
.oz-side {
  height: 640px !important;
  max-height: 640px !important;
}

.oz-chart-card {
  overflow: hidden !important;
}

.oz-bars,
.oz-side {
  overflow-y: auto !important;
}

.oz-bars {
  max-height: 520px !important;
}

@media (max-width: 1050px) {
  .oz-grid {
    grid-template-columns: 1fr !important;
  }

  .oz-grid > .oz-chart-card:nth-of-type(1),
  .oz-grid > .oz-chart-card:nth-of-type(2),
  .oz-grid > .oz-side {
    grid-column: 1 !important;
    grid-row: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  .oz-bars,
  .oz-side {
    max-height: none !important;
    overflow-y: visible !important;
  }

  .oz-news-list {
    grid-template-columns: 1fr !important;
  }
}