@font-face {
    font-family: "Ninja Naruto Local";
    src: url("assets/njnaruto.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0a0b0f;
    --surface: #11131a;
    --surface-2: #171a23;
    --line: #262a37;
    --line-strong: #34394a;
    --text: #f4f6fb;
    --muted: #9aa3b4;
    --muted-2: #6f7889;
    --red: #e11d2e;
    --red-soft: rgba(225, 29, 46, 0.16);
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.14);
    --blue: #5383e8;
    --blue-soft: rgba(83, 131, 232, 0.14);
    --nick-font: "Ninja Naruto Local", "Ninja Naruto", "Naruto", Impact, Haettenschweiler, "Arial Black", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        url("assets/akatsuki.png"),
        linear-gradient(180deg, rgba(225, 29, 46, 0.08), transparent 260px),
        repeating-linear-gradient(135deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 14px),
        var(--bg);
    background-size: 420px auto, auto, auto, auto;
    background-position: right 42px top 96px, 0 0, 0 0, 0 0;
    background-repeat: no-repeat, no-repeat, repeat, repeat;
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

header {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 11, 15, 0.86);
    backdrop-filter: blur(12px);
    padding: 22px 18px 18px;
    text-align: center;
}

header::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}

header::after {
    content: "";
    position: absolute;
    top: 50%;
    left: max(18px, calc(50% - 560px));
    width: 112px;
    height: 112px;
    background: url("assets/akatsuki.png") center / contain no-repeat;
    opacity: 0.1;
    transform: translateY(-50%);
    pointer-events: none;
}

.logo-img {
    display: block;
    width: min(280px, 82vw);
    height: auto;
    margin: 0 auto 10px;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,0.35));
}

.subtitle {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--line);
    background: rgba(10, 11, 15, 0.84);
    color: var(--muted);
    padding: 18px 16px 22px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.site-footer-credit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.site-footer p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.45;
    letter-spacing: 0.04em;
}

.site-footer-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.36));
}

.site-footer a {
    color: #ffffff;
    font-family: var(--nick-font);
    font-size: 1.24rem;
    letter-spacing: 0;
    text-shadow:
        0 2px 8px rgba(0,0,0,0.85),
        0 0 12px rgba(225, 29, 46, 0.58);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--red);
}

@media (min-width: 1080px) {
    .container {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }

    body.hub-active .container {
        grid-template-columns: minmax(0, 1fr);
        width: min(1780px, 100%);
    }
}

.streams-section h2,
.sidebar-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hub-player {
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid rgba(225, 29, 46, 0.32);
    border-radius: 8px;
    background:
        url("assets/akatsuki.png"),
        linear-gradient(180deg, rgba(225, 29, 46, 0.08), transparent 180px),
        var(--surface);
    background-size: 190px auto, auto, auto;
    background-position: right -48px top -48px, 0 0, 0 0;
    background-repeat: no-repeat;
}

body.hub-active .hub-player {
    min-height: calc(100vh - 190px);
}

.hub-player.is-empty .hub-grid {
    display: none;
}

.hub-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.hub-player-header h2 {
    margin-bottom: 6px;
}

.hub-player-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.hub-player-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hub-layout-toggle {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
}

.hub-layout-button,
.hub-fullscreen,
.hub-close {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 9px 12px;
    text-transform: uppercase;
}

.hub-layout-button {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.hub-layout-button + .hub-layout-button {
    border-left: 1px solid rgba(255,255,255,0.1);
}

.hub-layout-button.is-active {
    background: var(--red-soft);
    color: #ffffff;
}

.hub-layout-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.hub-fullscreen:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.hub-layout-button:hover,
.hub-fullscreen:hover,
.hub-close:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.24);
}

.hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
}

