/* Theme 2: the game's interface look, for pages on _Theme2Layout */

:root {
    --t2-bg: #03060e;
    --t2-text: #e6f0ff;
    --t2-heading: #eef6ff;
    --t2-body: #c3d2e8;
    --t2-muted: #9fb6d8;
    --t2-label: #9fd4ff;
    --t2-accent: #5fc8ff;
    --t2-active: #4fb6ff;
    --t2-hot: #86dcff;
    --t2-line: rgba(120, 175, 255, .4);
    --t2-glow: rgba(79, 182, 255, .4);
    --t2-heading-glow: 0 0 24px rgba(90, 180, 255, .65), 0 0 2px rgba(210, 235, 255, .9);
}

html {
    background: var(--t2-bg);
}

html:has(.t2-viewer[open]) {
    overflow: hidden;
}

body.t2 {
    margin: 0;
    font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
    color: var(--t2-text);
    background: var(--t2-bg);
    -webkit-font-smoothing: antialiased;
}

.t2 a {
    color: inherit;
    text-decoration: none;
}

.t2 button {
    margin: 0;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
}

.t2 :focus-visible {
    outline: 2px solid var(--t2-hot);
    outline-offset: 2px;
}

.t2-wrap {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 48px;
    box-sizing: border-box;
}

.t2-icons {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* top bar */

.t2-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 5;
}

.t2-nav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 140px;
    background: linear-gradient(180deg, rgba(3, 6, 14, .8), rgba(3, 6, 14, 0));
    pointer-events: none;
}

.t2-nav .t2-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 88px;
}

.t2-orbs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t2-orb {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 1px solid var(--t2-line);
    background: rgba(8, 20, 40, .7);
    color: var(--t2-heading);
}

.t2-orb:hover {
    border-color: var(--t2-hot);
    box-shadow: 0 0 14px var(--t2-glow);
}

.t2-orb svg {
    width: 24px;
    height: 24px;
}

.t2-orb svg.is-small {
    width: 18px;
    height: 18px;
}

/* pills: the community row's buttons */

.t2-pill,
.t2-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 20px 0 15px;
    box-sizing: border-box;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .16em;
    white-space: nowrap;
}

.t2-pill {
    border: 1px solid var(--t2-line);
    background: rgba(8, 20, 40, .7);
    color: var(--t2-heading);
}

.t2-pill:hover {
    border-color: var(--t2-hot);
    box-shadow: 0 0 14px var(--t2-glow);
}

.t2-ribbon {
    padding: 0 22px 0 16px;
    border: 1px solid rgba(255, 210, 138, .6);
    background: rgba(70, 42, 10, .45);
    color: #ffe3b8;
    box-shadow: 0 0 14px rgba(255, 180, 70, .3);
}

.t2-ribbon:hover {
    border-color: #ffd28a;
    box-shadow: 0 0 18px rgba(255, 180, 70, .5);
}

.t2-ribbon[aria-disabled="true"],
.t2-ribbon[aria-disabled="true"]:hover {
    border-color: rgba(255, 210, 138, .6);
    box-shadow: none;
    filter: grayscale(1);
    opacity: .45;
    cursor: default;
}

.t2-pill svg,
.t2-ribbon svg {
    flex: none;
    width: 24px;
    height: 24px;
}

/* title band: a title between two fading rules */

.t2-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    height: 64px;
}

.t2-band::before,
.t2-band::after {
    content: "";
    width: 110px;
    height: 1px;
}

.t2-band::before {
    background: linear-gradient(90deg, rgba(130, 190, 255, 0), rgba(130, 190, 255, .7));
}

.t2-band::after {
    background: linear-gradient(90deg, rgba(130, 190, 255, .7), rgba(130, 190, 255, 0));
}

.t2-band h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--t2-heading);
    text-shadow: var(--t2-heading-glow);
    white-space: nowrap;
}

/* cards and panels, each with a lit bar on its top edge */

.t2-card,
.t2-panel {
    position: relative;
    box-sizing: border-box;
}

.t2-card {
    padding: 26px 26px 30px;
    border: 1px solid rgba(120, 165, 240, .17);
    border-radius: 6px;
    background: rgba(16, 34, 70, .34);
}

