/* ============================================================
   AlgoSports23 — modern layer: ticker, home feed, community,
   dashboard, API page. Brand: coral #E75639, navy #00346C,
   charcoal #2D3436 body text. Namespaced with `as-`.
   ============================================================ */

:root {
  --as-coral: #E75639;
  --as-coral-tint: #FFF1EF;
  --as-navy: #00346C;
  --as-navy-tint: #E7EEF7;
  --as-text: #2D3436;
  --as-text-2: #6B7280;
  --as-bg: #F8F9FA;
  --as-border: #E0E0E0;
  --as-success: #27AE60;
  --as-error: #E74C3C;
  --as-gold: #D4A017;
  --as-silver: #8E9AAB;
  --as-bronze: #B87333;
}

/* ---------- generic ---------- */
.as-section { padding: 40px 0; }
.as-card {
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .04);
  padding: 20px;
  color: var(--as-text);
}
.as-card + .as-card { margin-top: 16px; }
.as-h2 {
  font-family: "Poppins", sans-serif;
  font-size: 22px; font-weight: 700; color: var(--as-text);
  margin: 0 0 14px;
}
.as-h3 { font-size: 16px; font-weight: 600; color: var(--as-text); margin: 0 0 10px; }
.as-muted { color: var(--as-text-2); font-size: 13px; }
.as-btn {
  display: inline-block; background: var(--as-coral); color: #fff !important;
  border: none; border-radius: 8px; padding: 10px 22px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background .15s ease;
}
.as-btn:hover { background: #c94327; color: #fff; }
.as-btn-outline {
  display: inline-block; background: transparent; color: var(--as-navy) !important;
  border: 1.5px solid var(--as-navy); border-radius: 8px; padding: 9px 20px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
}
.as-btn-outline:hover { background: var(--as-navy-tint); }
.as-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 20px; padding: 5px 14px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--as-border); background: #fff; color: var(--as-text);
  cursor: pointer; margin: 0 8px 8px 0; user-select: none;
}
.as-chip.active { background: var(--as-coral); border-color: var(--as-coral); color: #fff; }
.as-badge-green { color: var(--as-success); background: rgba(39,174,96,.12); border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.as-badge-red { color: var(--as-error); background: rgba(231,76,60,.12); border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.as-badge-gray { color: var(--as-text-2); background: rgba(107,114,128,.12); border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600; }

/* ---------- ticker ---------- */
/* The site header is position:fixed, so the ticker needs a top offset
   matching the header height at each breakpoint to sit right below it. */
.as-ticker {
  background: var(--as-navy); color: #fff;
  overflow: hidden; white-space: nowrap; position: relative;
  border-bottom: 3px solid var(--as-coral);
  margin-top: 70px;
}
@media (max-width: 991px) {
  .as-ticker { margin-top: 92px; }
}
.as-ticker-track {
  display: inline-flex; align-items: center;
  flex-wrap: nowrap; white-space: nowrap;
  padding: 9px 0;
  animation: as-ticker-scroll 60s linear infinite;
  will-change: transform;
}
.as-ticker:hover .as-ticker-track { animation-play-state: paused; }
@keyframes as-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Single line is non-negotiable: nowrap at every level plus flex-shrink 0. */
.as-ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 0 0 auto; white-space: nowrap;
  padding: 0 22px; font-size: 13px; line-height: 1;
  font-family: "Poppins", sans-serif;
  border-right: 1px solid rgba(255,255,255,.22);
}
.as-ticker-item:last-child { border-right: none; }
.as-ticker-item > * { white-space: nowrap; flex: 0 0 auto; }
.as-ticker-item .sport { color: #9fb6d4; font-weight: 600; font-size: 11px; letter-spacing: .5px; }
.as-ticker-item .score { font-weight: 700; }
.as-ticker-item .ft { color: #9fb6d4; font-size: 11px; }
.as-ticker-item .vs-time { color: #ffd9d0; font-size: 12px; }

/* ---------- home feed layout ---------- */
.as-home-grid { display: flex; gap: 24px; align-items: flex-start; }
.as-home-main { flex: 1 1 65%; min-width: 0; }
.as-home-side { flex: 0 0 32%; min-width: 280px; }
@media (max-width: 991px) {
  .as-home-grid { flex-direction: column; }
  .as-home-side { flex: 1 1 100%; width: 100%; min-width: 0; }
}

.as-game-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--as-border);
}
.as-game-row:last-child { border-bottom: none; }
.as-game-when { flex: 0 0 92px; text-align: center; }
.as-game-when .d { font-weight: 700; font-size: 13px; color: var(--as-navy); }
.as-game-when .t { font-size: 12px; color: var(--as-text-2); }
.as-game-teams { flex: 1 1 auto; min-width: 0; }
.as-game-teams .matchup { font-weight: 600; font-size: 14.5px; color: var(--as-text); }
.as-game-teams .algo { font-size: 12.5px; color: var(--as-text-2); margin-top: 2px; }
.as-game-teams .algo b { color: var(--as-navy); }
.as-game-cta { flex: 0 0 auto; }
.as-score { font-weight: 700; font-size: 15px; color: var(--as-text); }
.as-score .win { color: var(--as-success); }

/* pick split bar */
.as-split { margin-top: 6px; max-width: 420px; }
.as-split-bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; }
.as-split-bar .a { background: var(--as-coral); }
.as-split-bar .b { background: var(--as-navy); }
.as-split-labels { display: flex; justify-content: space-between; font-size: 11.5px; margin-top: 3px; }
.as-split-labels .la { color: var(--as-coral); font-weight: 600; }
.as-split-labels .lb { color: var(--as-navy); font-weight: 600; }

/* ---------- leaderboard ---------- */
.as-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--as-text); }
.as-table thead th {
  position: sticky; top: 0; background: var(--as-navy); color: #fff;
  padding: 10px 12px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .5px; font-weight: 600; text-align: left; z-index: 1;
}
.as-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--as-border); }
.as-table tbody tr:nth-child(even) { background: #fafbfc; }
.as-table tbody tr:hover { background: var(--as-coral-tint); }
.as-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.as-player-link { color: var(--as-navy); font-weight: 600; cursor: pointer; text-decoration: none; }
.as-player-link:hover { color: var(--as-coral); }
.as-rank-1 { color: var(--as-gold); } .as-rank-2 { color: var(--as-silver); } .as-rank-3 { color: var(--as-bronze); }

.as-myrank {
  background: var(--as-navy); color: #fff; border-radius: 12px;
  padding: 18px 20px; display: flex; align-items: center; gap: 26px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.as-myrank .label { font-size: 10.5px; letter-spacing: 1px; color: #9fb6d4; text-transform: uppercase; }
.as-myrank .big { font-size: 26px; font-weight: 700; }
.as-myrank .stat { font-size: 16px; font-weight: 700; }

/* ---------- profile / stats ---------- */
.as-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.as-stat {
  background: #fff; border: 1px solid var(--as-border); border-radius: 10px;
  padding: 14px; text-align: center;
}
.as-stat .v { font-size: 22px; font-weight: 700; color: var(--as-navy); }
.as-stat .k { font-size: 12px; color: var(--as-text-2); margin-top: 2px; }

.as-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.as-bar-row .name { flex: 0 0 110px; font-size: 13px; color: var(--as-text); font-weight: 500; text-align: right; }
.as-bar-row .bar { flex: 1 1 auto; background: var(--as-navy-tint); border-radius: 5px; height: 16px; overflow: hidden; }
.as-bar-row .bar > span { display: block; height: 100%; background: var(--as-coral); border-radius: 5px; min-width: 2px; }
.as-bar-row .val { flex: 0 0 84px; font-size: 12.5px; color: var(--as-text-2); }

.as-insight {
  border-left: 4px solid var(--as-coral); background: var(--as-coral-tint);
  border-radius: 0 10px 10px 0; padding: 12px 16px; margin-bottom: 10px;
  font-size: 14px; color: var(--as-text);
}

.as-vs { display: flex; gap: 14px; text-align: center; }
.as-vs .side { flex: 1; border: 1px solid var(--as-border); border-radius: 10px; padding: 16px 8px; }
.as-vs .side.you { border-color: var(--as-coral); background: var(--as-coral-tint); }
.as-vs .side.algo { border-color: var(--as-navy); background: var(--as-navy-tint); }
.as-vs .pct { font-size: 26px; font-weight: 700; }
.as-vs .side.you .pct { color: var(--as-coral); }
.as-vs .side.algo .pct { color: var(--as-navy); }

/* sparkline (recent form) */
.as-form { display: flex; gap: 5px; flex-wrap: wrap; }
.as-form .dot {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700;
}
.as-form .dot.w { background: var(--as-success); }
.as-form .dot.l { background: var(--as-error); }

/* ---------- API page ---------- */
.as-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.as-tier { border: 1.5px solid var(--as-border); border-radius: 14px; padding: 24px; background: #fff; position: relative; }
.as-tier.featured { border-color: var(--as-coral); box-shadow: 0 6px 18px rgba(231,86,57,.12); }
.as-tier .flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--as-coral); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 12px; padding: 3px 12px; letter-spacing: .5px;
}
.as-tier .name { font-size: 17px; font-weight: 700; color: var(--as-navy); }
.as-tier .price { font-size: 21px; font-weight: 700; color: var(--as-text); margin: 8px 0 14px; }
.as-tier ul { list-style: none; padding: 0; margin: 0 0 18px; }
.as-tier ul li { padding: 6px 0; font-size: 13.5px; color: var(--as-text); border-bottom: 1px dashed var(--as-border); }
.as-tier ul li::before { content: "✓  "; color: var(--as-success); font-weight: 700; }
.as-code {
  background: #10243c; color: #d9e6f5; border-radius: 12px; padding: 18px;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 12.5px;
  overflow-x: auto; line-height: 1.55; white-space: pre;
}
.as-code .k { color: #7fb3ff; } .as-code .s { color: #ffd9a0; } .as-code .n { color: #9be89b; }

/* ---------- responsive helpers ---------- */
@media (max-width: 767px) {
  .as-game-when { flex: 0 0 70px; }
  .as-game-row { flex-wrap: wrap; }
  .as-game-cta { width: 100%; }
  .as-myrank { gap: 14px; }
  .as-table { font-size: 13px; }
  .as-table thead th, .as-table tbody td { padding: 8px; }
  .as-vs { flex-direction: column; }
}

/* Standalone pages sit below the fixed site header. */
.as-page { padding-top: 100px !important; }
@media (max-width: 991px) { .as-page { padding-top: 118px !important; } }

/* ---------- sidebar news (replaces the homepage news carousel) ---------- */
.as-news-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--as-border);
  text-decoration: none; cursor: pointer;
}
.as-news-row:last-of-type { border-bottom: none; }
.as-news-row .thumb {
  flex: 0 0 60px; width: 60px; height: 60px;
  object-fit: cover; border-radius: 8px; background: var(--as-navy-tint);
}
.as-news-row .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-news-row .tag {
  color: var(--as-coral); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.as-news-row .headline {
  color: var(--as-text); font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.as-news-row:hover .headline { color: var(--as-coral); }

/* ---------- dashboard analysis ---------- */
.as-analysis-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; margin-bottom: 16px;
}
.as-analysis-grid .as-card + .as-card { margin-top: 0; }
.as-bar-row .bar > span.navy { background: var(--as-navy); }
.as-badge-amber { color: #B7791F; background: rgba(214,158,46,.15); border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600; }

/* conic ring for upset rate */
.as-ring {
  --pct: 0;
  position: relative;
  width: 110px; height: 110px; border-radius: 50%;
  margin: 6px auto 0;
  background: conic-gradient(var(--as-coral) calc(var(--pct) * 1%), var(--as-navy-tint) 0);
  display: flex; align-items: center; justify-content: center;
}
.as-ring::before {
  content: ""; position: absolute;
  width: 82px; height: 82px; border-radius: 50%; background: #fff;
}
.as-ring .pct { position: relative; font-size: 20px; font-weight: 700; color: var(--as-text); }

/* trend columns */
.as-trend { display: flex; gap: 14px; align-items: flex-end; margin-top: 8px; }
.as-trend .col { flex: 1; max-width: 90px; text-align: center; }
.as-trend .bar-wrap {
  height: 110px; background: var(--as-navy-tint); border-radius: 8px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.as-trend .bar { width: 100%; background: var(--as-coral); border-radius: 8px 8px 0 0; transition: height .3s ease; }
.as-trend .pct { font-weight: 700; font-size: 14px; color: var(--as-text); margin-top: 5px; }

/* platform stats (navy card) */
.as-platform-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
}
.as-platform-grid .v { font-size: 24px; font-weight: 700; color: #fff; }
.as-platform-grid .k { font-size: 12.5px; color: #9fb6d4; margin-top: 2px; }

/* ---------- nav: keep one line at 100% zoom on 1366-1920px ---------- */
.header .mainmenu .navbar .scalation .navbar-nav .nav-item .nav-link {
  white-space: nowrap;
}
@media (min-width: 992px) and (max-width: 1500px) {
  .header .mainmenu .navbar .scalation .navbar-nav.nn-right-straight .nav-item .nav-link,
  .header .mainmenu.profile-icon .navbar .scalation .navbar-nav.nn-right-straight .nav-item .nav-link {
    margin-right: 12px;
    font-size: 13px;
  }
}

/* ---------- restyled Contest Winners carousel ---------- */
.as-winners-section { padding: 24px 0 40px; }
.as-winner-card {
  background: #fff; border: 1px solid var(--as-border); border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
  margin: 6px 8px; cursor: pointer; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.as-winner-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.09); }
.as-winner-card .head {
  background: var(--as-navy); color: #fff; text-align: center;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 14px;
  padding: 9px 6px;
}
.as-winner-card .body { padding: 14px 10px; text-align: center; }
.as-winner-card .when { color: var(--as-text-2); font-size: 12px; margin-bottom: 6px; }
.as-winner-card .when i { color: var(--as-coral); margin-right: 3px; }
.as-winner-card .who {
  color: var(--as-text); font-weight: 600; font-size: 14.5px; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.as-winner-card .rank { color: var(--as-coral); font-weight: 700; font-size: 13px; }

/* ---------- dashboard round 3: distribution, calibration, wide trend ---------- */
.as-two-col { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.as-dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.as-dist-row .label { flex: 0 0 92px; font-size: 13px; color: var(--as-text); text-align: right; }
.as-dist-row .bars { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.as-dist-row .bar {
  display: flex; align-items: center; justify-content: flex-end;
  height: 15px; border-radius: 4px; min-width: 4px;
  color: #fff; font-size: 10.5px; padding-right: 5px;
}
.as-dist-row .bar.you { background: var(--as-coral); }
.as-dist-row .bar.algo { background: var(--as-navy); }
.as-dist-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--as-text-2); }
.as-dist-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.as-dist-legend .sw.you { background: var(--as-coral); }
.as-dist-legend .sw.algo { background: var(--as-navy); }

.as-cal-table thead th { position: static; padding: 8px 10px; font-size: 11px; }
.as-cal-table tbody td { padding: 8px 10px; font-size: 13px; }
.as-cal-win { background: rgba(39,174,96,.10) !important; }
.as-cal-win td:first-child { border-left: 3px solid var(--as-success); }

.as-trend-row { grid-template-columns: 2fr 1fr; }
@media (max-width: 991px) { .as-trend-row { grid-template-columns: 1fr; } }
.as-trend-wide { max-width: none; }
.as-trend-wide .col { max-width: none; }
.as-trend-wide .bar-wrap { height: 150px; }

/* ---------- Upcoming Contests card (replaces winners carousel) ---------- */
.as-upcoming-section { padding: 8px 0 32px; }
.as-upcoming-head {
  background: var(--as-navy); color: #fff;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 16px;
  padding: 12px 20px;
}
.as-sport-badge {
  display: inline-block; background: var(--as-navy-tint); color: var(--as-navy);
  font-size: 11.5px; font-weight: 700; border-radius: 14px;
  padding: 3px 11px; margin-right: 10px; letter-spacing: .3px;
}
.as-upcoming-empty { text-align: center; padding: 34px 10px; color: var(--as-text-2); }
.as-upcoming-empty i { font-size: 34px; color: var(--as-coral); opacity: .7; }
.as-upcoming-empty p { margin: 10px 0 0; font-size: 14.5px; color: var(--as-text); }

/* ---------- About Us: body copy reads left-aligned, not centered ---------- */
/* (keeps the .text-center class because the legacy padding rule keys off it) */
.container.text-about,
.container.text-about p,
.container.text-about ul,
.container.text-about li {
  text-align: left !important;
}


/* ---------- pagination: never animate, period ---------- */
.pok-pagination,
.pok-pagination *,
.pagination,
.p-paginator,
[class*="paginator"],
[class*="pagination"],
.page-link,
.page-item {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
