/* ============================================
   📈 Live Market Page – Hero, Coin Overview, Analysis, Watchlist
   ============================================ */

/* ----- Hero Section ----- */
.hero-section {
  text-align: center;
  padding: 1rem 0;
}
.hero-content h1 {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
}
.hero-sub {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Search */
.search-wrap {
  display: flex;
  max-width: 400px;
  margin: 0 auto 1rem;
}
.search-wrap input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  outline: none;
}
.search-wrap input:focus {
  border-color: var(--accent);
}
.search-wrap button {
  background: var(--accent);
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 1.2rem;
  color: #fff;
  cursor: pointer;
}

/* Quick tags */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.tag {
  background: var(--border);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}
.tag:hover {
  background: var(--accent);
  color: #fff;
}

/* ----- Coin Overview ----- */
.coin-overview .card-header {
  flex-wrap: wrap;
}
.coin-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.coin-icon {
  font-size: 1.8rem;
}
.coin-symbol {
  color: var(--text-secondary);
  font-weight: 500;
}
.coin-rank {
  background: var(--border);
  padding: 0.1rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.coin-price-wrap {
  text-align: right;
}
.coin-price {
  font-size: 1.8rem;
  font-weight: 600;
}
.coin-change {
  font-size: 1rem;
  margin-left: 0.5rem;
}
.coin-change.positive {
  color: var(--green);
}
.coin-change.negative {
  color: var(--red);
}

/* Chart */
.chart-container {
  height: 220px;
  margin: 1rem 0;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-item {
  background: var(--bg-dark);
  padding: 0.6rem;
  border-radius: 8px;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: block;
}
.stat-value {
  font-weight: 500;
}

/* ----- Analysis ----- */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.prediction-price {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
}
.prediction-price .currency {
  font-size: 1.5rem;
  margin-right: 0.2rem;
}
.prediction-details,
.rec-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 0.5rem;
}
.pred-label,
.rec-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.pred-value,
.rec-value {
  font-weight: 500;
}
.rec-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-dark);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  margin: 0.5rem 0;
}
.rec-icon {
  font-size: 1.6rem;
}
.rec-text {
  font-weight: 600;
  font-size: 1.2rem;
}
.tech-summary {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ----- Watchlist ----- */
.table-wrap {
  overflow-x: auto;
}
.watchlist-table {
  width: 100%;
  border-collapse: collapse;
}
.watchlist-table th,
.watchlist-table td {
  padding: 0.6rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.watchlist-table th {
  color: var(--text-secondary);
  font-weight: 500;
}
.watchlist-table tr:hover {
  background: var(--bg-dark);
}
.btn-select {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0.2rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
}
.btn-select:hover {
  opacity: 0.8;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }
  .search-wrap {
    max-width: 100%;
  }
  .analysis-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .coin-price-wrap {
    text-align: left;
    margin-top: 0.5rem;
    width: 100%;
  }
  .coin-title {
    width: 100%;
  }
  .coin-price {
    font-size: 1.4rem;
  }
  .prediction-price {
    font-size: 2rem;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.3rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .watchlist-table th,
  .watchlist-table td {
    font-size: 0.8rem;
    padding: 0.4rem 0.2rem;
  }
  .coin-price {
    font-size: 1.2rem;
  }
}