/* ============================================================
 * /streams — Live Twitch broadcasts of Ancient Arena players.
 *
 * Visual language matches dota1x6 / the rest of the site:
 *   • dark navy base (--color-bg-base #0a1823) for cards
 *   • sharp 2px corners (radius-xs), depth via --shadow-dark-l
 *   • Reaver display for titles/labels, Roboto for body
 *   • single orange accent (--color-primary-500 #fb8c07)
 *   • LIVE = red (--color-danger #ff3a43), pulsing
 *
 * Structure:
 *   .aa-streams                       page root
 *     .aa-streams__optin              opt-in banner (own card if you're in the roster)
 *     .aa-streams__grid               grid of .aa-stream-card
 *       .aa-stream-card               whole <a>, 16:9 thumb + 84px body
 *     .aa-streams__empty              empty state (no live / master off)
 *     .aa-streams__admin              <details> with master switch + roster CRUD
 *
 * Legacy-cascade overrides marked with !important + comment — needed because
 * style.css loads outside @layer so default `a:hover { text-decoration: underline }`
 * and `body { padding }` win on origin.
 * ============================================================ */

.aa-streams {
    /* Width comes from the page-level .container (max-width: var(--container-max)).
       Don't set our own max-width here or the block reads narrower than other pages. */
    padding-block: 8px 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===========================================================
 * Alerts
 * =========================================================== */
.aa-streams__alert {
    padding: 14px 18px;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    background: rgba(255, 58, 67, 0.08);
    color: #ff7077;
    box-shadow: inset 0 0 0 1px rgba(255, 58, 67, 0.35);
}
.aa-streams__alert--warn {
    background: rgba(251, 191, 36, 0.08);
    color: #fdd97a;
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.35);
}
.aa-streams__alert code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 6px;
    border-radius: 2px;
}

/* ===========================================================
 * Opt-in banner — visible to the logged-in roster member
 * =========================================================== */
