/* WATCHLIST PAGE */

.watchlist-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.watchlist-main {
  flex: 1;
}

.watchlist-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.watchlist-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  color: var(--accent-gold);
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.watchlist-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.watchlist-header p {
  margin: 0.6rem 0 0;
  color: var(--text-muted, #888);
  font-size: 0.95rem;
}

.watchlist-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}

.watchlist-explore-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.watchlist-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.watchlist-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.watchlist-card-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.watchlist-card-header span {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted, #888);
  font-size: 0.75rem;
}

.watchlist-card-header > i {
  color: var(--accent-gold);
  font-size: 1.25rem;
}

.watchlist-table {
  min-width: 900px;
  color: inherit;
}

.watchlist-table thead th {
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted, #888);
  background: rgba(255, 255, 255, 0.02);
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.watchlist-table tbody td {
  padding: 1.1rem 1.5rem;
  border-color: rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.watchlist-table tbody tr {
  transition: background 0.2s ease;
}

.watchlist-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.watchlist-table tbody tr:last-child td {
  border-bottom: 0;
}

.watchlist-table img {
  border-radius: 50%;
  object-fit: cover;
}

.watchlist-table .rank-num {
  color: var(--text-muted, #777);
  font-family: monospace;
  font-size: 0.75rem;
}

.watchlist-table .up {
  color: #34d399;
  font-weight: 700;
}

.watchlist-table .down {
  color: #f87171;
  font-weight: 700;
}

.watchlist-table .remove-watchlist {
  border-radius: 0.6rem;
  transition: 0.2s ease;
}

.watchlist-table .remove-watchlist:hover {
  transform: translateY(-1px);
}

.watchlist-state {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.025);
}

.watchlist-state h2 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 750;
}

.watchlist-state p {
  max-width: 420px;
  margin-bottom: 1.25rem;
  color: var(--text-muted, #888);
  text-align: center;
  font-size: 0.9rem;
}

.empty-watchlist-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-gold);
  font-size: 1.5rem;
}

.empty-watchlist-icon.error {
  color: #f87171;
}

#watchlist-loading .spinner-border {
  width: 2rem;
  height: 2rem;
  color: var(--accent-gold);
}

#watchlist-loading p {
  margin-top: 1rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .watchlist-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .watchlist-explore-btn {
    width: 100%;
    justify-content: center;
  }

  .watchlist-card {
    border-radius: 1rem;
  }

  .watchlist-card-header {
    padding: 1rem;
  }

  .watchlist-table thead th,
  .watchlist-table tbody td {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}