.t2-panel {
    padding: 22px 26px 26px;
    border: 1px solid rgba(120, 180, 255, .32);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(16, 34, 70, .78), rgba(6, 14, 34, .85));
}

.t2-card::before,
.t2-panel::before {
    content: "";
    position: absolute;
    left: 14px;
    top: -1px;
    width: 64px;
    height: 3px;
    border-radius: 2px;
    background: var(--t2-hot);
    box-shadow: 0 0 8px rgba(95, 200, 255, .9);
}

.t2-panel-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--t2-label);
}

.t2-panel p {
    margin: 12px 0 0;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--t2-body);
}

.t2-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #58e6a6;
    box-shadow: 0 0 8px #58e6a6;
}

.t2-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid rgba(120, 175, 255, .25);
    border-radius: 4px;
    overflow: hidden;
    background: #020712;
}

.t2-thumb:hover {
    border-color: var(--t2-hot);
    box-shadow: 0 0 12px rgba(79, 182, 255, .35);
}

.t2-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* icon button (Theme2.IconButton) */

.t2-icon-button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid var(--t2-active);
    border-radius: 4px;
    background: rgba(20, 60, 120, .45);
    color: #dff3ff;
    box-shadow: 0 0 14px rgba(79, 182, 255, .45), inset 0 0 12px rgba(79, 182, 255, .22);
}

.t2-icon-button:hover {
    border-color: var(--t2-hot);
    background: linear-gradient(rgba(95, 200, 255, .2), rgba(95, 200, 255, .2)), rgba(20, 60, 120, .45);
}

.t2-icon-button svg {
    width: 24px;
    height: 24px;
}

/* window: the compact frame (BorderControl IsCompact), chamfered glass with lit corners */

.t2-window {
    position: relative;
    box-sizing: border-box;
    padding: 76px 34px 32px;
}

.t2-window-glass {
    position: absolute;
    inset: 0;
    clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px);
    background: linear-gradient(180deg, rgba(16, 34, 70, .78), rgba(6, 14, 34, .9));
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
}

.t2-window-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(80, 180, 255, .6));
}

/* each line is a ring: the outer outline, then the same outline inset by the line's width */
.t2-window-edge,
.t2-window-inner {
    position: absolute;
    inset: 0;
}

.t2-window-edge {
    background: rgba(120, 180, 255, .55);
    clip-path: polygon(evenodd,
        20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px, 20px 0,
        20.62px 1.5px, calc(100% - 20.62px) 1.5px, calc(100% - 1.5px) 20.62px, calc(100% - 1.5px) calc(100% - 20.62px), calc(100% - 20.62px) calc(100% - 1.5px), 20.62px calc(100% - 1.5px), 1.5px calc(100% - 20.62px), 1.5px 20.62px, 20.62px 1.5px);
}

.t2-window-inner {
    background: rgba(120, 180, 255, .13);
    clip-path: polygon(evenodd,
        25px 8px, calc(100% - 25px) 8px, calc(100% - 8px) 25px, calc(100% - 8px) calc(100% - 25px), calc(100% - 25px) calc(100% - 8px), 25px calc(100% - 8px), 8px calc(100% - 25px), 8px 25px, 25px 8px,
        25.41px 9px, calc(100% - 25.41px) 9px, calc(100% - 9px) 25.41px, calc(100% - 9px) calc(100% - 25.41px), calc(100% - 25.41px) calc(100% - 9px), 25.41px calc(100% - 9px), 9px calc(100% - 25.41px), 9px 25.41px, 25.41px 9px);
}

.t2-window-corner {
    position: absolute;
    width: 72px;
    height: 56px;
    overflow: visible;
    fill: none;
    stroke: var(--t2-hot);
    stroke-width: 3;
}

.t2-window-corner.is-top-left {
    left: 0;
    top: 0;
}

.t2-window-corner.is-top-right {
    right: 0;
    top: 0;
    transform: scaleX(-1);
}

.t2-window-corner.is-bottom-left {
    left: 0;
    bottom: 0;
    transform: scaleY(-1);
}

.t2-window-corner.is-bottom-right {
    right: 0;
    bottom: 0;
    transform: scale(-1, -1);
}

