/* ============================================
   CSS CUSTOM PROPERTIES (Dark Theme)
   ============================================
   These mirror the redesigned tokens in assets/css/app.css.
   Style.css is unlayered and loads BEFORE the Vite bundle, so its
   :root values take cascade priority over @layer rules — meaning
   anywhere we don't keep these in sync the legacy palette leaks
   into new components (e.g. <a> color was indigo even after we
   updated the bundle to orange).
   When you change a token in app.css, mirror it here. */
:root {
    --bg-body: #0a1823;                           /* dota1x6 base */
    --bg-surface: #0e222e;                        /* surface-1 */
    --bg-surface-elevated: #13283a;               /* surface-2 */
    --bg-surface-hover: #0f212c;                  /* hover row tint */
    --bg-surface-active: #18334a;
    --accent: #fb8c07;                            /* dota1x6 CTA orange */
    --accent-hover: #ffb530;                      /* CTA hover */
    --accent-muted: rgba(251, 140, 7, 0.15);
    --accent-border: rgba(251, 140, 7, 0.40);
    --text-primary: #e3e8ef;
    --text-secondary: #9098a6;                    /* dota1x6 --gray */
    --text-muted: #5a6677;
    --text-heading: #ffffff;
    --border-primary: #1e3548;
    --border-secondary: #15293a;
    --color-positive: #00c950;                    /* dota1x6 --green */
    --color-negative: #ff3a43;                    /* dota1x6 --red */
    --color-neutral: #9098a6;
    --color-warning: #fbbf24;
    --color-info: #38bdf8;
    --card-bg: var(--bg-surface);
    --card-border: var(--border-primary);
    --card-shadow: 0 11px 8px rgba(0, 0, 0, 0.42);
    --table-header-bg: var(--bg-surface-elevated);
    --table-row-odd: rgba(255, 255, 255, 0.02);
    --table-row-hover: rgba(255, 255, 255, 0.04);
    --table-border: var(--border-secondary);
    --input-bg: var(--bg-surface);
    --input-border: var(--border-primary);
    --input-text: var(--text-primary);
    --input-focus-border: var(--accent);
    --scrollbar-track: var(--bg-surface);
    --scrollbar-thumb: #1e3548;
    --scrollbar-thumb-hover: #2d4a64;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   GLOBAL RESETS & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

::selection {
    background: var(--accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

body {
    font-family: var(--font-family);
    /* Transparent — backdrop image lives on html (see assets/css/app.css
       @layer base). Putting any fill here re-paints over the picture. */
    background: transparent;
    padding: 15px;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    margin: 0;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    background: transparent;
    padding-block: 20px;
    padding-inline: clamp(1rem, 3vw, 2rem);
    border-radius: 5px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
    text-align: center;
    color: var(--text-heading);
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.8em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
}

h1 a {
    color: var(--accent);
    text-decoration: none;
    margin-right: 15px;
    font-size: 0.8em;
}

h1 a:hover {
    color: var(--accent-hover);
}

/* Default <a> colour — neutral white, NOT the brand orange.
 * Orange is reserved for CTA buttons and the *hover* state of links;
 * making every link a flat orange (as it briefly was) turned the
 * header, nav, hero names — everything — into a single orange wall. */
a {
    color: var(--text-primary);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

img {
    vertical-align: middle;
    border-style: none;
    border-radius: 5%;
}

small {
    color: var(--text-secondary);
    font-size: 0.875em;
}

/* ============================================
   GLOBAL INPUTS
   ============================================ */
input, select, textarea {
    font-family: var(--font-family);
    color: var(--input-text);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
}

select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--input-focus-border);
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-muted);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    width: 100%;
    margin-top: 15px;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: var(--bg-surface);
    font-size: 13px;
    table-layout: auto;
}

th,
td {
    border: none;
    border-bottom: 1px solid var(--table-border);
    padding: 0.5rem 0.6rem;
    text-align: center;
    vertical-align: middle;
}

th {
    background-color: var(--table-header-bg);
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

tbody tr:nth-child(odd) {
    background-color: var(--table-row-odd);
}

tbody tr:hover {
    background-color: var(--table-row-hover);
}

td a {
    font-weight: 500;
}

/* ============================================
   ICON PLACEHOLDERS
   ============================================ */
.icon-round {
    border-radius: 50% !important;
    object-fit: cover;
    vertical-align: middle;
}

.icon-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #3a3a3a;
    border: 1px solid #555;
    color: #aaa;
    font-weight: bold;
    vertical-align: middle;
    border-radius: 2px;
    box-sizing: border-box;
    line-height: normal;
}

.icon-placeholder[style*="height:32px"] {
    line-height: 30px;
}

.icon-placeholder[style*="height:24px"] {
    line-height: 22px;
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.profile-header {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 15px;
    gap: 20px;
}

.profile-info {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    flex-grow: 1;
    gap: 15px 25px;
}

.profile-header h1 {
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
    min-width: 200px;
    font-size: 1.8em;
    line-height: 1.2;
    flex-shrink: 0;
}

.profile-header h1 small {
    font-size: 0.6em;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
}

.profile-extra-stats {
    font-size: 0.9em;
    line-height: 1.4;
    text-align: left;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 25px;
    flex-shrink: 0;
    padding-top: 4px;
}

.stat-column div {
    margin-bottom: 5px;
    white-space: nowrap;
}

.stat-column div:last-child {
    margin-bottom: 0;
}

.stat-column strong {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.profile-avatar {
    flex-shrink: 0;
    margin-left: auto;
}

.profile-avatar img {
    max-width: 84px;
    height: 84px;
    object-fit: cover;
    border: 1px solid var(--border-primary);
    display: block;
}

.profile-summary {
    background-color: var(--bg-surface);
    padding: 10px 15px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
}

.profile-summary div {
    margin: 5px 15px;
    font-size: 1.1em;
    color: var(--text-primary);
}

.profile-summary strong {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 3px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-cell img {
    margin: 0 auto;
    width: 78px;
    height: 44px;
    object-fit: cover;
}

/* ============================================
   SEMANTIC COLORS
   ============================================ */
.positive {
    color: var(--color-positive);
    font-weight: bold;
}

.negative {
    color: var(--color-negative);
    font-weight: bold;
}

.neutral {
    color: var(--color-neutral);
}

.warning {
    color: var(--color-warning);
    font-weight: bold;
}

/* ============================================
   ABILITIES & ITEMS
   ============================================ */
.abilities-cell {
    min-width: 210px;
}

.abilities-inline {
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
    padding-bottom: 2px;
}

.abilities-inline img,
.ability-icon-shared {
    display: inline-block;
    vertical-align: middle;
    width: 40px;
    height: 40px;
    object-fit: contain;
    background-color: #2b2b2b;
    border: 1px solid #444;
    margin: 1px;
}

.abilities-inline span.icon-placeholder,
span.ability-placeholder-shared {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 1px;
    width: 55px;
    height: 55px;
    line-height: 53px;
    font-size: 1.8em;
    text-align: center;
    background-color: #3a3a3a;
    color: #aaa;
    font-weight: bold;
    border: 1px solid #555;
    box-sizing: border-box;
    border-radius: 3px;
}

.items-cell-flex {
    padding: 4px;
    vertical-align: top;
}

.item-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-bottom: 5px;
    min-height: 32px;
}

.item-row:last-child {
    margin-bottom: 0;
}

.item-subgroup {
    display: inline-flex;
    flex-shrink: 1;
    flex-wrap: nowrap;
    align-items: center;
    vertical-align: top;
    border: 1px solid #444;
    padding: 1px;
    border-radius: 3px;
    min-height: 30px;
    margin-bottom: 2px;
}

.item-subgroup-inventory {
    background-color: #7d7d7d;
    flex-shrink: 0;
}

.item-subgroup-neutral {
    background-color: #ff0084;
    flex-shrink: 0;
}

.item-subgroup-backpack {
    background-color: #8f8f8f;
    flex-shrink: 0;
}

.item-subgroup-eated {
    background-color: #0d00ff;
    flex-wrap: wrap;
    flex-shrink: 1;
    height: 30px;
    overflow: hidden;
    min-width: 37px;
    align-content: flex-start;
}

.item-spacer {
    display: inline-block;
    width: 8px;
    height: 26px;
    vertical-align: top;
    flex-shrink: 0;
    margin-top: 3px;
}

.item-icon {
    display: inline-block;
    vertical-align: middle;
    width: 40px;
    height: 29px;
    margin: 1px;
    background-color: #2b2b2b;
    object-fit: contain;
    font-size: 0.9em;
    box-sizing: border-box;
    overflow: hidden;
}

.item-icon-empty {
    display: inline-block;
    vertical-align: middle;
    margin: 1px;
    background-color: rgba(60, 60, 60, 0.7);
    border: 1px solid #666;
    border-radius: 2px;
    width: 40px;
    height: 29px;
    box-sizing: border-box;
}

.item-icon-empty:before {
    content: "";
}

.item-icon.icon-placeholder {
    line-height: 27px;
    font-size: 1.1em;
    display: inline-flex;
}

/* ============================================
   FACETS
   ============================================ */
.facet-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    vertical-align: middle;
    position: relative;
    background-color: #CCCCCC;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    overflow: hidden;
    -webkit-mask-size: 85% 85%;
    mask-size: 85% 85%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.facet-type-speed { -webkit-mask-image: url('/images/facet_icons/Speed.png'); mask-image: url('/images/facet_icons/Speed.png'); }
.facet-type-xp { -webkit-mask-image: url('/images/facet_icons/xp.png'); mask-image: url('/images/facet_icons/xp.png'); }
.facet-type-unknown { -webkit-mask-image: none; mask-image: none; background-color: #555; }

.facet-color-Green { background-color: #28a745; }
.facet-color-Gray { background-color: #6c757d; }

.facet-icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0.4;
    background-image: none;
    z-index: 1;
    pointer-events: none;
}

.facet-gradient-1::before { background-image: linear-gradient(45deg, rgba(255,255,255,0.4), rgba(255,255,255,0)); }
.facet-gradient-4::before { background-image: linear-gradient(135deg, rgba(0, 255, 157, 0.3), rgba(0, 110, 255, 0.3)); }

/* ============================================
   TABS
   ============================================ */
.tabs-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 -1px 0;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    flex-wrap: wrap;
}

.tabs-nav li {
    margin-right: 2px;
}

.tabs-nav li .tab-link {
    display: block;
    padding: 0.6rem 1rem;
    border: 1px solid transparent;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    white-space: nowrap;
    cursor: pointer;
}

.tabs-nav li:not(.active) .tab-link:hover {
    color: var(--accent-hover);
    background-color: var(--bg-surface-hover);
    border-color: var(--bg-surface-hover) var(--bg-surface-hover) var(--border-primary);
}

.tabs-nav li.active .tab-link {
    color: var(--text-primary);
    background-color: var(--bg-surface);
    border-color: var(--border-primary) var(--border-primary) var(--bg-surface);
    font-weight: 600;
    cursor: default;
}

.tabs-nav li.active .tab-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface);
    border-color: var(--border-primary) var(--border-primary) var(--bg-surface);
}

.tabs-content {
    border: 1px solid var(--border-primary);
    border-top: none;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 0 0 .25rem .25rem;
}

.tabs-content .tab-pane {
    display: none;
}

.tabs-content .tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HISTORY TAB
   ============================================ */
#tab-history table {
    font-size: 14px;
}

#tab-history .wrap-text {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    min-width: 150px;
    text-align: left;
    vertical-align: top;
}

