/* Live stream page (Views/Live/Index.cshtml) – TV-style lower-third score ticker.
   Everything is scoped under .lt-page so other pages are unaffected. */

@font-face {
    font-family: 'LT Barlow Condensed';
    src: url('/fonts/BarlowCondensed-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LT Barlow Condensed';
    src: url('/fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.lt-page {
    --lt-accent: #18c3ff;
    --lt-accent-2: #0a6cff;
    --lt-live: #e3192b;
    --lt-bar-h: 64px;
    --lt-font: 'LT Barlow Condensed', 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #050505;
    color: #fff;
}

.lt-page .lt-video {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
}

.lt-page .lt-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Ticker bar ---------- */
.lt-page .lt-ticker {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    height: var(--lt-bar-h);
    font-family: var(--lt-font);
    text-transform: uppercase;
    background: linear-gradient(180deg, #16243b 0%, #0b1424 55%, #060b14 100%);
    border-top: 3px solid var(--lt-accent);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
    overflow: hidden;
    user-select: none;
}

    /* Glossy highlight across the bar */
    .lt-page .lt-ticker::after {
        content: "";
        position: absolute;
        inset: 0 0 50% 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0));
        pointer-events: none;
    }

/* Left "LIVE + tournament" block */
.lt-page .lt-brand {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 34%;
    padding: 0 28px 0 14px;
    background: linear-gradient(100deg, var(--lt-accent-2) 0%, #0848b8 100%);
    clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
    box-shadow: 6px 0 18px rgba(0, 0, 0, .5);
}

.lt-page .lt-live {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 3px;
    background: var(--lt-live);
    border-radius: 3px;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    letter-spacing: .08em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.lt-page .lt-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: lt-pulse 1.4s ease-in-out infinite;
}

.lt-page .lt-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    letter-spacing: .03em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .35);
}

/* Scrolling area */
.lt-page .lt-viewport {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    container-type: inline-size;
    margin-left: -18px; /* tuck under the slanted brand block */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.lt-page .lt-track {
    display: flex;
    width: max-content;
    height: 100%;
    animation: lt-marquee var(--lt-duration, 40s) linear infinite;
    will-change: transform;
}

.lt-page .lt-viewport:hover .lt-track {
    animation-play-state: paused;
}

.lt-page .lt-group {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    min-width: 100cqw;
    height: 100%;
    margin: 0;
    padding: 0 0 0 32px;
    list-style: none;
}

.lt-page .lt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding-right: 32px;
    white-space: nowrap;
}

    /* Chevron separator between entries */
    .lt-page .lt-item::after {
        content: "";
        width: 8px;
        height: 8px;
        margin-left: 22px;
        border-top: 3px solid var(--lt-accent);
        border-right: 3px solid var(--lt-accent);
        transform: rotate(45deg);
        opacity: .7;
    }

