/* ── Glyph Tracker — finargot.ru/glyph ──────────────────────────────── */
/* Цветовые переменные совместимы с style.css: --bg, --bg2, --bg3, --bg4,
   --acc, --acc-hover, --acc-dim, --txt, --txt2, --txt3, --border         */

:root {
  --glyph-radiant: #66bb6a;
  --glyph-radiant-dim: rgba(102,187,106,.13);
  --glyph-radiant-border: rgba(102,187,106,.28);
  --glyph-dire: #ef5350;
  --glyph-dire-dim: rgba(239,83,80,.13);
  --glyph-dire-border: rgba(239,83,80,.28);
}

/* ── Layout ── */
.glyph-page {
  min-height: 60vh;
  padding-bottom: 3rem;
}

/* ── Hero / Search Section ── */
.glyph-hero-section {
  background: linear-gradient(180deg, rgba(255,140,66,.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1rem 3rem;
  text-align: center;
}

.glyph-hero-inner {
  max-width: 560px;
  margin: 0 auto;
}

.glyph-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.glyph-hero-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 14px;
  filter:
    drop-shadow(0 0 8px rgba(255,180,80,.7))
    drop-shadow(0 0 22px rgba(255,140,40,.5))
    drop-shadow(0 4px 32px rgba(255,120,20,.4));
  animation: glyphGlow 3s ease-in-out infinite;
}

@keyframes glyphGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 8px rgba(255,180,80,.7))
      drop-shadow(0 0 22px rgba(255,140,40,.5))
      drop-shadow(0 4px 32px rgba(255,120,20,.4));
  }
  50% {
    filter:
      drop-shadow(0 0 14px rgba(255,200,100,.95))
      drop-shadow(0 0 38px rgba(255,160,60,.75))
      drop-shadow(0 6px 50px rgba(255,130,30,.6));
  }
}

.glyph-icon-wrap svg {
  width: 56px;
  height: 56px;
}

.glyph-hero-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--txt);
  margin: 0 0 .75rem;
  letter-spacing: -.5px;
}

.glyph-hero-subtitle {
  font-size: 1rem;
  color: var(--txt2);
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

.glyph-error {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(239,83,80,.12);
  border: 1px solid rgba(239,83,80,.3);
  color: #ef9a9a;
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-size: .9rem;
  text-align: left;
}

.glyph-error svg { width: 18px; height: 18px; flex-shrink: 0; color: #ef5350; }

.glyph-search-form { width: 100%; }

.glyph-search-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.glyph-search-input {
  flex: 1;
  height: 48px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--txt);
  font-family: inherit;
  font-size: 1rem;
  padding: 0 1rem;
  outline: none;
  transition: border-color .2s;
  min-width: 0;
}

.glyph-search-input:focus {
  border-color: var(--acc);
}

.glyph-search-input::placeholder { color: var(--txt3); }

.glyph-search-btn {
  height: 48px;
  padding: 0 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.glyph-search-btn svg { width: 16px; height: 16px; }

.glyph-hint {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  color: var(--txt3);
  font-size: .82rem;
  margin-top: 1rem;
  text-align: left;
  line-height: 1.5;
}

.glyph-hint svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.glyph-hint a { color: var(--acc); text-decoration: none; }
.glyph-hint a:hover { text-decoration: underline; }

/* ── Info Cards ── */
.glyph-info-section {
  padding: 2.5rem 1rem;
}

.glyph-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.glyph-info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.glyph-info-icon {
  width: 36px;
  height: 36px;
  background: var(--acc-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
}

.glyph-info-icon svg { width: 18px; height: 18px; stroke: var(--acc); }

.glyph-info-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--txt);
  margin: 0 0 .4rem;
}

.glyph-info-card p {
  font-size: .83rem;
  color: var(--txt2);
  margin: 0;
  line-height: 1.5;
}

/* ── Match Header ── */
.glyph-match-header {
  margin-bottom: 1.75rem;
  padding-top: 1.25rem;
}

.glyph-match-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.glyph-match-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--txt);
  margin: 0;
}

.glyph-match-winner {
  font-size: .85rem;
  font-weight: 600;
  border-radius: 20px;
  padding: .25rem .75rem;
}

.glyph-match-winner.glyph-radiant {
  background: var(--glyph-radiant-dim);
  border: 1px solid var(--glyph-radiant-border);
  color: var(--glyph-radiant);
}