#tab-history .sort-link {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

#tab-history .arrow {
    font-size: 12px;
    color: var(--accent);
}

.banned-icon-wrap {
    display: inline-block;
    margin: 1px;
    line-height: 1;
    vertical-align: middle;
}

#tab-history .banned-ability-wrap img,
#tab-history .banned-ability-wrap span.icon-placeholder {
    width: 38px;
    height: 38px;
    margin: 1px;
    border-radius: 3px;
    background-color: #2b2b2b;
    border: 1px solid #444;
    vertical-align: middle;
    object-fit: contain;
}

.banned-icon-wrap.banned-ability-wrap {
    margin: 1px;
}

#tab-history .banned-ability-wrap span.icon-placeholder {
    line-height: 36px;
}

#tab-history .banned-hero-wrap img {
    width: 67.69px;
    height: 38px;
    background-color: #2b2b2b;
    border: 1px solid #444;
    vertical-align: middle;
    object-fit: cover;
}

#tab-history .banned-hero-wrap span.icon-placeholder {
    width: 67px;
    height: 38px;
    line-height: 36px;
}

/* ============================================
   STAT BLOCKS
   ============================================ */
.stat-block {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.stat-block h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.15em;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 8px;
    color: var(--text-heading);
    flex-shrink: 0;
}

