@font-face {
  font-family: 'Eurostile Regular';
  src: url('/fonts/EuroStyle Normal.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #161a25;
  /* Lichtere variant van donkerblauw */
  --secondary-color: #0d3b66;
  /* Lichtere variant van secundair blauw */
  --accent-color: #ffffff;
  /* Accent blijft wit */
  --bg-color: #1e2536;
  /* Lichtere donkerblauwe achtergrond */
  --card-bg: #3a3f4b;
  /* Lichtere card achtergrond */
  --text-color: #e6e6e6;
  /* Lichtere tekst */
  --border-color: #888;
  /* Lichtere borders */
  --hover-bg: #4a4e5a;
  /* Lichtere hover kleur */
  --transition: 0.3s ease;
  --font: 'Eurostile Regular', sans-serif;
}


/* Algemene reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Extra styling voor de dashboard-grid (5 vakken naast elkaar) */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Box 5: Stats gecombineerd in één vak */
.stats-combined {
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.stats-combined .stat-box {
  background-color: #f9f9f9;
  border: 3px solid #042c3f;
  border-radius: 5px;
  padding: 15px;
  text-align: center;
  margin-bottom: 0.5rem;
  flex: 1;
}

.stats-combined .stat-box:last-child {
  margin-bottom: 0;
}

/* ----- Basis Styling ----- */
html,
body {
  overflow-x: hidden;
  font-family: var(--font);
  background-color: var(--bg-color);
  color: var(--text-color);
  letter-spacing: 0.05em;
}

html {
  font-size: 18px;
}

body {
  font-family: var(--font);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

main {
  padding: 20px;
  max-width: 95%;
  margin: 20px auto;
  background-color: var(--card-bg);
}

/* Zorg dat chain-icoontjes altijd klein zijn */
.chain-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  object-fit: contain;
}

/* ----- LAYOUT & DASHBOARD ----- */
.main-content {
  display: flex;
  flex-direction: column;

}

/* Dashboard-grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr calc(1fr + 25px) calc(1fr - 15px) calc(1fr - 10px);
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Standaard card styling voor dashboard vakken */
.table-wrapper,
.ad-sentiment-wrapper,
.stats-combined {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

/* Header van een card */
.table-wrapper h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  background: var(--hover-bg);
  padding: 0.3rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: 5px 5px 0 0;
}

.stats-combined {
  background-color: #161a25 !important;
}

.stat-box {
  background-color: var(--card-bg) !important;
  border: 0px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  color: #fff;
}


/* ----- TABELSTYLING ----- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--card-bg);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-wrapper table {
  flex: 1;
}

table th,
table td {
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  text-align: left;
  font-size: 0.9rem;
}

table th {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: bold;
  position: relative;
  padding-right: 20px;
}

table tr:nth-child(even) {
  background-color: var(--bg-color);
}

table tr:hover {
  background-color: var(--hover-bg);
}

/* ----- LOGO'S & ICONS ----- */
.crypto-logo,
.table-icon {
  height: 24px;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 50%;
}

.votes-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
}

/* ----- RESPONSIEVE DASHBOARD GRID ----- */
@media (max-width: 768px) {
  .dashboard-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .dashboard-grid>* {
    flex: 0 0 auto;
    min-width: 300px;
  }
}

/* ----- MAIN CRYPTO TABEL (onder dashboard) ----- */
.main-table-wrapper {
  margin-top: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1rem;
  overflow-x: auto;
}

.main-crypto-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px #161a25(0, 0, 0, 0.1);
  min-width: 600px;
}

.main-crypto-table th,
.main-crypto-table td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-crypto-table th {
  background-color: var(--primary-color);
  color: #fff;
  cursor: pointer;
  position: relative;
  padding-right: 20px;
}

.main-crypto-table th:hover {
  background-color: var(--secondary-color);
}

.main-crypto-table th.sort-asc::after,
.main-crypto-table th.sort-desc::after {
  content: '';
  position: absolute;
  right: 5px;
  width: 0;
  height: 0;
  border-style: solid;
}

.main-crypto-table th.sort-asc::after {
  border-width: 0 5px 5px 5px;
  border-color: transparent transparent #fff transparent;
}

.main-crypto-table th.sort-desc::after {
  border-width: 5px 5px 0 5px;
  border-color: #fff transparent transparent transparent;
}

.main-crypto-table td:first-child,
.main-crypto-table th:first-child {
  text-align: center;
  font-weight: bold;
}

.crypto-table td img,
.main-crypto-table td img {
  height: 40px;
  /* Grotere hoogte */
  max-width: 60px;
  /* Grotere maximale breedte */
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 50%;
}

/* ----- PRIJSVERANDERINGEN ----- */
.positive-change {
  color: #28a745;
}

.negative-change {
  color: #dc3545;
}

/* ----- LINK STYLING ----- */
.coin-link {
  text-decoration: none;
  color: var(--accent-color);
}

.coin-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ----- ZOEKBAARHEID ----- */
.search-container {
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-start;
}

#search-bar {
  width: 100%;
  max-width: 300px;
  padding: 8px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* ----- TOP COMMUNITY TABEL ----- */
.top-community-wrapper {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.top-community-wrapper table {
  width: 48%;
  border-collapse: collapse;
}

.top-community-wrapper th,
.top-community-wrapper td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  text-align: left;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: bold;
}

