/* ════════════════════════════════════════════════════════════════════
   UC STOCKMARKET — shared styles for blockchain + projects subdomains
   Path on server: /var/www/unitedcultures/shared/uc-stockmarket.css
   ════════════════════════════════════════════════════════════════════ */

/* Use CSS variables already set by master header (--gold --navy --blue) */
:root {
  --bg-dark: #0a1628;
  --bg-darker: #050d18;
  --row-hover: #f8f9fb;
  --border-soft: #e5eaf2;
  --pct-up: #16a34a;
  --pct-down: #dc2626;
  --pct-flat: #6b7280;
}

/* === TICKER TAPE === */
.uc-ticker {
  background: var(--bg-darker);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  height: 44px;
  overflow: hidden;
  position: relative;
  z-index: 5;
}
.uc-ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: uc-ticker-scroll 90s linear infinite;
  will-change: transform;
}
.uc-ticker:hover .uc-ticker-inner { animation-play-state: paused; }
.uc-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  border-right: 1px solid rgba(255,255,255,.06);
}
.uc-ticker-item .tk-ticker { color: #fff; font-weight: 800; letter-spacing: .04em; }
.uc-ticker-item .tk-price { color: rgba(255,255,255,.85); }
.uc-ticker-item .tk-pct.pct-up { color: #4ade80; }
.uc-ticker-item .tk-pct.pct-down { color: #f87171; }
.uc-ticker-item .tk-pct.pct-flat { color: rgba(255,255,255,.5); }
@keyframes uc-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* === HEADLINE STATS (5-card row) === */
.uc-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.uc-stat-card {
  background: #fff;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uc-stat-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pct-flat);
}
.uc-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #0a0a2e;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.uc-stat-value.flash-up   { animation: flash-green .8s ease; }
.uc-stat-value.flash-down { animation: flash-red   .8s ease; }
.uc-stat-sub {
  font-size: 11px;
  color: var(--pct-flat);
}
.uc-stat-sub.pct-up   { color: var(--pct-up); }
.uc-stat-sub.pct-down { color: var(--pct-down); }
@keyframes flash-green { 0% { background: rgba(22,163,74,.18); } 100% { background: transparent; } }
@keyframes flash-red   { 0% { background: rgba(220,38,38,.18); } 100% { background: transparent; } }

@media(max-width:900px){
  .uc-stats { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:520px){
  .uc-stats { grid-template-columns: 1fr; }
  .uc-stat-card { padding: 16px 20px; }
}

/* === SECTION WRAPPER === */
.uc-sec {
  padding: 40px 48px;
  border-bottom: 1px solid var(--border-soft);
  max-width: 1400px;
  margin: 0 auto;
}
.uc-sec h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0a0a2e;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.uc-sec h2 .gold { color: #c9a84c; }
.uc-sec .sec-sub {
  font-size: 13px;
  color: var(--pct-flat);
  margin-bottom: 22px;
}
@media(max-width:900px){ .uc-sec { padding: 28px 24px; } }

/* === FILTER BAR === */
.uc-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.uc-filter-bar select, .uc-filter-bar input[type=search] {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
  min-width: 160px;
}
.uc-filter-bar input[type=search] { flex: 1; min-width: 200px; }
.uc-filter-bar select:focus, .uc-filter-bar input[type=search]:focus { border-color: #003399; }

/* === LISTING TABLE (CoinGecko-style) === */
.uc-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.uc-list thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pct-flat);
  border-bottom: 1px solid var(--border-soft);
  background: #fafbfc;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.uc-list thead th.right { text-align: right; }
.uc-list tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.uc-list tbody td.right { text-align: right; }
.uc-list tbody tr:hover { background: var(--row-hover); }
.uc-list .tk-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.uc-list .tk-logo {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg,#0a1628,#1e3a5f);
  color: #c9a84c;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}
.uc-list .tk-name { font-weight: 700; color: #0a0a2e; }
.uc-list .tk-ticker {
  font-size: 11px;
  color: var(--pct-flat);
  font-weight: 700;
  letter-spacing: .04em;
}
.pct-up   { color: var(--pct-up); }
.pct-down { color: var(--pct-down); }
.pct-flat { color: var(--pct-flat); }

.uc-spark {
  width: 100px;
  height: 30px;
  display: inline-block;
}

/* === ROADMAP TIMELINE === */
.uc-roadmap {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--border-soft);
}
.uc-rm-year {
  flex: 0 0 200px;
  padding: 16px 18px;
  border-right: 1px solid var(--border-soft);
  position: relative;
}
.uc-rm-year::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 0; right: 0;
  height: 2px;
  background: var(--border-soft);
  z-index: 0;
}
.uc-rm-year.in-progress::before { background: linear-gradient(90deg, #c9a84c 0%, var(--border-soft) 100%); }
.uc-rm-year.complete::before    { background: #16a34a; }
.uc-rm-dot {
  position: absolute;
  top: 22px; left: 18px;
  width: 14px; height: 14px;
  background: #fff;
  border: 3px solid var(--border-soft);
  border-radius: 50%;
  z-index: 1;
}
.uc-rm-year.in-progress .uc-rm-dot { border-color: #c9a84c; background: #c9a84c; }
.uc-rm-year.complete .uc-rm-dot    { border-color: #16a34a; background: #16a34a; }
.uc-rm-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #0a0a2e;
  margin-top: 24px;
  text-transform: uppercase;
}
.uc-rm-target {
  font-size: 18px;
  font-weight: 800;
  color: #0a0a2e;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.uc-rm-progress {
  font-size: 11px;
  color: var(--pct-flat);
  margin-top: 4px;
}
.uc-rm-progress strong { color: #c9a84c; }
.uc-rm-desc {
  font-size: 11px;
  color: var(--pct-flat);
  margin-top: 8px;
  line-height: 1.5;
}

/* === INFRASTRUCTURE PROGRESS BARS === */
.uc-infra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.uc-infra-card {
  border: 1px solid var(--border-soft);
  padding: 18px 22px;
}
.uc-infra-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pct-flat);
  margin-bottom: 6px;
}
.uc-infra-counts {
  font-size: 22px;
  font-weight: 800;
  color: #0a0a2e;
  font-variant-numeric: tabular-nums;
}
.uc-infra-counts .target { color: var(--pct-flat); font-weight: 600; font-size: 16px; }
.uc-infra-bar {
  height: 8px;
  background: var(--border-soft);
  margin-top: 10px;
  overflow: hidden;
  position: relative;
}
.uc-infra-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a84c, #e6c269);
  transition: width .8s ease;
}
.uc-infra-pct {
  font-size: 11px;
  color: var(--pct-flat);
  margin-top: 6px;
}
@media(max-width:900px){ .uc-infra { grid-template-columns: 1fr; } }

/* === PLATFORM LEADERBOARD === */
.uc-platform {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}
.uc-platform-meta {
  background: linear-gradient(135deg, #0a1628, #1a2942);
  color: #fff;
  padding: 28px;
  border-left: 4px solid #c9a84c;
}
.uc-platform-meta .label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  color: #c9a84c;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.uc-platform-meta h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.uc-platform-meta .countdown {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  margin-top: 14px;
}
.uc-platform-meta .countdown strong { color: #c9a84c; font-size: 18px; }
.uc-platform-meta .prize {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,.85);
}
.uc-platform-meta .prize strong { color: #c9a84c; font-weight: 800; }

.uc-leaderboard {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.uc-leaderboard th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pct-flat);
  border-bottom: 1px solid var(--border-soft);
  background: #fafbfc;
}
.uc-leaderboard th.right { text-align: right; }
.uc-leaderboard td {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}
.uc-leaderboard td.right { text-align: right; }
.uc-leaderboard tr:nth-child(1) td { background: linear-gradient(90deg, rgba(201,168,76,.08), transparent); font-weight: 700; }
.uc-leaderboard .rank {
  display: inline-block;
  width: 28px; height: 28px;
  background: #f3f4f6;
  border-radius: 50%;
  text-align: center;
  font-weight: 800;
  line-height: 28px;
  font-size: 12px;
}
.uc-leaderboard tr:nth-child(1) .rank { background: #c9a84c; color: #000; }
.uc-leaderboard tr:nth-child(2) .rank { background: #d1d5db; color: #1a1a1a; }
.uc-leaderboard tr:nth-child(3) .rank { background: #b87333; color: #fff; }

@media(max-width:900px){ .uc-platform { grid-template-columns: 1fr; } }

/* === PROJECT CARD GRID === */
.uc-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.uc-project-card {
  border: 1px solid var(--border-soft);
  padding: 22px;
  background: #fff;
  transition: border-color .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uc-project-card:hover {
  border-color: #c9a84c;
  transform: translateY(-2px);
}
.uc-project-card .pj-cat {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #c9a84c;
}
.uc-project-card .pj-name {
  font-size: 15px;
  font-weight: 800;
  color: #0a0a2e;
  line-height: 1.3;
}
.uc-project-card .pj-meta {
  font-size: 11px;
  color: var(--pct-flat);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.uc-project-card .pj-bar {
  height: 8px;
  background: var(--border-soft);
  overflow: hidden;
  margin-top: 4px;
}
.uc-project-card .pj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a84c, #e6c269);
}
.uc-project-card .pj-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #0a0a2e;
}
.uc-project-card .pj-stats strong { font-weight: 800; }
.uc-project-card .pj-status {
  display: inline-block;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pj-status.proposed   { background: #f3f4f6; color: #6b7280; }
.pj-status.approved   { background: #dbeafe; color: #1e40af; }
.pj-status.funding    { background: #fef3c7; color: #92400e; }
.pj-status.building   { background: #dcfce7; color: #166534; }
.pj-status.active     { background: #c9a84c; color: #000; }
.pj-status.complete   { background: #16a34a; color: #fff; }
.pj-status.suspended  { background: #fee2e2; color: #991b1b; }

/* === PER-COIN PAGE LAYOUT === */
.uc-coin-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.uc-coin-chart-box {
  border: 1px solid var(--border-soft);
  background: #fff;
  padding: 16px;
}
.uc-coin-chart-box #chart { width: 100%; height: 380px; }
.uc-coin-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.uc-coin-side .box {
  border: 1px solid var(--border-soft);
  padding: 16px;
  background: #fff;
}
.uc-coin-side h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pct-flat);
  margin-bottom: 10px;
}
.uc-trade-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}
@media(max-width:900px){ .uc-coin-grid { grid-template-columns: 1fr; } }

/* === HELPERS === */
.text-right { text-align: right; }
.muted { color: var(--pct-flat); }
.tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--border-soft);
  color: var(--pct-flat);
}
.tag.gold { background: #c9a84c; color: #000; }
.tag.live { background: #16a34a; color: #fff; }