.stat-block table {
    width: 100%;
    font-size: 14px;
    margin-top: 0;
    background: transparent;
    flex-grow: 1;
    border: none;
}

.stat-block th,
.stat-block td {
    padding: 6px 5px;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border-secondary);
    vertical-align: middle;
}

.stat-block th {
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-block tr:last-child td {
    border-bottom: none;
}

.stat-block th:last-child,
.stat-block td:last-child {
    text-align: right;
}

.stat-block td:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-block img {
    height: 32px;
    width: auto;
    max-width: 57px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
    background-color: #2b2b2b;
    border: 1px solid #444;
}

.stat-block span.icon-placeholder {
    width: 32px;
    height: 32px;
    line-height: 30px;
    margin-right: 8px;
    font-size: 1.2em;
}

/* ============================================
   STREAMS
   ============================================ */
.streams-tab-content h2 {
    font-size: 1.6em;
    color: var(--text-heading);
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
    font-weight: 600;
}

.stream-card {
    background-color: #28282e;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: calc(20% - 16px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    color: #e8e8e8;
}

.stream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
}

@media (max-width: 1400px) {
    .stream-card { width: calc(25% - 15px); }
}
@media (max-width: 1100px) {
    .stream-card { width: calc(33.333% - 13.33px); }
}
@media (max-width: 768px) {
    .stream-card { width: calc(50% - 10px); }
}
@media (max-width: 576px) {
    .stream-card { width: 100%; }
}

