/* style_heatmap.css */
.page-title {
    text-align: center;
    margin-top: 1.5em;
    color: #f8fafc;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Tighter auto-fit, min 140px */
  gap: 1em; /* Reduced gap */
  justify-content: center;
  max-width: 1200px;
  margin: 1em auto; /* Slightly reduced margin */
}

.stat {
  background: linear-gradient(135deg, #182330 0%, #1b2736 100%); /* Subtle gradient */
  border-radius: 12px;
  padding: 1em 1.2em; /* Reduced padding for compactness */
  box-shadow: 0 4px 20px #0004;
  font-size: 1.15em; /* Slightly larger base font */
  text-align: center;
  min-width: 140px; /* Reduced min-width */
  transition: transform 0.2s;
}

.stat:hover {
  transform: translateY(-3px); /* Hover lift */
}

.stat b {
  display: block;
  margin-bottom: 0.2em; /* Less space below title */
  font-size: 1.1em; /* Larger title */
  color: #7cf2e3; /* Accent color */
}

.stat .value { /* Add class for values in JS if needed, but for now, assume it's the text after b */
  font-size: 1.3em; /* Larger values to fill space */
  font-weight: bold;
}

.stat::before { /* Icons */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.3em; /* Slightly larger icons */
  color: #1fe9c7;
  margin-bottom: 0.4em;
  display: block;
}

.stat:nth-child(1)::before { content: "\f201"; } /* Market Cap */
.stat:nth-child(2)::before { content: "\f0d6"; } /* FDV */
.stat:nth-child(3)::before { content: "\f362"; } /* Volume */
.stat:nth-child(4)::before { content: "\f013"; } /* Projects */
.stat:nth-child(5)::before { content: "\f07b"; } /* Category */

.top-filters-bar {
    display: flex;
    align-items: center;
    gap: 1em;
    max-width: 1200px;
    margin: 0 auto 1.5em;
    padding: 0 1em;
    flex-wrap: wrap;
    justify-content: center;
}

.select-input {
    background: #19202a;
    color: #fff;
    border-radius: 8px;
    border: 1px solid #333;
    padding: 0.5em 1em;
    min-width: 180px;
    font-size: 1em;
    transition: border 0.2s;
}

.select-input:focus {
    border-color: #1fe9c7;
    outline: none;
}

.heatmap-container {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 1.7em auto;
    background: #19202a;
    border-radius: 1.5em;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    padding: 1em;
}

.searchbar {
    text-align: center;
    margin-bottom: 1.5em;
}

.search-input {
    padding: 0.6em 1.2em;
    border-radius: 8px;
    border: 1px solid #333;
    font-size: 1em;
    background: #1b2231;
    color: #fff;
    min-width: 300px;
    transition: border 0.2s;
}

.search-input:focus {
    border-color: #1fe9c7;
    outline: none;
}

.clear-btn {
    padding: 0.6em 1.2em;
    border-radius: 8px;
    background: #233;
    color: #fff;
    border: 1px solid #333;
    margin-left: 0.5em;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: #344;
}

.status-filters {
    text-align: center;
    margin: 1.5em 0;
    font-size: 1.1em;
}

.status-filters label {
    margin: 0 1em;
    cursor: pointer;
}

.drill-down {
    max-width: 1200px;
    margin: 2em auto;
    background: #151b24;
    border-radius: 12px;
    padding: 1.5em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: none;
}

.drill-down h3 {
    font-size: 1.8em;
    color: #e8fbfd;
    margin-bottom: 0.5em;
}

.drill-down p {
    font-size: 1.2em;
    color: #7cf2e3;
    margin-bottom: 1em;
}

.drill-down table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5em;
    color: #fff;
}

.drill-down th {
    background: #182330;
    padding: 1em;
    text-align: left;
    font-weight: 600;
    color: #aad6ff;
    border-radius: 8px 8px 0 0;
}

.drill-down td {
    padding: 1em;
    background: #1b2736;
    border-top: 1px solid #223;
}

.drill-down tr:hover td {
    background: #22334a;
}

.drill-down button {
    background: linear-gradient(135deg, #1fe9c7, #0db39e);
    color: #151b24;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1em;
    font-weight: 600;
    transition: transform 0.2s;
}

.drill-down button:hover {
    transform: scale(1.05);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.2em;
    font-weight: 500;
}
#heatmap rect {
    transform-origin: center;
}