.hub-grid[data-layout="grid"][data-count="2"],
.hub-grid[data-layout="grid"][data-count="3"],
.hub-grid[data-layout="grid"][data-count="4"],
.hub-grid[data-layout="grid"][data-count="5"],
.hub-grid[data-layout="grid"][data-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.hub-active .hub-grid {
    min-height: calc(100vh - 300px);
}

body.hub-active .hub-grid[data-layout="grid"] {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}

body.hub-active .hub-grid[data-count="1"] .hub-frame-wrap,
body.hub-active .hub-grid[data-layout="grid"] .hub-frame-wrap {
    aspect-ratio: auto;
    min-height: min(74vh, 820px);
}

body.hub-active .hub-grid[data-layout="grid"][data-count="2"] .hub-frame-wrap,
body.hub-active .hub-grid[data-layout="grid"][data-count="3"] .hub-frame-wrap,
body.hub-active .hub-grid[data-layout="grid"][data-count="4"] .hub-frame-wrap,
body.hub-active .hub-grid[data-layout="grid"][data-count="5"] .hub-frame-wrap,
body.hub-active .hub-grid[data-layout="grid"][data-count="6"] .hub-frame-wrap {
    min-height: min(38vh, 420px);
}

body.hub-active .hub-grid[data-layout="focus"] {
    grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 520px);
    grid-template-rows: auto auto;
    grid-template-areas:
        "primary side"
        "bottom bottom";
    align-items: stretch;
}

body.hub-active .hub-grid[data-layout="focus"] .hub-stream.is-primary {
    grid-area: primary;
    align-self: start;
}

body.hub-active .hub-grid[data-layout="focus"] .hub-stream.is-primary .hub-frame-wrap {
    aspect-ratio: auto;
    height: min(54vh, 590px);
    min-height: 360px;
}

.hub-secondary-grid {
    display: grid;
    align-content: start;
    gap: 12px;
    max-height: calc(100vh - 320px);
    overflow: auto;
    padding-right: 2px;
}

.hub-secondary-side {
    grid-area: side;
    align-content: start;
    max-height: min(54vh, 590px);
    overflow: hidden;
}

.hub-secondary-bottom {
    grid-area: bottom;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

body.hub-active .hub-grid[data-layout="focus"] .hub-secondary-bottom {
    max-height: min(34vh, 330px);
    overflow: hidden;
}

body.hub-active .hub-grid[data-layout="focus"] .hub-secondary-bottom .hub-frame-wrap {
    aspect-ratio: auto;
    height: min(28vh, 270px);
    min-height: 210px;
}

.hub-secondary-grid .hub-stream {
    min-height: 0;
}

.hub-secondary-grid .hub-frame-wrap {
    aspect-ratio: 16 / 9;
    min-height: 0;
}

@media (max-width: 1180px) {
    body.hub-active .hub-grid[data-layout="focus"] {
        grid-template-columns: 1fr;
        grid-template-areas:
            "primary"
            "side";
    }

    body.hub-active .hub-grid[data-layout="focus"] .hub-stream.is-primary {
        min-height: min(66vh, 680px);
    }

    .hub-secondary-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        grid-auto-rows: auto;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .hub-secondary-grid .hub-stream {
        min-height: auto;
    }
}

@media (min-width: 1181px) {
    .hub-secondary-grid .hub-stream {
        height: auto;
    }
}

.hub-player:fullscreen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #050609;
}

.hub-player:fullscreen .hub-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] {
    grid-template-columns: minmax(0, 1fr) clamp(420px, 30vw, 620px);
    grid-template-rows: minmax(0, 58vh) minmax(180px, 1fr);
    max-height: calc(100vh - 90px);
    overflow: hidden;
}

.hub-player:fullscreen .hub-grid[data-layout="grid"] .hub-frame-wrap {
    min-height: min(42vh, 520px);
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] {
    grid-template-areas:
        "primary side"
        "bottom bottom";
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] .hub-stream.is-primary .hub-frame-wrap {
    height: calc(58vh - 62px);
    min-height: 0;
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] .hub-secondary-side {
    display: grid;
    align-content: start;
    gap: 12px;
    grid-auto-rows: auto;
    max-height: 58vh;
    overflow: hidden;
    padding-right: 0;
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] .hub-secondary-side .hub-stream {
    min-height: 0;
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] .hub-secondary-side .hub-frame-wrap {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] .hub-secondary-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    max-height: calc(42vh - 120px);
    overflow: hidden;
}

.hub-player:fullscreen .hub-grid[data-layout="focus"] .hub-secondary-bottom .hub-frame-wrap {
    aspect-ratio: auto;
    height: calc(42vh - 180px);
    min-height: 190px;
}