/* ----- STATISTIEKEN (Market Cap & Dominance) ----- */
.stat-box {
  background-color: var(--bg-color);
  border: 3px solid var(--primary-color);
  border-radius: 5px;
  padding: 15px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-box h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.stat-box p {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
}

/* ----- TOOLTIP STYLING ----- */
.tooltip-wrapper {
  display: inline-block;
  position: relative;
}

.tooltip-icon {
  width: 24px;
  height: 24px;
  margin-left: 5px;
  vertical-align: middle;
  cursor: pointer;
}

.tooltip-text {
  display: none;
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  width: 200px;
  text-align: center;
}

.tooltip-wrapper:hover .tooltip-text {
  display: block;
}

/* 📦 Card‐wrapper rond filters + tabel */
.table-card {
  background: var(--card-bg);
  border: 0px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  box-sizing: border-box;
}

/* 📦 Filter‐panel binnen de card */
.filter-panel {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}

/* 🔹 Filters‐row: flex met spacing, links uitlijnen */
.filter-panel .filters-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
}

/* 🔍 Search krijgt meer ruimte maar niet alles */
.filter-panel .filters-row>.search-container {
  flex: 2 1 300px;
  /* groeit dubbel zo hard als een dropdown */
  min-width: 0;
  /* voorkomt overflow */
}

/* 📐 Dropdowns fixed-ish, direct naast de search */
.filter-panel .filters-row>.filter-container {
  flex: 1 1 150px;
  /* neemt voldoende ruimte, maar krimpt mee */
  min-width: 0;
}

/* 📝 Zoekveld styling */
.filter-panel .search-container input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-panel .search-container input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

/* 📂 Dropdown styling */
.filter-panel .custom-dropdown {
  position: relative;
  width: 100%;
}

.filter-panel .custom-dropdown-selected {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-panel .custom-dropdown-selected:hover,
.filter-panel .custom-dropdown-selected:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.filter-panel .custom-dropdown-selected::after {
  content: '▾';
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-color);
}

/* 🍱 Dropdown menu exact onder de selected box */
.filter-panel .custom-dropdown-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

/* 🎯 Dropdown options */
.filter-panel .custom-dropdown-option {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.filter-panel .custom-dropdown-option:hover,
.filter-panel .custom-dropdown-option.active {
  background: var(--hover-bg);
  font-weight: 600;
}

/* kleine icoontjes naast elke optie */
.filter-panel .custom-dropdown-option img.filter-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  object-fit: contain;
}

/* en in de geselecteerde regel */
.filter-panel .custom-dropdown-selected img.chain-icon,
.filter-panel .custom-dropdown-selected img.filter-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  object-fit: contain;
}

/* ----- COOKIE BANNER ----- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
}

.cookie-banner button {
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

/* ----- TABLE FOOTER LOGO ----- */
.table-footer-logo {
  text-align: right;
  margin-top: 10px;
  opacity: 0.9;
}

.table-footer-logo img {
  width: 250px;
  height: auto;
}

/* ----- SPOTLIGHTS & ADVERTENTIES ----- */
.spotlight-container {
  width: 300px;
  height: 200px;
  position: relative;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

.spotlight-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background-color: rgba(0, 255, 0, 0.2);
}

.spotlight-item.active {
  display: block;
}

.spotlight-item img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ----- SENTIMENT STYLING ----- */
#comVotes .sentiment-bar {
  display: flex;
  flex-wrap: nowrap;
  height: 20px;
  border-radius: 5px;
  background: #ccc;
  margin-bottom: 10px;
  overflow: hidden;
}

#comVotes .positive-bar,
#comVotes .negative-bar {
  flex-shrink: 0;
  transition: width 0.5s;
  font-size: 0.7rem;
  text-align: center;
  color: white;
}

#comVotes .positive-bar {
  background: green;
}

#comVotes .negative-bar {
  background: red;
}

#comVotes .vote-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
}

#comVotes .vote-buttons img {
  width: 50px;
  height: 50px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none;
}

#comVotes .vote-buttons button {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
}

.top-community-wrapper a {
  text-decoration: none;
  color: inherit;
}

#comVotes .vote-buttons img:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

#comVotes .vote-buttons img:active {
  transform: scale(0.9);
}

#total-votes,
#reset-timer {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
}

#trending-reset-timer {
  font-size: 0.6rem;
  color: #666;
  margin-top: 0.25rem;
  text-align: center;
}

/* ----- PAGINERING ----- */
.pagination-container {
  text-align: center;
  margin-top: 15px;
}

.pagination-container button {
  background-color: #222;
  color: #fff;
  border: 1px solid transparent;
  padding: 8px 12px;
  margin: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.pagination-container button:hover {
  background-color: #444;
  border-color: #444;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination-container button:disabled {
  background-color: #555;
  cursor: default;
  opacity: 0.5;
}

.pagination-container .active {
  background-color: #07b5e056;
  border-color: #07b5e0;
  color: #000;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* verberg standaard alle dropdown-opties */
.filter-panel .custom-dropdown-options {
  display: none;
}

/* toon alleen als de parent de class “open” heeft */
.filter-panel .custom-dropdown.open .custom-dropdown-options {
  display: block;
}
.icon-wrapper {
  position: relative;
  display: inline-block;
}
