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;
}

.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: 280px 1fr 280px;
    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 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

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

.detail-meta-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

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

.detail-league {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.detail-ball {
    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;
    min-width: 80px;
    flex: 0 0 auto;
}

.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: 12px 16px 26px;
    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;
}

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

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

.detail-announcement {
    width: min(1100px, calc(100% - 24px));
    margin: -12px auto 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e6d8ef;
    border-radius: 6px;
    background: #fff;
    color: #4b2459;
    font-weight: 700;
    box-sizing: border-box;
    overflow: hidden;
}

.detail-announcement .announcement-content {
    min-width: 0;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-announcement .announcement-icon {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 3px;
    background: #6e0098;
    color: #fff;
    font-size: 12px;
}

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



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

    .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: flex-start;
        align-items: center;
        padding: 0 112px 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-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;
    }

    body.detail-page .site-language-switch {
        top: 12px;
        right: 8px;
        box-sizing: border-box;
        height: 30px;
    }

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

    .detail-match-row {
        min-height: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        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;
        min-width: 60px !important;
    }

    .detail-streams {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 14px 16px 24px !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: 14px 12px 24px !important;
    }

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