/* home.css — דף הבית */

.top-bar {
  justify-content: space-between;
  gap: 6px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.home-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px 32px;
  gap: 32px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

/* Home tagline above search */
.home-tagline {
  font-size: 15px;
  font-weight: 500;
  color: #888;
  text-align: center;
  margin: 0;
  letter-spacing: 0.3px;
}
.theme-dark .home-tagline { color: #aaa; }

/* Logo */
.logo-wrap { text-align: center; }

.logo-title {
  font-size: 52px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
}

.logo-sub {
  font-size: 15px;
  color: var(--text-3);
  margin-top: 8px;
  font-weight: 400;
}

/* Search */
.search-wrap {
  width: 100%;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 5px 5px 5px 18px;
  gap: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}


[dir="rtl"] .search-box { padding: 5px 18px 5px 5px; }

#search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  min-width: 0;
}

#search-input::placeholder { color: var(--text-3); }

#search-btn {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

#search-btn:hover { background: #222; }

/* Autocomplete */
.autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:hover,
.autocomplete-item.selected { background: var(--bg-2); }

.ac-symbol {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  min-width: 60px;
}

.ac-name {
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-exchange {
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-3);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* Trending */
.trending-section { width: 100%; }

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.trending-item:hover {
  border-color: #000000;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.trending-rank {
  font-size: 12px;
  color: var(--text-3);
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.trending-symbol {
  font-weight: 700;
  font-size: 14px;
  min-width: 64px;
  color: var(--text);
}

.trending-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trending-change {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.trending-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.badge-buy-bg  { background: var(--green-bg); color: var(--green); }
.badge-wait-bg { background: var(--yellow-bg); color: var(--yellow); }
.badge-sell-bg { background: var(--red-bg); color: var(--red); }

/* Skeleton */
.trending-skeleton {
  height: 52px;
  background: var(--bg-3);
  border-radius: var(--radius);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* History */
.history-section { width: 100%; }

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.history-item:hover { background: var(--bg-4); border-color: var(--border-2); }

.history-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 13px;
  padding: 0;
  line-height: 1;
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
  .home-main {
    max-width: 900px;
    padding: 72px 40px 48px;
    gap: 40px;
  }

  .search-box { padding: 7px 7px 7px 22px; }
  #search-input { font-size: 16px; }
  #search-btn { padding: 12px 28px; font-size: 14px; }

  .trending-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .trending-item { padding: 14px 20px; }
  .trending-symbol { font-size: 15px; min-width: 72px; }
  .trending-name { font-size: 13px; }
}

@media (min-width: 1200px) {
  .home-main { max-width: 1100px; }
  .trending-list { grid-template-columns: repeat(3, 1fr); }
}