.hub-player:fullscreen .hub-secondary-grid {
    max-height: none;
}

.hub-stream {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #050609;
}

.hub-stream-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.hub-stream-header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-stream-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.hub-order,
.hub-mute,
.hub-promote,
.hub-remove {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 7px 9px;
    text-transform: uppercase;
}

.hub-order {
    min-width: 30px;
    padding: 7px 8px;
    font-size: 1rem;
    line-height: 1;
}

.hub-order:disabled {
    cursor: not-allowed;
    opacity: 0.36;
}

.hub-order:hover,
.hub-mute:hover,
.hub-promote:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.28);
}

.hub-mute.is-muted {
    border-color: rgba(34, 197, 94, 0.34);
    background: var(--green-soft);
    color: #9df3ba;
}

.hub-promote:disabled {
    cursor: default;
    border-color: rgba(225, 29, 46, 0.4);
    background: var(--red-soft);
    color: #ffb5ba;
}

.hub-remove:hover {
    color: #ff8a92;
    border-color: rgba(225, 29, 46, 0.45);
}

.hub-frame-wrap {
    flex: 1 1 auto;
    aspect-ratio: 16 / 9;
    background: #050609;
}

.hub-frame-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.section-spaced {
    margin-top: 28px !important;
}

.live-ticker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    margin: 0 0 16px;
    border: 1px solid rgba(225, 29, 46, 0.34);
    border-radius: 8px;
    background: rgba(225, 29, 46, 0.08);
}

.live-ticker-viewport {
    min-width: 0;
    overflow: hidden;
}

.live-ticker-track {
    display: block;
    width: max-content;
    white-space: nowrap;
    padding: 10px 14px;
    color: #ff9ea5;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: translateX(0);
}

.live-ticker-track.is-running {
    display: inline-block;
    padding-right: 28px;
    animation: liveTickerRun 24s linear 1;
}

.live-ticker-hub,
.live-filter {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 8px 10px;
    text-transform: uppercase;
}

.live-ticker-hub {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-right: 10px;
    background: rgba(14, 16, 23, 0.95);
}

.live-ticker-hub:hover,
.live-filter:hover,
.live-filter.is-active {
    color: #ffffff;
    border-color: rgba(225, 29, 46, 0.5);
    background: rgba(225, 29, 46, 0.14);
}

.live-controls {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

.live-control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.live-history {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

@keyframes liveTickerRun {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

.streams-section h2::before,
.sidebar-section h2::before {
    content: "";
    width: 8px;
    height: 18px;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 18px rgba(225, 29, 46, 0.5);
}

.streams-section h2::after,
.sidebar-section h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(225, 29, 46, 0.38), transparent);
}

.grid-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.player-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        url("assets/akatsuki.png"),
        linear-gradient(180deg, rgba(255,255,255,0.035), transparent 120px),
        var(--surface);
    background-size: 140px auto, auto, auto;
    background-position: right -36px bottom -34px, 0 0, 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.player-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--red), transparent 70%);
}

.player-card::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 16px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--muted-2);
}

.player-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 36px rgba(0,0,0,0.28);
}

.player-card.loading {
    opacity: 0.72;
}

.player-card.is-live {
    border-color: rgba(225, 29, 46, 0.74);
    box-shadow: 0 0 0 1px rgba(225, 29, 46, 0.16), 0 18px 36px rgba(0,0,0,0.3);
}

