/* ═══════════════════════════════════════════
   Kairox Crypto — Shared Styles
   Matches landing page design language
   ═══════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #07080d;
  --bg-card: #0d0f16;
  --bg-surface: #141722;
  --accent: #00e5a0;
  --accent-dim: #00e5a020;
  --accent-glow: #00e5a040;
  --text-primary: #e8eaf0;
  --text-secondary: #8a8f9e;
  --text-muted: #555a6b;
  --red: #ff4d6a;
  --amber: #ffb020;
  --blue: #4d8eff;
  --green: #00e5a0;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Ambient background */
.ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.ambient::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
}
.ambient::after {
  content: '';
  position: absolute;
  bottom: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #4d8eff15 0%, transparent 70%);
  opacity: 0.4;
}

.content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ Nav ═══ */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid #ffffff08;
  margin-bottom: 32px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid #ffffff12;
  padding: 6px 12px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

/* ═══ Section headers ═══ */
.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

/* ═══ Cards ═══ */
.card {
  background: var(--bg-card);
  border: 1px solid #ffffff0a;
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.3s;
}
.card:hover {
  border-color: #ffffff15;
}

/* ═══ Market summary bar ═══ */
.summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.summary-item {
  background: var(--bg-card);
  border: 1px solid #ffffff0a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.summary-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══ Sentiment ═══ */
.sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.sentiment-bullish { background: #00e5a018; color: var(--accent); }
.sentiment-slightly-bullish { background: #00e5a012; color: var(--accent); }
.sentiment-neutral { background: #ffffff10; color: var(--text-secondary); }
.sentiment-slightly-bearish { background: #ff4d6a12; color: var(--red); }
.sentiment-bearish { background: #ff4d6a18; color: var(--red); }

.sentiment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* ═══ Daily Top 5 ═══ */
.picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.pick-card {
  background: var(--bg-card);
  border: 1px solid #ffffff0a;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.pick-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
}

.pick-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pick-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.pick-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
}

.pick-symbol {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pick-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.pick-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}

.pick-change {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.change-positive { color: var(--accent); }
.change-negative { color: var(--red); }

.pick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-buy { background: #00e5a018; color: var(--accent); }
.tag-watch { background: #ffb02018; color: var(--amber); }
.tag-avoid { background: #ff4d6a18; color: var(--red); }

.tag-bullish { background: #00e5a010; color: var(--accent); }
.tag-slightly-bullish { background: #00e5a010; color: var(--accent); }
.tag-neutral { background: #ffffff08; color: var(--text-secondary); }
.tag-slightly-bearish { background: #ff4d6a10; color: var(--red); }
.tag-bearish { background: #ff4d6a10; color: var(--red); }

.tag-low { background: #00e5a010; color: var(--accent); }
.tag-medium { background: #ffb02010; color: var(--amber); }
.tag-high { background: #ff4d6a10; color: var(--red); }

.tag-trending { background: #4d8eff15; color: var(--blue); }
.tag-early_stage { background: #ffb02015; color: var(--amber); }
.tag-high_risk { background: #ff4d6a15; color: var(--red); }

.pick-explanation {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.category-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ═══ Sectors ═══ */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.sector-card {
  background: var(--bg-card);
  border: 1px solid #ffffff0a;
  border-radius: 14px;
  padding: 22px;
}

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

.sector-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.sector-change {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.sector-bar-track {
  height: 6px;
  background: #ffffff08;
  border-radius: 3px;
  overflow: hidden;
}

.sector-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

/* ═══ Market Table ═══ */
.market-table-container {
  margin-bottom: 48px;
  overflow-x: auto;
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.market-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  border-bottom: 1px solid #ffffff08;
  font-weight: 500;
  white-space: nowrap;
}

.market-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #ffffff05;
  white-space: nowrap;
}

.market-table tr {
  transition: background 0.15s;
  cursor: pointer;
}
.market-table tbody tr:hover {
  background: var(--bg-surface);
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coin-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.coin-name {
  font-weight: 500;
}

.coin-symbol {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 6px;
}

.verdict-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.verdict-buy { background: #00e5a018; color: var(--accent); }
.verdict-watch { background: #ffb02018; color: var(--amber); }
.verdict-avoid { background: #ff4d6a18; color: var(--red); }

/* ═══ Verdict page ═══ */
.verdict-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

.verdict-search {
  position: relative;
  margin-bottom: 40px;
}

.search-input {
  width: 100%;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 1px solid #ffffff12;
  border-radius: 14px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.3s;
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-input:focus {
  border-color: var(--accent-glow);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid #ffffff12;
  border-radius: 14px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.search-dropdown.visible {
  display: block;
}

.search-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-option:hover {
  background: var(--bg-surface);
}
.search-option img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.search-option-name {
  font-weight: 500;
}
.search-option-symbol {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 6px;
}
.search-option-rank {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: auto;
}

/* Verdict result */
.verdict-result {
  display: none;
}
.verdict-result.visible {
  display: block;
}

.verdict-hero {
  text-align: center;
  padding: 48px 0 32px;
}

.verdict-coin-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.verdict-coin-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.verdict-coin-symbol {
  color: var(--text-muted);
  font-size: 1rem;
}

.verdict-main {
  text-align: center;
  margin-bottom: 40px;
}

.verdict-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.verdict-word.buy { color: var(--accent); }
.verdict-word.watch { color: var(--amber); }
.verdict-word.avoid { color: var(--red); }

.verdict-explanation {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 550px;
  margin: 0 auto;
}

.verdict-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.verdict-stat {
  background: var(--bg-card);
  border: 1px solid #ffffff0a;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}

.verdict-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.verdict-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.verdict-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

/* ═══ Loading states ═══ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--text-muted);
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-surface) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══ Footer ═══ */
.app-footer {
  border-top: 1px solid #ffffff08;
  padding: 32px 0;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 400px;
  text-align: right;
  line-height: 1.5;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .content { padding: 0 16px; }
  .app-nav { flex-direction: column; gap: 16px; align-items: flex-start; }
  .nav-left { flex-direction: column; gap: 12px; }
  .picks-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: 1fr; }
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
  .verdict-stats { grid-template-columns: 1fr; }
  .verdict-word { font-size: 3rem; }
  .app-footer { flex-direction: column; gap: 16px; text-align: center; }
  .footer-disclaimer { text-align: center; }
  .verdict-meta { flex-wrap: wrap; justify-content: center; }
}

/* ═══ Error state ═══ */
.error-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.error-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.retry-btn {
  margin-top: 20px;
  padding: 12px 28px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  color: var(--accent);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.retry-btn:hover {
  background: var(--accent-glow);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ffffff15; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ffffff25; }
