html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body.detail-page {
    background: #f7f7f9;
    color: #111;
    overflow-x: hidden;
}

.detail-topbar {
    height: 72px;
    background: linear-gradient(#26002e, #5c0075 58%, #7c009d);
    color: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.24);
}

.detail-topbar-inner {
    width: min(1000px, calc(100% - 24px));
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 0 auto;
}

.detail-brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-decoration: none;
}

.detail-brand .brand-text {
    text-shadow: none;
    font-size: 16px;
    color: #fff;
    font-weight: 900;
}

.detail-logo {
    display: block;
    border-radius: 50%;
}

.detail-top-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.detail-top-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
}

.detail-top-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.detail-main {
    width: min(1000px, calc(100% - 24px));
    margin: 0 auto;
    background: #fff;
    min-height: calc(100vh - 72px);
}

.detail-player-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #666;
}

.detail-player {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #666;
    cursor: none;
}

.no-streams::before {
    content: ".";
    color: #000;
    font-size: 17px;
}

.replay-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    font-weight: 700;
}

.replay-placeholder::before {
    content: none;
}

.detail-domain {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #005dff;
    font-size: 15px;
    line-height: 1.35;
    text-align: center;
}

.detail-match-row {
    min-height: 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 1.25fr) max-content;
    column-gap: 14px;
    align-items: center;
    padding: 0 24px;
    border-top: 1px solid #eee;
    border-bottom: 3px solid #e33;
    position: relative;
}

.detail-match-row::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -3px;
    width: 50%;
    height: 3px;
    background: #2784ff;
}