.stream-thumbnail-link {
    position: relative;
    display: block;
    background-color: #222;
}

.stream-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid var(--accent);
}

.stream-thumbnail-placeholder-div {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #3a3a3c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
    color: #777;
    font-weight: bold;
    border-bottom: 3px solid var(--accent);
}

.stream-thumbnail-placeholder-div span {
    line-height: 1;
}

.static-stream-card .stream-channel-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(99, 102, 241, 0.85);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.static-stream-card .stream-thumbnail-link:hover .stream-channel-badge {
    background-color: rgba(99, 102, 241, 1);
}

.stream-info {
    padding: 12px 15px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.stream-info a {
    color: #dcdcdc;
}

.stream-info a:hover {
    color: #ffffff;
}

.stream-title {
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-title a {
    color: #f5f5f5;
}

.stream-game {
    font-size: 0.85em;
    color: #b0b0b8;
    margin-bottom: 8px;
}

.stream-game:before {
    content: "Игра: ";
    font-weight: 500;
    color: #c8c8ce;
}

.static-stream-card .stream-description {
    font-size: 0.8em;
    color: #a0a0a8;
    line-height: 1.4;
    margin-top: auto;
    flex-grow: 1;
}

.streams-tab-content .error-message,
.streams-tab-content .notice {
    padding: 15px 20px;
    margin: 20px auto;
    border-radius: 5px;
    text-align: left;
    max-width: 800px;
}

.streams-tab-content .error-message {
    color: var(--color-negative);
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.streams-tab-content .notice {
    color: var(--color-info);
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.streams-tab-content .notice strong {
    font-weight: 600;
}

.streams-tab-content .notice code {
    background-color: rgba(255,255,255,0.07);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    display: inline-block;
}

.streams-tab-content .notice pre {
    background-color: rgba(255,255,255,0.07);
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
}

.streams-tab-content .notice ol {
    margin-top: 10px;
    padding-left: 20px;
}

.streams-tab-content .notice ol li {
    margin-bottom: 5px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-nav {
    margin-top: 20px;
    text-align: center;
}
.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
    list-style: none;
}
.pagination > li {
    display: inline;
}
.pagination > li > a,
.pagination > li > span {
    position: relative;
    float: left;
    padding: 8px 14px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: var(--accent);
    text-decoration: none;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease-in-out;
}
.pagination > li:first-child > a,
.pagination > li:first-child > span {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}
.pagination > li:last-child > a,
.pagination > li:last-child > span {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
    z-index: 2;
    color: var(--accent-hover);
    background-color: var(--bg-surface-hover);
    border-color: var(--border-primary);
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: var(--accent);
    border-color: var(--accent);
}
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
    color: var(--text-muted);
    cursor: not-allowed;
    background-color: var(--bg-surface);
    border-color: var(--border-primary);
}

.thumbnail-wrapper > img { border-radius: 0 }

.hero-stats-container > .stat-item > img {
    width: 20px;
    height: 20px;
    border-radius: 20px
}

/* ============================================
   STREAMS PAGE STANDALONE STYLES
   ============================================ */
.streams-container { max-width: 1920px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; }

.streams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(336px, 1fr)); gap: 30px; }

.stream-card-online { background-color: var(--bg-surface); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.2); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; cursor: pointer; display: flex; flex-direction: column; border: 1px solid var(--border-primary); }
.stream-card-online:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.stream-card-online.type-partner { background-color: rgba(169, 112, 255, 0.08); border-color: rgba(169, 112, 255, 0.5); }
.stream-card-online.type-partner:hover { border-color: rgba(169, 112, 255, 0.7); }
.stream-card-online.type-epic { background-color: rgba(255, 173, 51, 0.08); border-color: rgba(255, 173, 51, 0.5); }
.stream-card-online.type-epic:hover { border-color: rgba(255, 173, 51, 0.7); }