.glyph-match-winner.glyph-dire {
  background: var(--glyph-dire-dim);
  border: 1px solid var(--glyph-dire-border);
  color: var(--glyph-dire);
}

.glyph-match-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: var(--txt2);
  font-size: .88rem;
}

.glyph-match-meta span {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.glyph-match-meta svg { width: 15px; height: 15px; }

.glyph-score {
  font-size: 1rem;
  font-weight: 700;
  gap: .15rem !important;
}

.glyph-radiant { color: var(--glyph-radiant); }
.glyph-dire    { color: var(--glyph-dire); }
.glyph-score-sep { color: var(--txt3); }

/* ── Parse Banner ── */
.glyph-parse-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,140,66,.07);
  border: 1px solid var(--border-acc);
  border-radius: 10px;
  padding: .9rem 1.1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.glyph-parse-text {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--txt2);
  font-size: .88rem;
}

.glyph-parse-text svg { width: 16px; height: 16px; color: var(--acc); flex-shrink: 0; }

.glyph-parse-btn {
  padding: .4rem 1rem;
  font-size: .88rem;
}

.glyph-parse-msg {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .65rem 1rem;
  font-size: .85rem;
  color: var(--txt2);
  margin-top: .5rem;
}

/* ── Main 2-col grid ── */
.glyph-main-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

@media (max-width: 820px) {
  .glyph-main-grid { grid-template-columns: 1fr; }
}

/* ── Section Titles ── */
.glyph-section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--txt);
  margin: 0 0 1rem;
}

/* ── Users Panel ── */
.glyph-users-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.glyph-team-block {
  margin-bottom: 1.25rem;
}

.glyph-team-block:last-child { margin-bottom: 0; }

.glyph-team-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .6rem;
}

.glyph-team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.glyph-radiant-dot { background: var(--glyph-radiant); box-shadow: 0 0 6px var(--glyph-radiant); }
.glyph-dire-dot    { background: var(--glyph-dire);    box-shadow: 0 0 6px var(--glyph-dire); }

.glyph-win-badge {
  background: rgba(255,140,66,.15);
  border: 1px solid var(--border-acc);
  color: var(--acc);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  padding: .1rem .5rem;
}

.glyph-players-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.glyph-player-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg3);
  border-radius: 8px;
  padding: .4rem .65rem;
  min-width: 0;
}

.glyph-hero-avatar {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.glyph-player-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--txt);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glyph-player-hero {
  font-size: .78rem;
  color: var(--txt3);
  flex-shrink: 0;
  display: none;
}

.glyph-count {
  font-size: .78rem;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 22px;
  text-align: center;
  background: rgba(255,140,66,.18);
  color: #ffab68;
  border: 1px solid rgba(255,140,66,.5);
  border-radius: 20px;
  padding: 1px 8px;
  white-space: nowrap;
  /* перебиваем team-color классы — бейдж всегда оранжевый */
}
/* Явно сбрасываем team-цвет когда оба класса на одном элементе */
.glyph-count.glyph-radiant,
.glyph-count.glyph-dire {
  background: rgba(255,140,66,.18) !important;
  color: #ffab68 !important;
  border-color: rgba(255,140,66,.5) !important;
}
.glyph-count-zero {
  background: rgba(255,255,255,.05) !important;
  color: var(--txt3) !important;
  border-color: var(--border) !important;
}

.glyph-unparsed-note,
.glyph-zero-note {
  font-size: .82rem;
  color: var(--txt3);
  padding: .4rem 0;
  margin: 0;
}

/* ── Timeline Panel ── */
.glyph-timeline-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.glyph-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .25rem;
}

.glyph-stratz-btn {
  font-size: .82rem;
  padding: .35rem .8rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.glyph-stratz-btn svg { width: 14px; height: 14px; }

.glyph-stratz-hint {
  font-size: .78rem;
  color: var(--txt3);
  margin: 0 0 .9rem;
}

.glyph-stratz-msg {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .9rem;
  font-size: .83rem;
  color: var(--txt2);
  margin-bottom: .75rem;
}

.glyph-stratz-msg.is-error {
  background: rgba(239,83,80,.08);
  border-color: var(--glyph-dire-border);
  color: #ef9a9a;
}

.glyph-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 440px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg4) transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .25rem 0;
}

.glyph-tl-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .85rem;
  transition: background .15s;
  position: relative;
}

.glyph-tl-row:hover { background: var(--bg3); }