.lt-page .lt-pos {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: #fff;
    background: linear-gradient(180deg, #3a4b66 0%, #222e42 100%);
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 2px 6px rgba(0, 0, 0, .45);
    transform: skewX(-8deg);
}

    .lt-page .lt-pos > span {
        transform: skewX(8deg);
    }

.lt-page .lt-pos-1 {
    color: #3b2a00;
    background: linear-gradient(180deg, #fff1a8 0%, #f6c443 45%, #c8901a 100%);
    border-color: #ffe48a;
}

.lt-page .lt-pos-2 {
    color: #24292f;
    background: linear-gradient(180deg, #ffffff 0%, #cfd6df 45%, #8f9aa8 100%);
    border-color: #e9eef4;
}

.lt-page .lt-pos-3 {
    color: #3a1a05;
    background: linear-gradient(180deg, #ffd0a6 0%, #d98a4a 45%, #9c5524 100%);
    border-color: #f2b07a;
}

.lt-page .lt-name {
    font-weight: 600;
    font-size: 26px;
    line-height: 1;
    letter-spacing: .02em;
    color: #fff;
}

.lt-page .lt-score {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 4px 10px 3px;
    border-radius: 4px;
    background: rgba(24, 195, 255, .14);
    border: 1px solid rgba(24, 195, 255, .35);
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
    color: var(--lt-accent);
    font-variant-numeric: tabular-nums;
}

.lt-page .lt-unit {
    font-size: 16px;
    font-weight: 600;
    color: #9fdcff;
    text-transform: lowercase;
}

.lt-page .lt-score-empty {
    color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .12);
}

/* Empty result list */
.lt-page .lt-empty {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 40px;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes lt-marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@keyframes lt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
    .lt-page .lt-track { animation: none; }
    .lt-page .lt-viewport { overflow-x: auto; }
    .lt-page .lt-group[aria-hidden="true"] { display: none; }
    .lt-page .lt-live-dot { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .lt-page { --lt-bar-h: 52px; }
    .lt-page .lt-brand { max-width: 40%; gap: 8px; padding: 0 22px 0 10px; }
    .lt-page .lt-live { font-size: 15px; padding: 3px 7px 2px; }
    .lt-page .lt-title { font-size: 19px; }
    .lt-page .lt-group { padding-left: 24px; }
    .lt-page .lt-item { gap: 8px; padding-right: 22px; }
    .lt-page .lt-item::after { margin-left: 14px; }
    .lt-page .lt-pos { min-width: 32px; height: 32px; font-size: 20px; }
    .lt-page .lt-name { font-size: 21px; }
    .lt-page .lt-score { font-size: 22px; padding: 3px 7px 2px; }
    .lt-page .lt-unit { font-size: 13px; }
    .lt-page .lt-empty { font-size: 19px; padding-left: 28px; }
}

@media (max-width: 480px) {
    .lt-page { --lt-bar-h: 46px; }
    .lt-page .lt-brand { max-width: none; padding-right: 20px; }
    .lt-page .lt-title { display: none; }
    .lt-page .lt-pos { min-width: 28px; height: 28px; font-size: 18px; border-radius: 5px; }
    .lt-page .lt-name { font-size: 19px; }
    .lt-page .lt-score { font-size: 19px; }
    .lt-page .lt-empty { font-size: 17px; }
}


/* =====================================================================
   Tournament live view (Views/Tournament/LiveView.cshtml)
   Stage (video or poster) + optional right scoreboard panel + ticker.
   ===================================================================== */
.lt-liveview {
    --lt-panel-w: max(320px, 30%);
}

.lt-liveview .lt-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

.lt-liveview .lt-stage {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    background: #000;
}

    .lt-liveview .lt-stage .lt-video {
        position: absolute;
        inset: 0;
    }

/* Poster fills the stage: blurred cover behind, full poster in front */
.lt-liveview .lt-poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #13284a 0%, #050a14 75%);
}

.lt-liveview .lt-poster-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(.55) saturate(1.2);
    transform: scale(1.08);
}

.lt-liveview .lt-poster-img {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    animation: lt-kenburns 40s ease-in-out infinite alternate;
}

.lt-liveview .lt-poster-fallback {
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    text-align: center;
    font-family: var(--lt-font);
    text-transform: uppercase;
}

.lt-liveview .lt-poster-logo {
    width: min(180px, 30vw);
    height: auto;
    opacity: .9;
}

.lt-liveview .lt-poster-name {
    font-weight: 700;
    font-size: clamp(32px, 6vw, 72px);
    line-height: 1;
    letter-spacing: .03em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .6);
}

.lt-liveview .lt-poster-info {
    max-width: 800px;
    font-weight: 600;
    font-size: clamp(18px, 2.4vw, 28px);
    color: rgba(255, 255, 255, .75);
    text-transform: none;
}

/* Back link + camera switcher float over the stage */
.lt-liveview .lt-back,
.lt-liveview .lt-cam {
    font-family: var(--lt-font);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
    background: rgba(6, 11, 20, .65);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .2s, border-color .2s, opacity .2s;
}

.lt-liveview .lt-back {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 5px 10px;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    opacity: .75;
}

    .lt-liveview .lt-back:hover,
    .lt-liveview .lt-back:focus-visible {
        opacity: 1;
        color: #fff;
        background: var(--lt-accent-2);
        border-color: var(--lt-accent);
    }

    .lt-liveview .lt-back > span[aria-hidden] {
        font-size: 26px;
        line-height: .7;
    }

.lt-liveview .lt-cams {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    gap: 6px;
}

.lt-liveview .lt-cam {
    padding: 5px 12px 4px;
    font-size: 16px;
    cursor: pointer;
}

    .lt-liveview .lt-cam.is-active,
    .lt-liveview .lt-cam:hover {
        background: var(--lt-live);
        border-color: rgba(255, 255, 255, .4);
    }

/* ---------- Ticker toggle button ---------- */
.lt-page .lt-panel-toggle {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 18px 0 30px;
    border: 0;
    font-family: var(--lt-font);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(100deg, #0848b8 0%, var(--lt-accent-2) 100%);
    clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%);
    box-shadow: -6px 0 18px rgba(0, 0, 0, .5);
    cursor: pointer;
    transition: filter .2s;
}

    .lt-page .lt-panel-toggle:hover,
    .lt-page .lt-panel-toggle:focus-visible {
        filter: brightness(1.15);
        outline: none;
    }

    .lt-page .lt-panel-toggle[aria-expanded="true"] {
        background: linear-gradient(100deg, #b5101f 0%, var(--lt-live) 100%);
    }

.lt-page .lt-panel-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 18px;
}

    .lt-page .lt-panel-toggle-icon > span {
        display: block;
        height: 3px;
        border-radius: 2px;
        background: currentColor;
    }

        .lt-page .lt-panel-toggle-icon > span:nth-child(2) { width: 75%; }
        .lt-page .lt-panel-toggle-icon > span:nth-child(3) { width: 50%; }

/* ---------- Scoreboard side panel ---------- */
.lt-liveview .lt-panel {
    position: relative;
    z-index: 4;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--lt-font);
    background: linear-gradient(180deg, #0f1a2d 0%, #070d18 100%);
    border-left: 0 solid var(--lt-accent);
    box-shadow: -10px 0 30px rgba(0, 0, 0, .5);
    transition: flex-basis .35s ease, width .35s ease, border-width .35s ease;
}

.lt-liveview.lt-panel-open .lt-panel {
    flex-basis: var(--lt-panel-w);
    width: var(--lt-panel-w);
    border-left-width: 3px;
}

.lt-liveview .lt-panel-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 300px;
    padding: 12px 14px 10px 18px;
    background: linear-gradient(100deg, var(--lt-accent-2) 0%, #0848b8 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

.lt-liveview .lt-panel-title {
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.lt-liveview .lt-panel-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 6px;
    background: rgba(0, 0, 0, .2);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

    .lt-liveview .lt-panel-close:hover { background: rgba(0, 0, 0, .4); }

.lt-liveview .lt-panel-scroll {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 195, 255, .4) transparent;
}

.lt-liveview .lt-board-list {
    margin: 0;
    padding: 10px 10px 24px;
    list-style: none;
}

.lt-liveview .lt-row {
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .025) 100%);
    border: 1px solid rgba(255, 255, 255, .07);
    border-left: 4px solid rgba(24, 195, 255, .45);
}

