/* === GLOBAL === */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #0d111c;
  color: white;
}

a {
  color: #3b82f6;
  text-decoration: none;
}

.green { color: #16c784; }
.red { color: #ea3943; }
.neutral { color: #cccccc; }

/* === MAIN HEADER === */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background-color: #0d111c;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.left-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.left-section .logo {
  height: 24px;
}

.site-title {
  font-size: 16px;
  font-weight: 600;
  margin-left: 10px;
  letter-spacing: 0.5px;
  color: white;
  text-transform: uppercase;
}

.right-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-button {
  display: flex;
  align-items: center;
  color: white;
  font-size: 13px;
  gap: 6px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.nav-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.search-bar {
  background-color: #1c1f2c;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  color: white;
  font-size: 13px;
  width: 200px;
}

.log-in {
  background-color: #3b82f6;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  cursor: pointer;
}

.avatar {
  height: 30px;
  border-radius: 50%;
}

/* === SUB HEADER === */
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  font-size: 11px;
  background-color: #0d111c;
  color: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-header-content {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.sub-header-content .icon {
  width: 14px;
  height: 14px;
  margin-right: 2px;
  vertical-align: middle;
  opacity: 0.8;
}

.right-buttons {
  display: flex;
  gap: 10px;
}

.right-buttons button {
  background-color: #2e3241;
  border: none;
  color: white;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.right-buttons button:hover {
  background-color: #3b3f51;
}

/* === TRENDING CARD SECTION === */
.card-section {
  background-color: #1c1f2e;
  border-radius: 14px;
  padding: 16px;
  max-width: 460px;
  margin: 24px;
  color: white;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

.card-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  overflow: hidden;
}

.card-toggle button {
  background-color: transparent;
  border: none;
  padding: 6px;
  margin-left: 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.card-toggle button.active,
.card-toggle button:hover {
  background-color: #2e3241;
}

.card-toggle svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  fill: white;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-row {
  display: grid;
  grid-template-columns: 30px 1fr 110px 120px;
  align-items: center;
  gap: 10px;
}

.card-rank {
  text-align: center;
  font-size: 13px;
  color: #888;
}

.card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card-icon-rect {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
  color: white;
  max-width: 120px;
}

.card-price {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.card-price.up {
  color: #16c784;
}
.card-price.down {
  color: #ea3943;
}
.card-price.neutral {
  color: #ccc;
}

.card-graph {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.card-graph canvas {
  width: 100px !important;
  height: 28px !important;
}

.card-change {
  font-size: 12px;
  font-weight: 500;
}
.card-change.up {
  color: #16c784;
}
.card-change.down {
  color: #ea3943;
}
.card-change.neutral {
  color: #999;
}

.cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px;
  justify-content: center;
}

.card-section {
  background-color: #1c1f2e;
  border-radius: 14px;
  padding: 16px;
  width: 400px; /* fixed size for side-by-side layout */
  color: white;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0 24px;
  justify-content: flex-start;
}

.card-section {
  flex: 1 1 420px;
  max-width: 420px;
  background-color: #1c1f2e;
  border-radius: 14px;
  padding: 16px;
  color: white;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}