.player-card.is-live::before {
    background: linear-gradient(90deg, var(--red), #ff6b6b);
}

.player-card.is-live::after {
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(225, 29, 46, 0.14), 0 0 18px rgba(225, 29, 46, 0.7);
}

.player-info {
    display: grid;
    grid-template-rows: auto auto auto auto 1fr auto auto;
    gap: 12px;
    height: 100%;
    padding: 22px;
    text-align: center;
}

.player-avatar {
    display: block;
    width: 92px;
    height: 92px;
    margin: 2px auto 0;
    border: 3px solid rgba(225, 29, 46, 0.5);
    border-radius: 50%;
    background: var(--surface-2);
    object-fit: cover;
    object-position: center;
    box-shadow: 0 0 0 5px rgba(225, 29, 46, 0.08), 0 16px 30px rgba(0,0,0,0.32);
}

.player-name {
    overflow-wrap: anywhere;
    margin: 0;
    color: #ff1f32;
    font-family: var(--nick-font);
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow:
        2px 2px 0 #08090d,
        -1px -1px 0 #08090d,
        0 0 14px rgba(225, 29, 46, 0.45);
}

.player-name::first-letter {
    color: #ff5a66;
}

.stream-status {
    justify-self: center;
    min-width: 96px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-online {
    border-color: rgba(34, 197, 94, 0.45);
    background: var(--green-soft);
    color: #74f0a0;
}

.status-offline {
    border-color: rgba(154, 163, 180, 0.18);
    background: rgba(154, 163, 180, 0.08);
    color: var(--muted);
}

.status-staff {
    border-color: rgba(225, 29, 46, 0.36);
    background: rgba(225, 29, 46, 0.1);
    color: #ff8a92;
}

.staff-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.staff-card {
    background:
        url("assets/akatsuki.png"),
        linear-gradient(180deg, rgba(225, 29, 46, 0.055), transparent 130px),
        var(--surface);
    background-size: 150px auto, auto, auto;
    background-position: right -34px bottom -34px, 0 0, 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat;
}

.staff-card::before {
    background: linear-gradient(90deg, #ff5a66, transparent 70%);
}

.platform-row {
    display: flex;
    justify-content: center;
}

.platform-icon {
    width: 38px;
    height: 38px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    object-fit: cover;
    object-position: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.player-stats {
    display: grid;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stat-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.stat-line strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--text);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
    text-align: right;
}

.game-status,
.win-rate {
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 900;
    white-space: nowrap;
}

.game-status.is-ingame {
    background: rgba(116,217,154,0.12);
    color: #74d99a;
}

.game-status.is-outgame,
.win-rate.is-neutral {
    background: rgba(255,255,255,0.04);
    color: var(--muted);
}

.win-rate.is-bad {
    background: rgba(232,121,134,0.13);
    color: #e87986;
}

.win-rate.is-mid {
    background: rgba(245,183,65,0.14);
    color: #f5b741;
}

.win-rate.is-good {
    background: rgba(116,217,154,0.12);
    color: #74d99a;
}

.lane-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    object-position: center;
    opacity: 0.95;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(4, 34px);
    justify-content: center;
    gap: 8px;
    min-height: 32px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.social-link img {
    width: 17px;
    height: 17px;
    object-fit: contain;
    object-position: center;
}

.social-link-placeholder {
    width: 34px;
    height: 32px;
}

.social-links.is-empty .social-link-placeholder {
    visibility: hidden;
}

.social-link:hover {
    transform: translateY(-1px);
    border-color: currentColor;
    background: rgba(255,255,255,0.09);
}

.social-link-x:hover {
    color: #ffffff;
}

.social-link-ig:hover {
    color: #ff7aa8;
}

.social-link-yt:hover {
    color: #ff5a66;
}

.social-link-tt:hover {
    color: #74f0d2;
}

.player-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 52px;
    gap: 10px;
}

.btn-watch,
.btn-opgg,
.btn-hub {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    white-space: nowrap;
}

.btn-watch {
    border-color: rgba(225, 29, 46, 0.55);
    background: var(--red-soft);
}

.btn-opgg {
    border-color: rgba(83, 131, 232, 0.55);
    background: var(--blue-soft);
}

.player-actions .btn-opgg:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.btn-hub {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    font-family: inherit;
}

.btn-watch:hover,
.btn-opgg:hover,
.btn-hub:hover {
    transform: translateY(-1px);
    border-color: currentColor;
}

.btn-watch:hover {
    color: #ff8a92;
}

.btn-opgg:hover {
    color: #9bb9ff;
}

.btn-hub:hover {
    color: #ffffff;
}

.btn-hub.is-in-hub {
    display: none;
}

.sidebar {
    display: grid;
    gap: 18px;
}

.sidebar-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
}

.sidebar-section::before {
    content: "";
    display: block;
    width: 54px;
    height: 54px;
    margin: -2px 0 10px;
    background: url("assets/akatsuki.png") center / contain no-repeat;
    opacity: 0.35;
}

.ranking-updated {
    margin: -8px 0 14px;
    color: var(--muted-2);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
}

.top-played-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-played-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.top-played-item.rank-1 {
    border-color: rgba(245, 183, 65, 0.34);
}

.top-played-item.rank-2 {
    border-color: rgba(192, 203, 213, 0.3);
}

.top-played-item.rank-3 {
    border-color: rgba(190, 124, 72, 0.32);
}

.player-rank {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rank-number {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--red-soft);
    color: #ff8a92;
    font-size: 0.8rem;
    font-weight: 900;
}

.rank-1 .rank-number,
.rank-2 .rank-number,
.rank-3 .rank-number {
    color: transparent;
    position: relative;
}

.rank-1 .rank-number {
    background: rgba(245, 183, 65, 0.16);
}

.rank-2 .rank-number {
    background: rgba(192, 203, 213, 0.14);
}

.rank-3 .rank-number {
    background: rgba(190, 124, 72, 0.15);
}

.rank-1 .rank-number::before,
.rank-2 .rank-number::before,
.rank-3 .rank-number::before {
    content: "";
    position: absolute;
    inset: 7px 8px 9px;
    border-radius: 2px 2px 6px 6px;
}

.rank-1 .rank-number::before {
    background: #f5b741;
}

.rank-2 .rank-number::before {
    background: #c0cbd5;
}

.rank-3 .rank-number::before {
    background: #be7c48;
}

.rank-1 .rank-number::after,
.rank-2 .rank-number::after,
.rank-3 .rank-number::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 6px;
    height: 3px;
    border-radius: 999px;
}