.stream-card-online .thumbnail-wrapper { position: relative; width: 100%; padding-top: 56.25%; background-color: var(--bg-surface-elevated); overflow: hidden; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.stream-card-online .stream-thumbnail { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stream-card-online .stream-info { padding: 12px 15px; display: flex; flex-direction: column; flex-grow: 1; }
.stream-card-online .streamer-info { display: flex; align-items: center; margin-bottom: 10px; min-height: 48px; box-sizing: border-box; }
.stream-card-online .streamer-avatar { width: 32px; height: 32px; border-radius: 50%; margin-right: 10px; flex-shrink: 0; }
.stream-card-online .streamer-name { font-size: 1.05em; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-primary); }
.stream-card-online .stream-title { font-size: 0.95em; line-height: 1.4; margin-bottom: 10px; flex-grow: 1; white-space: nowrap; overflow: hidden; cursor: default; position: relative; color: var(--text-secondary); }
.stream-card-online .stream-title > span { display: inline-block; will-change: transform; transform: translateX(0); transition: transform 0.3s ease; }
@keyframes scrollTitle { 0% { transform: translateX(0%); } 15% { transform: translateX(0%); } 85% { transform: translateX(calc(-100% + 300px)); } 100% { transform: translateX(calc(-100% + 300px)); } }
.stream-card-online .stream-title.is-overflowing:hover > span { animation: scrollTitle 10s linear 0.5s 1 forwards; transition: none; }
.stream-card-online .stream-stats { display: flex; justify-content: space-between; align-items: center; font-size: 0.9em; color: var(--text-secondary); margin-top: auto; padding-top: 5px; }
.stream-card-online .stat-item { display: flex; align-items: center; }
.stream-card-online .stat-icon { margin-right: 6px; font-size: 1em; line-height: 1; }
.stream-card-online .stat-icon.red-dot { color: #eb1313; font-size: 0.7em; }
.stream-card-online .stat-icon.clock { color: var(--text-muted); }

.offline-section { filter: grayscale(70%) opacity(70%); transition: filter 0.3s ease; margin-top: 60px; }
.offline-section:hover { filter: grayscale(0%) opacity(100%); }
.offline-section .streams-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.stream-card-offline { display: flex; align-items: flex-start; background-color: var(--bg-surface); border-radius: 6px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: background-color 0.2s ease, border-color 0.2s ease; border: 1px solid var(--border-primary); }
.stream-card-offline:hover { background-color: var(--bg-surface-hover); }
.stream-card-offline.type-partner { background-color: rgba(169, 112, 255, 0.08); border-color: rgba(169, 112, 255, 0.5); }
.stream-card-offline.type-partner:hover { border-color: rgba(169, 112, 255, 0.7); }
.stream-card-offline.type-epic { background-color: rgba(255, 173, 51, 0.08); border-color: rgba(255, 173, 51, 0.5); }
.stream-card-offline.type-epic:hover { border-color: rgba(255, 173, 51, 0.7); }

.stream-card-offline .streamer-avatar { width: 45px; height: 45px; border-radius: 50%; margin-right: 12px; flex-shrink: 0; }
.stream-card-offline .streamer-info { flex-grow: 1; min-width: 0; }
.stream-card-offline .streamer-name { font-weight: 600; font-size: 1.05em; display: block; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.stream-card-offline .current-channel-title { font-size: 0.85em; color: var(--text-secondary); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.stream-card-offline .no-title-info { font-size: 0.8em; color: var(--text-muted); font-style: italic; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; background-color: rgba(0,0,0,0.8); padding: 20px; box-sizing: border-box; }
.modal-content { background-color: #18181b; color: #efeff1; margin: auto; padding: 15px; border: none; width: 100%; height: 100%; max-width: 95vw; max-height: 95vh; border-radius: 8px; position: relative; display: flex; flex-direction: column; box-sizing: border-box; }
.close-button { color: #aaa; position: absolute; top: 10px; right: 15px; font-size: 32px; font-weight: bold; line-height: 1; cursor: pointer; z-index: 10; }
.close-button:hover, .close-button:focus { color: #fff; text-decoration: none; }
.modal-content h3 { margin: 0 0 10px 0; font-size: 1.2em; padding-right: 30px; }
.modal-stream-area { display: flex; flex-grow: 1; min-height: 0; gap: 10px; }
.player-container { flex-grow: 1; min-width: 0; height: 100%; background-color: #0e0e10; }
.chat-container { width: 340px; flex-shrink: 0; height: 100%; background-color: #18181b; }
.player-container iframe, .chat-container iframe { width: 100%; height: 100%; border: none; }
@media (max-width: 992px) { .chat-container { width: 300px; } }
@media (max-width: 768px) { .modal-stream-area { flex-direction: column; } .chat-container { width: 100%; height: 40%; max-height: 300px; flex-shrink: 1;} .modal-content { padding: 10px; } .modal-content h3 { font-size: 1.1em; } .close-button { font-size: 28px; top: 5px; right: 10px;} }

.error-message, .notice, .empty-streams-message { padding: 15px; border-radius: 4px; margin-bottom: 20px; border: 1px solid transparent; }
.error-message { color: var(--color-negative); background-color: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.notice { color: var(--color-info); background-color: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); }
.empty-streams-message { text-align: center; color: var(--text-muted); background-color: var(--bg-surface); border-color: var(--border-primary); }

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); z-index: 9999; display: none; justify-content: center; align-items: center; transition: opacity 0.3s ease; }
.spinner { border: 6px solid var(--bg-surface-elevated); border-top: 6px solid var(--accent); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ============================================
   HEADER & FILTERS
   ============================================ */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.stats-header-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-form .form-group { display: flex; flex-direction: column; }
.filter-form label { font-size: 0.8em; margin-bottom: 4px; display: flex; align-items: center; color: var(--text-secondary); }
.filter-input,.filter-select { padding: 8px; border: 1px solid var(--border-primary); background-color: var(--input-bg); color: var(--input-text); border-radius: 4px; width: 120px; }
.filter-select { width: 180px; }
.filter-submit-btn { background: none; border: none; cursor: pointer; padding: 5px; align-self: flex-end; margin-bottom: 3px; }
.filter-submit-btn svg { width: 24px; height: 24px; fill: #ccc; transition: fill 0.2s ease-in-out; }
.filter-submit-btn:hover svg { fill: #fff; }

.stats-main-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.5rem; }
.stats-main-title h1 { margin-right: 10px;}
.stats-main-title .season-name-display { font-size: 1.2em; color: var(--text-muted); }

.tooltip-trigger {
    position: relative; display: inline-block; margin-left: 5px; cursor: help;
    border: 1px solid var(--border-primary); border-radius: 50%;
    width: 16px; height: 16px; text-align: center; font-size: 11px; line-height: 16px;
    font-weight: bold; vertical-align: middle;
    color: var(--text-secondary); background-color: var(--bg-surface-elevated);
}
.tooltip-trigger .tooltip-text {
    visibility: hidden; opacity: 0;
    width: 240px; background-color: var(--bg-surface-elevated); color: var(--text-primary);
    text-align: left; border-radius: 5px; padding: 10px;
    position: absolute; z-index: 10; bottom: 140%; left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em; line-height: 1.5;
    box-shadow: 0 3px 7px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; pointer-events: none;
    border: 1px solid var(--border-primary);
}
.tooltip-trigger .tooltip-text::after {
    content: ""; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%); border-width: 7px; border-style: solid;
    border-color: var(--bg-surface-elevated) transparent transparent transparent;
}
.tooltip-trigger:hover .tooltip-text { visibility: visible; opacity: 1; transition-delay: 0s; pointer-events: auto; }

/* ============================================
   STATS GRID & BLOCKS
   ============================================ */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:20px; margin-top: 1rem;}
.stat-block{ padding:15px;border-radius:5px;box-shadow: var(--card-shadow);}
.stat-block h2{font-size:1.2em;margin-top:0;margin-bottom:15px; border-bottom:1px solid var(--border-primary);padding-bottom:10px;display:flex;align-items:center;justify-content:space-between;}
.stat-block h2 .title-text { flex-grow: 1; }
.stat-block h2 .tooltip-trigger{margin-left:8px; flex-shrink: 0; }
.stat-block table{width:100%;border-collapse:collapse;font-size:.9em; }
.stat-block th,.stat-block td{padding:8px 6px;text-align:left;border-bottom:1px solid var(--border-secondary);}
.stat-block th{font-weight:700;white-space:nowrap;}
.stat-block td.hero-cell img,
.stat-block td.ability-cell img,
.stat-block td.neutral-item-cell img {
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 3px;
    border: none;
    background: none;
    box-shadow: none;
}
.stat-block td.hero-cell img { width: 48px; height: 27px; object-fit: cover; }
.stat-block td.ability-cell img { width: 27px; height: 27px; object-fit: cover; }
.stat-block td.neutral-item-cell img { width: 32px; height: 24px; object-fit: cover; }

.stat-block td.hero-cell span,
.stat-block td.ability-cell span,
.stat-block td.neutral-item-cell span {
    vertical-align: middle;
}
.stat-block tr:last-child td{border-bottom:none;}
.no-data, p.no-data {text-align:center;padding:20px; color: var(--text-muted);}

/* ============================================
   TIER LIST
   ============================================ */
.tier-list-container { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1rem; }
.tier-column { flex: 1; min-width: 300px; background: var(--bg-surface); padding: 15px; border-radius: 5px; box-shadow: var(--card-shadow); }
.tier-column h2 { text-align: center; border-bottom: 2px solid var(--border-primary); padding-bottom: 0.5rem; margin-top:0; margin-bottom: 1.5rem; font-size: 1.3em; color: var(--text-heading); }
.tier-group { margin-bottom: 2rem; }
.tier-group:last-child { margin-bottom: 0.5rem; }
.tier-group h3 { background-color: #4a5568; color: #fff; padding: 10px 15px; border-radius: 5px; margin-bottom: 1.2rem; font-size: 1.1em; }
.tier-group h3.tier-sss { background-color: #e53e3e; }
.tier-group h3.tier-a { background-color: #dd6b20; }
.tier-group h3.tier-other { background-color: #38a169; }
.tier-subgroup h4 { color: var(--text-secondary); border-left: 3px solid var(--border-primary); padding-left: 12px; margin-top: 1.5rem; margin-bottom: 1rem; font-size: 1em; font-weight: 600; }
.tier-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.tier-item { display: flex; flex-direction: column; align-items: center; text-align:center; background: var(--bg-surface-elevated); padding: 10px; border-radius: 4px; border: 1px solid var(--border-primary); transition: background-color 0.2s, box-shadow 0.2s; }
.tier-item:hover { background-color: var(--bg-surface-hover); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.tier-item img { border-radius: 3px; margin-bottom: 8px; }
.tier-item.hero img { width: 64px; height: 36px; object-fit: cover; }
.tier-item.ability img { width: 42px; height: 42px; object-fit: cover; }
.tier-item span { font-size: 0.85em; color: var(--text-secondary); line-height: 1.3; }
#tab-random_bans > h1 { text-align: center; margin-bottom: 0.5rem;}
#tab-random_bans > p { text-align:center; margin-bottom:1.5rem; color: var(--text-secondary); font-size: 0.95em; }

/* ============================================
   MATCHES PAGE STYLES
   ============================================ */
.hero-cell {
    vertical-align: top;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero-stats-container {
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.stat-icon {
    width: auto;
    height: 20px;
    vertical-align: middle;
    border-radius: 4px;
}

.abilities-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ability-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.wave-number {
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: bold;
}

.ability-icon-shared {
    width: 25px;
    height: 25px;
}

td .stat-item {
    display: inline-flex;
    margin-right: 5px;
}

/* ============================================
   INFO BUTTON & TOOLTIP
   ============================================ */
.info-button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.info-button:hover {
    background: var(--accent-hover);
}

.tooltip {
    display: none;
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
    width: 300px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.tooltip-title {
    font-weight: bold;
    margin-bottom: 5px;
    border-bottom: 1px solid #555;
    padding-bottom: 3px;
}

.tooltip-section {
    margin-bottom: 8px;
}

.tooltip-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 3px;
}

.tooltip-icon {
    height: 32px;
    width: auto;
    border-radius: 4px;
}

.tooltip-text-item {
    background: rgba(50, 50, 50, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    margin: 2px;
    display: inline-block;
}

.tooltip-creep-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
    width: 80px;
}

.tooltip-creep-round {
    font-size: 1em;
    text-align: center;
    margin-top: 3px;
    color: #fff;
    font-weight: bold;
}

.creep-icon-wrapper {
    padding: 3px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.creep-active {
    box-shadow: 0 0 5px 2px rgba(0, 255, 0, 0.7);
}

.creep-deleted {
    box-shadow: 0 0 5px 2px rgba(255, 0, 0, 0.7);
}