.lt-liveview .lt-row-top { background: linear-gradient(90deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .03) 100%); }
.lt-liveview .lt-row:has(.lt-pos-1) { border-left-color: #f6c443; }
.lt-liveview .lt-row:has(.lt-pos-2) { border-left-color: #cfd6df; }
.lt-liveview .lt-row:has(.lt-pos-3) { border-left-color: #d98a4a; }

.lt-liveview .lt-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lt-liveview .lt-row .lt-pos {
    min-width: 34px;
    height: 34px;
    font-size: 21px;
}

.lt-liveview .lt-avatar {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2a3a55, #18233a);
    border: 2px solid rgba(255, 255, 255, .25);
}

    .lt-liveview .lt-avatar > img:not(.lt-avatar-flag) {
        position: absolute;
        inset: 0;
        z-index: 1;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

.lt-liveview .lt-avatar-initial {
    font-weight: 700;
    font-size: 20px;
    color: rgba(255, 255, 255, .8);
}

.lt-liveview .lt-avatar-flag {
    position: absolute;
    right: -4px;
    bottom: -3px;
    z-index: 2;
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}

.lt-liveview .lt-row-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.lt-liveview .lt-row .lt-score {
    flex: 0 0 auto;
    font-size: 22px;
    padding: 4px 8px 3px;
}

.lt-liveview .lt-row .lt-unit { font-size: 14px; }

.lt-liveview .lt-row-catches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 8px 0 0 44px;
}

.lt-liveview .lt-catch-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.lt-liveview .lt-catch-fish {
    margin-right: 2px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9fdcff;
}

.lt-liveview .lt-catch-chip {
    padding: 2px 7px 1px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    color: rgba(255, 255, 255, .9);
    font-variant-numeric: tabular-nums;
}

.lt-liveview .lt-board-empty {
    padding: 40px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

@keyframes lt-kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .lt-liveview .lt-poster-img { animation: none; }
    .lt-liveview .lt-panel { transition: none; }
}

/* Mobile: the panel becomes an overlay sheet over the stage */
@media (max-width: 768px) {
    .lt-liveview .lt-panel {
        position: absolute;
        inset: 0;
        width: 100%;
        flex: none;
        border-left: 0;
        box-shadow: none;
        transform: translateY(100%);
        visibility: hidden;
        transition: transform .3s ease, visibility 0s linear .3s;
    }

    .lt-liveview.lt-panel-open .lt-panel {
        width: 100%;
        transform: none;
        visibility: visible;
        transition: transform .3s ease;
    }

    .lt-liveview .lt-panel-head,
    .lt-liveview .lt-panel-scroll { min-width: 0; }

    .lt-page .lt-panel-toggle { padding: 0 14px 0 26px; font-size: 17px; }
    .lt-liveview .lt-back { font-size: 16px; top: 10px; left: 10px; }
    .lt-liveview .lt-cams { top: 10px; right: 10px; }
}

@media (max-width: 480px) {
    .lt-page .lt-panel-toggle-text { display: none; }
    .lt-page .lt-panel-toggle { padding: 0 14px 0 26px; }
    .lt-liveview .lt-back-text { display: none; }
    .lt-liveview .lt-row-name { font-size: 19px; }
    .lt-liveview .lt-row .lt-score { font-size: 19px; }
    .lt-liveview .lt-row-catches { margin-left: 0; }
}