.aa-streams__optin {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    background: var(--color-bg-base, #0a1823);
    border-radius: 2px;
    box-shadow: 0 11px 8px rgba(0, 0, 0, 0.42),
                inset 0 0 111px 1px rgba(0, 0, 0, 0.35),
                inset 4px 0 0 0 #5a6677;             /* gray accent rail */
    transition: box-shadow 200ms ease;
}
.aa-streams__optin.is-live {
    /* Switch the accent rail to LIVE red when streaming. */
    box-shadow: 0 11px 8px rgba(0, 0, 0, 0.42),
                inset 0 0 111px 1px rgba(0, 0, 0, 0.35),
                inset 4px 0 0 0 #ff3a43,
                0 0 0 1px rgba(255, 58, 67, 0.18);
}

.aa-streams__optin-side {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.aa-streams__optin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5a6677;
    flex: none;
    box-shadow: 0 0 0 3px rgba(90, 102, 119, 0.15);
}
.aa-streams__optin.is-live .aa-streams__optin-dot {
    background: #ff3a43;
    box-shadow: 0 0 0 3px rgba(255, 58, 67, 0.22),
                0 0 12px rgba(255, 58, 67, 0.45);
    animation: aa-pulse 1.6s ease-in-out infinite;
}

.aa-streams__optin-eyebrow {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-strong, #fff);
    margin-bottom: 2px;
}
.aa-streams__optin-meta {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted, #9098a6);
}
.aa-streams__optin-meta strong {
    color: var(--color-text-default, #e3e8ef);
    font-weight: 600;
}

.aa-streams__optin-status {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted, #9098a6);
    white-space: nowrap;
}
.aa-streams__optin.is-live .aa-streams__optin-status {
    color: #ff7077;
    font-weight: 600;
}

.aa-streams__optin-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 2px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--gradient-cta, linear-gradient(270deg, #fb8c07 0%, #f16621 100%));
    box-shadow: var(--shadow-cta-glow,
                0 0 0 rgba(243, 129, 60, 0.35) inset,
                0 1px 10px rgba(230, 108, 15, 0.87));
    transition: filter 200ms ease, transform 200ms ease;
}
.aa-streams__optin-btn:hover:not(:disabled) { filter: brightness(1.08); }
.aa-streams__optin-btn:active:not(:disabled) { transform: translateY(1px); }
.aa-streams__optin-btn:disabled { opacity: 0.6; cursor: progress; }
.aa-streams__optin-btn.is-live {
    background: linear-gradient(270deg, #ff3a43 0%, #c92128 100%);
    box-shadow: 0 0 0 rgba(255, 58, 67, 0.35) inset,
                0 1px 10px rgba(196, 27, 35, 0.7);
}

/* ===========================================================
 * Grid of live stream cards
 * =========================================================== */
.aa-streams__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.aa-stream-card {
    position: relative;
    display: block;
    background: var(--color-bg-base, #0a1823);
    border-radius: 0 !important;
    overflow: hidden;
    color: inherit !important;          /* legacy a { color: var(--accent) } */
    text-decoration: none !important;   /* legacy a:hover { text-decoration: underline } */
    box-shadow: 0 11px 8px rgba(0, 0, 0, 0.42),
                inset 0 0 111px 1px rgba(0, 0, 0, 0.35);
    transition: box-shadow 150ms ease;
}
.aa-stream-card:hover {
    box-shadow: 0 11px 8px rgba(0, 0, 0, 0.42),
                inset 0 0 111px 1px rgba(0, 0, 0, 0.35),
                0 0 0 1px var(--color-primary-500, #fb8c07);
}

/* ─── Thumbnail (16:9) with overlays ─── */
.aa-stream-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #050a0d;
    overflow: hidden;
    border-radius: 0;
}
.aa-stream-card__thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.aa-stream-card__thumb-fallback {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, #0e222e 0%, #050a0d 60%),
        radial-gradient(circle at 20% 20%, rgba(251, 140, 7, 0.18), transparent 60%);
}

/* gradient scrim — keep overlay text readable on busy thumbnails */
.aa-stream-card__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
                rgba(5, 10, 13, 0.55) 0%,
                rgba(5, 10, 13, 0) 30%,
                rgba(5, 10, 13, 0) 65%,
                rgba(5, 10, 13, 0.75) 100%);
    pointer-events: none;
}

/* LIVE badge */
.aa-stream-card__live {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #ff3a43;
    color: #fff;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    z-index: 2;
}
.aa-stream-card__live-dot {
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: aa-pulse 1.4s ease-in-out infinite;
}

/* viewer count + duration — bottom-right cluster, top for viewer, bottom for duration */
.aa-stream-card__viewers,
.aa-stream-card__duration {
    position: absolute;
    background: rgba(5, 10, 13, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 2px;
    z-index: 2;
    font-variant-numeric: tabular-nums;
    line-height: 16px;
}
.aa-stream-card__viewers {
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.aa-stream-card__viewers svg { opacity: 0.85; }

.aa-stream-card__duration {
    bottom: 12px;
    right: 12px;
    font-variant-numeric: tabular-nums;
}

/* Tier ribbon — only for epic / partner */
.aa-stream-card__tier {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 2px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #5a3aa8 0%, #8253c4 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 2;
}
.aa-stream-card--epic .aa-stream-card__tier {
    background: linear-gradient(135deg, #c89233 0%, #e0b56b 100%);
    color: #1a0f00;
}

/* Subtle accent for tier on the card itself (top ribbon line) */
.aa-stream-card--epic { box-shadow: 0 11px 8px rgba(0,0,0,.42), inset 0 0 111px 1px rgba(0,0,0,.35), inset 0 2px 0 0 #c89233; }
.aa-stream-card--partner { box-shadow: 0 11px 8px rgba(0,0,0,.42), inset 0 0 111px 1px rgba(0,0,0,.35), inset 0 2px 0 0 #8253c4; }

/* ─── Card body ─── */
.aa-stream-card__body {
    display: flex;
    gap: 12px;
    padding: 14px 16px 16px;
    align-items: flex-start;
}

.aa-stream-card__avatar {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--color-bg-base, #0a1823),
                0 0 0 3px rgba(251, 140, 7, 0.35);
}
.aa-stream-card__avatar--placeholder {
    background: linear-gradient(135deg, #1e3548, #0e222e);
}

.aa-stream-card__info {
    min-width: 0;
    flex: 1;
}

.aa-stream-card__name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text-strong, #fff);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aa-stream-card__title {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-default, #e3e8ef);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 2.8em;
}
.aa-stream-card:hover .aa-stream-card__name { color: var(--color-primary-500, #fb8c07); }

.aa-stream-card__game {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted, #9098a6);
}

/* ===========================================================
 * Empty state
 * =========================================================== */
.aa-streams__empty {
    padding: 64px 24px 56px;
    text-align: center;
    background: var(--color-bg-base, #0a1823);
    border-radius: 2px;
    color: var(--color-text-muted, #9098a6);
    box-shadow: 0 11px 8px rgba(0, 0, 0, 0.42),
                inset 0 0 111px 1px rgba(0, 0, 0, 0.35);
}
.aa-streams__empty > svg {
    color: var(--color-text-subtle, #5a6677);
    margin-bottom: 16px;
}
.aa-streams__empty-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-strong, #fff);
    margin-bottom: 10px;
}
.aa-streams__empty-text {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    max-width: 460px;
    margin: 0 auto;
}

/* ===========================================================
 * Admin panel — collapsible <details>
 * =========================================================== */
.aa-streams__admin {
    background: var(--color-bg-base, #0a1823);
    border-radius: 2px;
    box-shadow: 0 11px 8px rgba(0, 0, 0, 0.42),
                inset 0 0 111px 1px rgba(0, 0, 0, 0.35);
    margin-top: 16px;
}

.aa-streams__admin-summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.aa-streams__admin-summary::-webkit-details-marker { display: none; }

.aa-streams__admin-eyebrow {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-strong, #fff);
}
.aa-streams__admin-chev {
    color: var(--color-text-muted, #9098a6);
    transition: transform 200ms ease;
    font-size: 18px;
}
.aa-streams__admin[open] .aa-streams__admin-chev { transform: rotate(180deg); }

.aa-streams__admin-body {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.aa-streams__admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.aa-streams__admin-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.aa-streams__admin-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-strong, #fff);
}
.aa-streams__admin-hint {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-muted, #9098a6);
    max-width: 640px;
}

/* ===========================================================
 * Toggle switch — used for master + per-row ban toggles
 * =========================================================== */
.aa-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    flex: none;
}
.aa-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.aa-toggle__track {
    position: relative;
    width: 44px;
    height: 24px;
    background: #1e3548;
    border-radius: 999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: background 180ms ease;
}
.aa-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #9098a6;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    transition: transform 180ms ease, background 180ms ease;
}
.aa-toggle input:checked + .aa-toggle__track {
    background: linear-gradient(270deg, #fb8c07 0%, #f16621 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5),
                0 0 8px rgba(251, 140, 7, 0.35);
}
.aa-toggle input:checked + .aa-toggle__track .aa-toggle__thumb {
    transform: translateX(20px);
    background: #fff;
}
.aa-toggle__label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-default, #e3e8ef);
}
.aa-toggle--sm .aa-toggle__track { width: 36px; height: 20px; }
.aa-toggle--sm .aa-toggle__thumb { width: 14px; height: 14px; top: 3px; left: 3px; }
.aa-toggle--sm input:checked + .aa-toggle__track .aa-toggle__thumb { transform: translateX(16px); }

/* ===========================================================
 * Roster form + table (admin)
 * =========================================================== */
.aa-roster-form {
    display: grid;
    grid-template-columns: minmax(140px, 180px) minmax(180px, 1fr) 140px auto;
    gap: 10px;
    align-items: center;
}
.aa-roster-form input,
.aa-roster-form select {
    height: 40px;
    padding: 0 12px;
    background: #050a0d !important;     /* override legacy input bg */
    color: var(--color-text-default, #e3e8ef) !important;
    border: none !important;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 13px;
    box-shadow: inset 0 0 0 1px #1e3548;
    outline: none;
    transition: box-shadow 150ms ease;
}
.aa-roster-form input:focus,
.aa-roster-form select:focus {
    box-shadow: inset 0 0 0 1px rgba(251, 140, 7, 0.6);
}
.aa-roster-form input::placeholder { color: var(--color-text-subtle, #5a6677); }

.aa-streams__btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 2px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: filter 150ms ease, transform 150ms ease;
}
.aa-streams__btn--primary {
    color: #fff;
    background: var(--gradient-cta, linear-gradient(270deg, #fb8c07 0%, #f16621 100%));
    box-shadow: var(--shadow-cta-glow,
                0 0 0 rgba(243, 129, 60, 0.35) inset,
                0 1px 10px rgba(230, 108, 15, 0.87));
}
.aa-streams__btn--primary:hover { filter: brightness(1.08); }
.aa-streams__btn--ghost {
    background: transparent;
    color: var(--color-text-default, #e3e8ef);
    box-shadow: inset 0 0 0 1px #1e3548;
}
.aa-streams__btn--ghost:hover { box-shadow: inset 0 0 0 1px #2d4a64; }
.aa-streams__btn--danger {
    background: transparent;
    color: #ff7077;
    box-shadow: inset 0 0 0 1px rgba(255, 58, 67, 0.45);
}
.aa-streams__btn--danger:hover { background: rgba(255, 58, 67, 0.1); }

.aa-roster-table-wrap {
    overflow-x: auto;
    margin-top: 4px;
}
.aa-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-default, #e3e8ef);
}
.aa-roster-table thead th {
    text-align: center;
    padding: 10px 12px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted, #9098a6);
    background: #0e222e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
/* Последняя колонка (Действия) — заголовок без текста, и кнопки прижаты вправо */
.aa-roster-table thead th:last-child { text-align: right; }
.aa-roster-table tbody td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    text-align: center;
}
.aa-roster-table tbody tr:last-child td { border-bottom: 0; }
.aa-roster-table a {
    color: var(--color-primary-400, #f3813c) !important;
    text-decoration: none !important;
}
.aa-roster-table a:hover { text-decoration: underline !important; }
.aa-roster-table__empty {
    text-align: center;
    color: var(--color-text-subtle, #5a6677);
    padding: 28px 12px !important;
    font-style: italic;
}
.aa-roster-table__actions {
    text-align: right;
    white-space: nowrap;
}
.aa-roster-table__actions .aa-streams__btn + .aa-streams__btn { margin-left: 6px; }

.aa-roster-tier {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 2px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.aa-roster-tier--normal  { background: rgba(144, 152, 166, 0.15); color: #c2cad8; }
.aa-roster-tier--partner { background: rgba(130, 83, 196, 0.18); color: #c9b3ec; }
.aa-roster-tier--epic    { background: rgba(200, 146, 51, 0.22); color: #ffd47a; }

/* Селект тира — выглядит как бейдж aa-roster-tier, но с курсором-указателем и
   подсветкой при наведении (есть стрелка через native styling). Цвет фона
   подменяется модификатором aa-roster-tier-select--<tier>. */
.aa-roster-tier-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: inline-block;
    padding: 3px 22px 3px 8px;
    border: none;
    border-radius: 2px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    /* Кастомная стрелка через background-image */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%23c2cad8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.aa-roster-tier-select:hover { filter: brightness(1.15); }
.aa-roster-tier-select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-primary-500, #fb8c07);
}
.aa-roster-tier-select:disabled { opacity: 0.6; cursor: progress; }
.aa-roster-tier-select--normal  { background-color: rgba(144, 152, 166, 0.15); color: #c2cad8; }
.aa-roster-tier-select--partner { background-color: rgba(130, 83, 196, 0.18); color: #c9b3ec; }
.aa-roster-tier-select--epic    { background-color: rgba(200, 146, 51, 0.22); color: #ffd47a; }
.aa-roster-tier-select option {
    background: #0e222e;
    color: #e3e8ef;
    font-family: var(--font-sans);
    letter-spacing: normal;
    text-transform: none;
}

.aa-roster-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(144, 152, 166, 0.15);
    color: #c2cad8;
}
.aa-roster-pill--live {
    background: rgba(255, 58, 67, 0.14);
    color: #ff7077;
    box-shadow: inset 0 0 0 1px rgba(255, 58, 67, 0.35);
}

/* ===========================================================
 * Animations
 * =========================================================== */
@keyframes aa-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ===========================================================
 * Responsive
 * =========================================================== */
@media (max-width: 960px) {
    .aa-streams__optin {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .aa-streams__optin-status { justify-self: start; }
    .aa-streams__optin-btn { justify-self: start; width: 100%; }
    .aa-roster-form {
        grid-template-columns: 1fr 1fr;
    }
    .aa-roster-form > button {
        grid-column: 1 / -1;
    }
}
@media (max-width: 560px) {
    .aa-streams__grid { grid-template-columns: 1fr; gap: 14px; }
    .aa-roster-form { grid-template-columns: 1fr; }
}

/* ===========================================================
 * Player stats overlay (на превью live-карточки, нижний-левый угол)
 * Заменил предыдущую tier-ленту на этой позиции; тир теперь inline возле имени.
 * =========================================================== */
.aa-stream-card__playerstats {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(5, 10, 13, 0.78);
    backdrop-filter: blur(6px);
    padding: 5px 9px;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 16px;
    color: #fff;
    font-variant-numeric: tabular-nums;
    z-index: 2;
}
.aa-stream-card__pstat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}
.aa-stream-card__pstat--rating {
    color: var(--color-primary-500, #fb8c07);
}
.aa-stream-card__pstat-icon {
    font-size: 13px;
    line-height: 1;
}
.aa-stream-card__pstat-unit {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    font-size: 11px;
}
/* Разделитель — точка между стат-пилами */
.aa-stream-card__pstat + .aa-stream-card__pstat::before {
    content: "·";
    margin-right: 5px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

/* Inline-тир рядом с именем в body (заменяет ленту на превью) */
.aa-stream-card__name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-bottom: 2px;
}
.aa-stream-card__name-row .aa-stream-card__name {
    margin-bottom: 0;
}
.aa-stream-card__tier-inline {
    flex-shrink: 0;
    padding: 2px 7px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #5a3aa8 0%, #8253c4 100%);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.aa-stream-card--epic .aa-stream-card__tier-inline {
    background: linear-gradient(135deg, #c89233 0%, #e0b56b 100%);
    color: #1a0f00;
}

/* ===========================================================
 * Offline-секция — компактный список стримеров не в эфире.
 * Намеренно вторичная иерархия: маленький заголовок + ряд чипсов.
 * =========================================================== */
.aa-streams__offline {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.aa-streams__offline-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 8px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
.aa-streams__offline-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted, #8d9aa6);
}
.aa-streams__offline-count {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--color-text-muted, #8d9aa6);
    opacity: 0.7;
}
.aa-streams__offline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
}
.aa-streams__offline-item { display: block; }

/* Однострочный чипсок: все элементы выровнены по центру по вертикали,
   имя растягивается и обрезается ellipsis-ом — остальные шириной по контенту. */
.aa-offline-chip {
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: var(--color-bg-surface-2, #0f1d28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    color: var(--color-text, #c9d3dd);
    text-decoration: none !important;
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    opacity: 0.9;
    overflow: hidden;
}
.aa-offline-chip:hover {
    background: var(--color-bg-surface-3, #142532);
    box-shadow: inset 0 0 0 1px rgba(251, 140, 7, 0.4);
    opacity: 1;
}
.aa-offline-chip__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(0.3);
    flex-shrink: 0;
}
.aa-offline-chip:hover .aa-offline-chip__avatar {
    filter: grayscale(0);
}
.aa-offline-chip__avatar--placeholder {
    background: var(--color-bg-surface-3, #142532);
}
.aa-offline-chip__name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aa-offline-chip__tier {
    flex-shrink: 0;
    padding: 2px 6px;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted, #8d9aa6);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    white-space: nowrap;
}
.aa-offline-chip--epic .aa-offline-chip__tier {
    color: #fb8c07;
    background: rgba(251, 140, 7, 0.1);
}
.aa-offline-chip--partner .aa-offline-chip__tier {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}
.aa-offline-chip__rating {
    flex-shrink: 0;
    color: var(--color-primary-500, #fb8c07);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.aa-offline-chip__rank {
    flex-shrink: 0;
    color: var(--color-text-muted, #8d9aa6);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