.detail-meta-left {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.detail-matchup {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 0;
}

.detail-meta-right {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

@media (min-width: 761px) {
    body.detail-page[data-lan="lan_en"] .detail-match-row {
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-areas: "league time";
        min-height: 70px;
    }

    body.detail-page[data-lan="lan_en"] .detail-meta-left {
        grid-area: league;
        width: 100%;
        max-width: calc(50% - 300px);
        z-index: 2;
    }

    body.detail-page[data-lan="lan_en"] .detail-meta-right {
        grid-area: time;
        z-index: 2;
    }

    body.detail-page[data-lan="lan_en"] .detail-matchup {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
        width: min(560px, calc(100% - 360px));
        z-index: 1;
    }
}

.detail-league,
.detail-time,
.detail-status {
    color: #666;
    font-size: 13px;
}

.detail-status {
    color: #ff0000;
    font-weight: 800;
}

.detail-time {
    white-space: nowrap;
}

.detail-league {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.detail-ball {
    margin-right: 5px;
    font-size: 16px;
}

.detail-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 15px;
    font-weight: 900;
}

.detail-team-home {
    justify-content: flex-end;
    flex: 1 1 0%;
}

.detail-team-away {
    justify-content: flex-start;
    flex: 1 1 0%;
}

.detail-team strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
}

.detail-score-main {
    color: #000;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}

.detail-score-box {
    min-width: 80px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.detail-score-box .detail-status {
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.detail-match-row .avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.detail-match-row .avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.detail-streams {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 25px 16px 16px;
    text-align: center;
    box-sizing: border-box;
}

.stream-btn {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid #8f00ff;
    border-radius: 4px;
    background: #fff;
    color: #7a00b8;
    font-size: 13px;
    padding: 0 8px;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.en-live-detail .stream-btn:not(.disabled) {
    border-color: #f2b705;
    background: linear-gradient(180deg, #ffe16a 0%, #ffc629 100%);
    color: #3b2100;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(242, 151, 0, 0.28);
}

.en-live-detail .stream-btn:not(.disabled) svg {
    color: #8a2d00;
}

.en-live-detail .stream-btn:not(.disabled):hover,
.en-live-detail .stream-btn:not(.disabled):focus-visible {
    background: linear-gradient(180deg, #fff08a 0%, #ffab1a 100%);
    border-color: #ff9f0a;
    color: #271400;
    box-shadow: 0 7px 18px rgba(242, 151, 0, 0.36);
    transform: translateY(-1px);
}

.stream-btn.active {
    background: #6e0098;
    color: #fff;
}

.stream-btn.disabled {
    opacity: 0.55;
    cursor: default;
}

.detail-community-links {
    width: min(1000px, calc(100% - 24px));
    margin: 12px auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    box-sizing: border-box;
}

.detail-community-links + .detail-announcement {
    margin-top: 25px;
}

.detail-community-links[hidden] {
    display: none !important;
}

.detail-community-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(103, 0, 138, 0.12);
    border-radius: 999px;
    background: #6e0098;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(38, 0, 46, 0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.detail-community-link:hover,
.detail-community-link:focus-visible {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(38, 0, 46, 0.2);
}

.detail-community-link-telegram {
    background: #229ed9;
}

.detail-community-link-whatsapp {
    background: #25d366;
}

.detail-community-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.detail-announcement {
    position: sticky;
    top: 0;
    z-index: 880;
    width: min(1000px, calc(100% - 24px));
    margin: -12px auto 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(103, 0, 138, 0.12);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 242, 0.98));
    color: #2c0c38;
    font-size: 16px;
    font-weight: 900;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.detail-announcement .announcement-content {
    min-width: 0;
    line-height: 1.55;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-announcement .announcement-icon {
    flex: 0 0 auto;
    min-width: 42px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 5px;
    background: var(--brand-purple);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: none;
}

.detail-announcement a,
.detail-announcement .announcement-url {
    color: #6e0098;
    font-weight: 900;
    text-decoration: none;
}

.detail-announcement .announcement-domain {
    color: #52006e;
}



@media (max-width: 760px) {
    body.detail-page {
        background: #fff;
        padding-bottom: 54px !important;
    }

    .detail-announcement {
        align-items: flex-start;
        gap: 7px;
        width: calc(100% - 16px);
        margin: -8px auto 16px;
        padding: 7px 9px;
        border-radius: 7px;
        font-size: 14px;
    }

    .detail-announcement .announcement-icon {
        min-width: 38px;
        height: 20px;
        margin-top: 1px;
        padding: 0 6px;
        font-size: 11px;
    }

    .detail-community-links {
        width: calc(100% - 16px);
        margin: 10px auto;
        padding: 0;
        gap: 8px;
    }

    .detail-community-links + .detail-announcement {
        margin-top: 10px;
    }

    .detail-community-link {
        min-height: 34px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .detail-community-icon {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .detail-logo {
        width: 32px;
        height: 32px;
    }

    .detail-topbar {
        height: 54px;
        background: linear-gradient(#8a00a8, #3a004b);
        border-bottom: none;
        box-shadow: 0 1px 6px rgba(0,0,0,0.22);
    }

    .detail-topbar-inner {
        width: 100%;
        height: 54px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
        box-sizing: border-box;
        gap: 6px;
    }

    .detail-brand {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
        gap: 6px;
        overflow: hidden;
    }

    .detail-brand .brand-text-wrapper {
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .detail-brand .brand-text {
        max-width: 100%;
        overflow: hidden;
        font-size: 14px !important;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .detail-brand .brand-subtext {
        max-width: 100%;
        overflow: hidden;
        font-size: 11px !important;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


    .detail-top-links {
        flex: 0 0 auto;
        display: flex !important;
        align-items: center;
        gap: 6px;
        height: 30px;
        margin-left: auto;
        margin-right: 0;
    }

    .detail-top-links a {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 12px !important;
        color: #fff !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-sizing: border-box;
        min-width: 54px;
        height: 30px;
        padding: 0 10px !important;
        border-radius: 15px !important;
        font-weight: 800 !important;
        text-decoration: none !important;
        transition: background 0.2s ease;
    }

    .detail-main {
        width: 100%;
        min-height: calc(100vh - 54px);
    }

    .detail-match-row {
        min-height: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 16px 12px;
        border-bottom-width: 2px;
    }

    .detail-match-row::after {
        bottom: -2px;
        height: 2px;
    }

    .detail-meta-left {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        color: #666;
        font-size: 11px !important;
    }

    .detail-meta-right {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .detail-league,
    .detail-time,
    .detail-status {
        font-size: 11px !important;
    }

    .detail-matchup {
        grid-column: 1 / span 2;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0 12px;
    }

    .detail-team {
        flex: 1;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        font-size: 13px !important;
        gap: 4px !important;
    }

    .detail-team-home {
        justify-content: center;
    }

    .detail-team-away {
        justify-content: center;
        flex-direction: column-reverse !important;
    }

    .detail-team strong {
        font-size: 13px !important;
        white-space: normal;
        word-break: break-all;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-height: 38px;
        line-height: 1.35;
        text-align: center;
    }

    .detail-match-row .avatar {
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px !important;
    }

    .detail-score-main {
        font-size: 18px !important;
        line-height: 1.2;
    }

    .detail-score-box {
        min-width: 60px !important;
    }

    .detail-streams {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 25px 16px 16px !important;
        box-sizing: border-box !important;
    }

    .stream-btn {
        width: auto !important;
        height: 26px !important;
        font-size: 12px !important;
        padding: 0 8px !important;
        border-radius: 4px !important;
    }

}

@media (max-width: 430px) {
    .detail-streams {
        padding: 18px 12px 12px !important;
    }

    .stream-btn {
        font-size: 13px !important;
    }

}

body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-topbar-inner,
body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-main,
body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-announcement {
    width: 900px;
    max-width: calc(100% - 24px);
}

.zh-detail-main {
    width: 900px;
    max-width: calc(100% - 24px);
}

body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-streams {
    gap: 6px;
    padding: 8px 14px 10px;
}

body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-match-row {
    min-height: 56px;
    grid-template-columns: 240px minmax(0, 1fr) 240px;
    padding: 0 20px;
}

body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-matchup {
    gap: 16px;
}

body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-announcement {
    position: static;
    top: auto;
    z-index: auto;
    margin: 12px auto 22px;
}

@media (max-width: 760px) {
    body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-topbar-inner,
    body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-main,
    .zh-detail-main {
        width: 100%;
        max-width: none;
    }

    body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-announcement {
        width: calc(100% - 16px);
        margin: 12px auto 16px;
    }

    body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-streams {
        gap: 8px !important;
        padding: 10px 16px 10px !important;
    }

    body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-match-row {
        min-height: auto;
        grid-template-columns: 1fr 1fr;
        padding: 14px 12px;
    }
}

@media (max-width: 430px) {
    body.detail-page[data-lan="lan_cn"]:not(.tv-detail-page) .detail-streams {
        padding: 10px 12px 8px !important;
    }
}