.rank-1 .rank-number::after {
    background: #f5b741;
}

.rank-2 .rank-number::after {
    background: #c0cbd5;
}

.rank-3 .rank-number::after {
    background: #be7c48;
}

.player-rank strong,
.player-rank small {
    display: block;
    min-width: 0;
}

.player-rank strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.player-rank small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.record-line {
    display: flex !important;
    gap: 8px;
}

.record-win {
    color: #74d99a;
}

.record-loss {
    color: #e87986;
}

.match-count {
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    padding: 5px 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.badge,
.rank-item,
.match-history-list,
.match-item,
.match-header,
.match-body,
.match-footer {
    display: none;
}

@media (max-width: 560px) {
    .container {
        padding: 18px 14px;
    }

    .grid-players {
        grid-template-columns: 1fr;
    }

    .player-actions {
        grid-template-columns: 1fr;
    }

    .top-played-item {
        grid-template-columns: 1fr;
    }

    .match-count {
        justify-self: start;
    }

    .hub-player-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-ticker {
        grid-template-columns: 1fr;
    }

    .live-ticker-hub {
        justify-self: start;
        margin: 0 0 8px 10px;
    }

    .live-ticker-track.is-running {
        animation-duration: 32s;
    }

    .hub-player-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .hub-grid,
    .hub-grid[data-layout="grid"][data-count="2"],
    .hub-grid[data-layout="grid"][data-count="3"],
    .hub-grid[data-layout="grid"][data-count="4"],
    .hub-grid[data-layout="grid"][data-count="5"],
    .hub-grid[data-layout="grid"][data-count="6"],
    body.hub-active .hub-grid[data-layout="focus"] {
        grid-template-columns: 1fr;
    }

    body.hub-active .hub-grid,
    body.hub-active .hub-grid[data-layout="focus"] .hub-stream.is-primary,
    body.hub-active .hub-grid[data-layout="focus"] .hub-stream.is-primary .hub-frame-wrap,
    body.hub-active .hub-grid[data-layout="focus"] .hub-stream:not(.is-primary) .hub-frame-wrap,
    body.hub-active .hub-grid[data-layout="grid"] .hub-frame-wrap {
        aspect-ratio: 16 / 9;
        min-height: auto;
        height: auto;
    }

    body.hub-active .hub-grid[data-layout="focus"] .hub-stream.is-primary {
        grid-column: auto;
        grid-row: auto;
    }
}
