/* === 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: 420px;
  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-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: 16px;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.card-rank {
  width: 18px;
  text-align: right;
  color: #888;
}

.card-icon-rect {
  width: 36px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  gap: 2px;
}

.card-name {
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: -2px;
}

.card-graph canvas {
  width: 60px !important;
  height: 24px !important;
}

.price-group {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
  gap: 2px;
}

.price-group.up .card-price,
.price-group.up .card-change {
  color: #16c784;
}

.price-group.down .card-price,
.price-group.down .card-change {
  color: #ea3943;
}

.price-group.neutral .card-price,
.price-group.neutral .card-change {
  color: #999;
}