.glyph-tl-time {
  font-size: .78rem;
  font-weight: 600;
  color: var(--txt3);
  min-width: 40px;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', monospace;
}

.glyph-tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.glyph-tl-dot-radiant { background: var(--glyph-radiant); }
.glyph-tl-dot-dire    { background: var(--glyph-dire); }
.glyph-tl-dot-glyph   { background: var(--acc); box-shadow: 0 0 5px var(--acc); }

.glyph-tl-content {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
}

.glyph-tl-label {
  font-size: .83rem;
  color: var(--txt2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glyph-tl-killer {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--txt3);
  flex-shrink: 0;
}

.glyph-tl-hero-img {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
}

/* Glyph rows in timeline */
.glyph-tl-glyph-row {
  background: rgba(255,140,66,.04);
}

.glyph-tl-glyph-label {
  font-size: .83rem;
  font-weight: 500;
}

.glyph-tl-glyph-label.glyph-radiant { color: var(--glyph-radiant); }
.glyph-tl-glyph-label.glyph-dire    { color: var(--glyph-dire); }

.glyph-tl-glyph-player {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--txt2);
  flex-shrink: 0;
}

.glyph-tl-empty {
  padding: 1rem;
  color: var(--txt3);
  font-size: .85rem;
  text-align: center;
  margin: 0;
}

/* ── Teams full roster ── */
.glyph-teams-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .glyph-teams-section { grid-template-columns: 1fr; }
}

.glyph-team-full {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}

.glyph-team-radiant-full { border-top: 2px solid var(--glyph-radiant-border); }
.glyph-team-dire-full    { border-top: 2px solid var(--glyph-dire-border); }

.glyph-team-full-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
}

.glyph-team-full-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.glyph-total-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--txt2);
  padding: .15rem .6rem;
}

.glyph-players-grid {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.glyph-player-card {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: var(--bg3);
  border-radius: 8px;
  padding: .45rem .65rem;
}

.glyph-player-card-hero {
  position: relative;
  flex-shrink: 0;
}

.glyph-player-card-img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.glyph-player-card-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  font-size: .68rem;
  font-weight: 800;
  border-radius: 20px;
  padding: .08rem .35rem;
  border: 1px solid;
  line-height: 1.4;
  /* Убираем влияние прозрачных team-переменных */
}
.glyph-player-card-badge.glyph-radiant {
  background: rgba(102,187,106,.4);
  border-color: rgba(102,187,106,.7);
  color: #c8f0cb;
}
.glyph-player-card-badge.glyph-dire {
  background: rgba(239,83,80,.4);
  border-color: rgba(239,83,80,.7);
  color: #ffc5c4;
}

.glyph-player-card-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--txt);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glyph-player-card-hero-name {
  font-size: .75rem;
  color: var(--txt3);
}

.glyph-player-card-kda {
  font-size: .75rem;
  font-weight: 600;
  color: var(--txt2);
}




/* ── Loading state ── */
@keyframes glyph-spin {
  to { transform: rotate(360deg); }
}
.glyph-loading-icon {
  animation: glyph-spin .8s linear infinite;
  display: inline-block;
}

/* ── Search Again (bottom) ── */
.glyph-search-again {
  text-align: center;
  padding-top: .25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.glyph-search-again-label {
  font-size: .85rem;
  color: var(--txt3);
  margin: 0;
}
.glyph-search-again-form {
  display: flex;
  gap: .45rem;
  align-items: center;
  justify-content: center;
}
.glyph-search-again-form .glyph-search-input {
  width: 210px;
  height: 38px;
  font-size: .87rem;
  padding: 0 .75rem;
}
.glyph-search-again-btn {
  height: 38px;
  padding: 0 .9rem;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  background: var(--acc);
  color: #000;
}
.glyph-search-again-btn:hover {
  background: var(--acc-hover);
  box-shadow: var(--shadow-acc);
}

/* ── Auto-poll banner ── */
.glyph-autopoll-banner {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: rgba(255,140,66,.07);
  border: 1px solid rgba(255,140,66,.28);
  border-radius: 10px;
  padding: .75rem 1.1rem;
  margin-top: .75rem;
  font-size: .875rem;
  color: var(--txt2);
  animation: autoPollPulse 2.2s ease-in-out infinite;
}
.glyph-autopoll-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--acc);
  animation: spinSlow 2s linear infinite;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes autoPollPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .75; }
}