.t2-window-tab {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 128px;
    height: 12px;
    margin-left: -64px;
    overflow: visible;
}

.t2-window-tab path {
    fill: rgba(6, 16, 38, .92);
    stroke: rgba(120, 180, 255, .55);
    stroke-width: 1.5;
}

.t2-window-tab rect {
    fill: #6fd0ff;
}

.t2-window-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    pointer-events: none;
}

.t2-window-close {
    position: absolute;
    top: 20px;
    right: 28px;
    width: 36px;
    height: 36px;
}

.t2-window-close svg {
    width: 20px;
    height: 20px;
}

/* screenshot viewer: a window centered in the browser, the page left as it is behind it */

.t2-viewer {
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    overflow: visible;
    background: none;
    color: var(--t2-text);
}

.t2-viewer::backdrop {
    background: transparent;
}

/* as wide as the browser allows, the screenshot's 16:9 and the window's 152 px of chrome above and below it fitting its height */
.t2-viewer .t2-window {
    width: min(1200px, calc(100vw - 32px), calc((100vh - 184px) * 16 / 9 + 68px));
    width: min(1200px, calc(100vw - 32px), calc((100dvh - 184px) * 16 / 9 + 68px));
}

/* horizontal swipes step through the shots */
.t2-viewer-stage {
    position: relative;
    touch-action: pan-y pinch-zoom;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    background: #020712;
    box-shadow: 0 0 0 1px rgba(120, 175, 255, .22);
}

.t2-viewer-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t2-viewer-back,
.t2-viewer-forward {
    position: absolute;
    top: 50%;
    margin-top: -26px;
}

.t2-viewer-back {
    left: 16px;
}

.t2-viewer-forward {
    right: 16px;
}

.t2-viewer-meta {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    height: 28px;
    margin-top: 16px;
}

.t2-viewer-caption {
    overflow: hidden;
    font-size: 19px;
    font-weight: 600;
    color: #dbe8ff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.t2-viewer-count {
    grid-column: 3;
    justify-self: end;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--t2-muted);
    white-space: nowrap;
}

.t2-pips {
    display: flex;
    align-items: center;
    gap: 2px;
}

.t2-pip {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
}

.t2-pip i {
    display: block;
    width: 14px;
    height: 4px;
    transform: skewX(-35deg);
    background: rgba(95, 200, 255, .28);
}

.t2-pip:hover i {
    background: rgba(95, 200, 255, .6);
}

.t2-pip.is-current i {
    background: var(--t2-accent);
    box-shadow: 0 0 8px rgba(95, 200, 255, .85);
}

/* footer */

.t2-foot {
    position: relative;
    padding: 34px 0 44px;
}

.t2-foot::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(120, 175, 255, 0), rgba(120, 175, 255, .35), rgba(120, 175, 255, 0));
}

.t2-foot .t2-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.t2-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2em;
    color: var(--t2-muted);
}

.t2-links li {
    display: flex;
    align-items: center;
}

.t2-links li + li::before {
    content: "";
    width: 4px;
    height: 4px;
    margin: 0 22px;
    border-radius: 50%;
    background: rgba(120, 175, 255, .4);
}

.t2-links a:hover {
    color: #e6f6ff;
}

.t2-copy {
    margin: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    color: #7088ab;
}

@media (max-width: 760px) {
    .t2-wrap {
        padding: 0 16px;
    }

    .t2-band::before,
    .t2-band::after {
        width: 40px;
    }

    .t2-viewer .t2-window {
        width: calc(100vw - 32px);
        padding: 64px 12px 16px;
    }

    .t2-window-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }

    .t2-links {
        flex-direction: column;
        gap: 16px;
    }

    .t2-links li + li::before {
        display: none;
    }

    .t2-viewer-back,
    .t2-viewer-forward {
        width: 44px;
        height: 44px;
        margin-top: -22px;
    }

    .t2-viewer-back {
        left: 8px;
    }

    .t2-viewer-forward {
        right: 8px;
    }

    .t2-pips {
        display: none;
    }

    .t2-viewer-meta {
        grid-template-columns: 1fr auto;
    }

    .t2-viewer-count {
        grid-column: 2;
    }
}
