:root {
    --live-green: #007158;
    --live-gold: #e2be64;
    --live-ink: #061641;
}

.seamless-live-body {
    max-width: 980px;
    background: #f8f1df;
}

.seamless-shell {
    min-height: 100vh;
}

.seamless-site-header {
    position: static;
    width: 100%;
    transform: none;
}

.seamless-main {
    padding: 16px 10px 30px;
}

.seamless-card {
    overflow: hidden;
    border: 1px solid var(--live-gold);
    border-radius: 14px;
    background: #fffaf0;
    box-shadow: 0 12px 32px rgba(0, 75, 58, .16);
}

.seamless-heading {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 17px;
    border-bottom: 1px solid var(--live-gold);
}

.seamless-heading > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.seamless-camera {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--live-green);
    font-size: 19px;
}

.seamless-heading h1 {
    margin: 0;
    color: #004b3a;
    font-size: 21px;
}

.seamless-heading p {
    margin: 4px 0 0;
    color: #757970;
    font-size: 11px;
}

.seamless-live-tag,
.seamless-overlay-head > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 16px;
    color: #fff;
    background: #d9253b;
    font-weight: 900;
}

.seamless-live-tag {
    padding: 6px 10px;
    font-size: 10px;
}

.seamless-beijing-live-time {
    display: block;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .78);
    white-space: nowrap;
}

.seamless-live-tag i,
.seamless-overlay-head > span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .18);
    animation: seamlessPulse 1s infinite;
}

.seamless-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--live-ink) url('/static/img/xinxincai-draw-studio.png') center / cover no-repeat;
    isolation: isolate;
}

.seamless-video {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--live-ink);
    opacity: 0;
    pointer-events: none;
    transform: scale(1);
    filter: blur(0) brightness(1);
    transition: opacity 45ms linear, filter 180ms ease, transform 180ms ease;
}

.seamless-video.active {
    z-index: 2;
    opacity: 1;
}

.seamless-kj-corner-blur {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 30%;
    height: 15%;
    background: rgba(4, 22, 58, .24);
    -webkit-backdrop-filter: blur(14px) saturate(.68);
    backdrop-filter: blur(14px) saturate(.68);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms;
}

.seamless-card.phase-kj.playing .seamless-kj-corner-blur {
    opacity: 1;
    visibility: visible;
}

.seamless-kj-zoom {
    position: absolute;
    z-index: 10;
    top: 2.4%;
    right: 2.2%;
    width: 29%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 2px solid rgba(255, 226, 137, .96);
    border-radius: 9px;
    background: #061641;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 77, 60, .72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px) scale(.97);
    transition: opacity 160ms ease, transform 180ms ease, visibility 160ms;
}

.seamless-card.phase-kj.playing .seamless-kj-zoom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.seamless-card.phase-kj .seamless-overlay-head > span {
    opacity: 0;
    visibility: hidden;
}

.seamless-kj-zoom canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.seamless-card.draw-blurring .seamless-video.active {
    transform: scale(1.025);
    filter: blur(6px) brightness(.68) saturate(.8);
}

.seamless-card.phase-cj .seamless-video.active,
.seamless-card.phase-cj.draw-blurring .seamless-video.active {
    transform: scale(1.075);
    filter: blur(14px) grayscale(1) brightness(.68) contrast(.72);
}

.seamless-shade {
    position: absolute;
    z-index: 4;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 17, 55, .76), transparent 22%, transparent 72%, rgba(0, 14, 48, .68));
    transition: background 180ms ease;
}

.seamless-card.draw-blurring .seamless-shade {
    background: linear-gradient(180deg, rgba(0, 17, 55, .8), rgba(0, 25, 64, .13) 30%, rgba(0, 25, 64, .2) 70%, rgba(0, 14, 48, .72));
}

.seamless-overlay-head {
    position: absolute;
    z-index: 7;
    top: 0;
    left: 0;
    right: 0;
    height: 14%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 2.2%;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .65);
}

.seamless-overlay-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seamless-overlay-brand > img {
    width: 95px;
    max-height: 42px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.seamless-overlay-period {
    font-size: 15px;
    font-weight: 800;
}

.seamless-overlay-head strong {
    color: #ffe164;
    font-size: 21px;
}

.seamless-overlay-head > span {
    justify-self: end;
    padding: 5px 9px;
    background: rgba(207, 23, 43, .86);
    font-size: 10px;
}

.seamless-result-rail {
    position: absolute;
    z-index: 8;
    left: 10%;
    bottom: 6.5%;
    width: 80%;
    height: 30%;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    padding: 7px;
    border: 1px solid rgba(239, 210, 117, .82);
    border-radius: 11px;
    background: linear-gradient(180deg, #007e61, #005240);
    box-shadow: 0 7px 20px rgba(0, 40, 30, .42), inset 0 0 15px rgba(255, 255, 255, .08);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.seamless-card.phase-kj .seamless-result-rail {
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
}

.seamless-card[data-active-segment="yj1"] .seamless-result-rail {
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
}

.seamless-result-slot {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 8px;
    background: linear-gradient(180deg, #08765d, #00604b);
    color: rgba(255, 255, 255, .88);
    font-style: normal;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.seamless-result-slot i {
    width: min(52px, 72%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .48);
    border-radius: 50%;
    background: #004f3e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3), inset 0 0 12px rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .7);
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
}

.seamless-result-slot em {
    font-size: 9px;
    font-style: normal;
}

.seamless-result-slot.revealed i,
.seamless-reveal-ball {
    border: 0;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: #121212;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}

.seamless-result-slot.red.revealed i,
.seamless-reveal-ball.red {
    background-image: url('/static/img/hong.png?v=20260821-ring1');
}

.seamless-result-slot.blue.revealed i,
.seamless-reveal-ball.blue {
    background-image: url('/static/img/lan.png?v=20260821-ring1');
}

.seamless-result-slot.green.revealed i,
.seamless-reveal-ball.green {
    background-image: url('/static/img/lv.png?v=20260821-ring1');
}

.seamless-result-slot.just-revealed i {
    animation: seamlessSlotLand 440ms cubic-bezier(.2, .85, .3, 1.25);
}

.seamless-ball-reveal {
    position: absolute;
    z-index: 11;
    top: 43%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.45);
}

.seamless-ball-reveal.show {
    opacity: 1;
    animation: seamlessReveal 3s cubic-bezier(.16, .8, .25, 1) both;
}

.seamless-ball-reveal.persistent {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: seamlessRevealIn 620ms cubic-bezier(.16, .8, .25, 1) both;
}

.seamless-ball-reveal.hold {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: none;
}

.seamless-ball-reveal small {
    padding: 5px 12px;
    border: 1px solid rgba(255, 230, 142, .72);
    border-radius: 15px;
    color: #fff5c4;
    background: rgba(0, 50, 43, .82);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    white-space: nowrap;
}

.seamless-reveal-ball {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 13px 17px rgba(0, 0, 0, .55));
    font-size: 27px;
    font-weight: 950;
}

.seamless-watermark {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 39%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .33);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 5px;
    white-space: nowrap;
    text-shadow: 0 2px 5px #00143f;
}

.seamless-entry {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(2, 15, 49, .62);
    backdrop-filter: blur(3px);
    text-align: center;
}

.seamless-entry.hidden {
    display: none;
}

.seamless-entry b {
    margin-top: 9px;
    font-size: 17px;
}

.seamless-entry p {
    margin: 7px 0 12px;
    color: rgba(255, 255, 255, .82);
    font-size: 10px;
}

.seamless-entry button {
    padding: 11px 22px;
    border: 1px solid #efd278;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #008565, #005d48);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.seamless-entry button:disabled {
    cursor: wait;
    opacity: .64;
}

.seamless-loader {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #ffe386;
    border-radius: 50%;
    animation: seamlessSpin .85s linear infinite;
}

.seamless-file-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 13px;
    background: rgba(255, 255, 255, .12);
    font-size: 22px;
}

.seamless-statusbar {
    position: absolute;
    z-index: 9;
    left: 2.2%;
    right: 2.2%;
    bottom: 1.2%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 9px;
    text-shadow: 0 1px 3px #00143c;
}

.seamless-statusbar > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.seamless-statusbar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3bd38c;
}

.seamless-card.playing .seamless-statusbar i {
    background: #ff4258;
    animation: seamlessPulse .8s infinite;
}

.seamless-end-screen {
    position: absolute;
    z-index: 15;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3.2% 4%;
    color: #fff;
    background:
        radial-gradient(circle at 50% 42%, rgba(41, 184, 127, .55), transparent 36%),
        radial-gradient(circle at 8% 90%, rgba(1, 66, 50, .76), transparent 35%),
        linear-gradient(145deg, #008568 0%, #00634d 48%, #004d3c 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.025);
    transition: opacity 420ms ease, transform 520ms ease, visibility 420ms;
}

.seamless-end-screen.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.seamless-end-screen::before,
.seamless-end-screen::after,
.seamless-end-glow {
    position: absolute;
    border: 1px solid rgba(255, 239, 180, .16);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.seamless-end-screen::before {
    width: 52%;
    aspect-ratio: 1;
    top: -38%;
    left: -10%;
    box-shadow: 0 0 0 22px rgba(255, 255, 255, .025), 0 0 0 46px rgba(255, 255, 255, .018);
}

.seamless-end-screen::after {
    width: 45%;
    aspect-ratio: 1;
    right: -12%;
    bottom: -38%;
    box-shadow: 0 0 0 20px rgba(255, 255, 255, .025), 0 0 0 42px rgba(255, 255, 255, .018);
}

.seamless-end-glow {
    width: 58%;
    aspect-ratio: 1;
    top: 50%;
    left: 50%;
    border-color: rgba(255, 225, 125, .1);
    box-shadow: inset 0 0 90px rgba(255, 228, 137, .05);
    transform: translate(-50%, -50%);
}

.seamless-end-brand,
.seamless-end-heading,
.seamless-end-balls,
.seamless-end-slogan {
    position: relative;
    z-index: 1;
}

.seamless-end-brand {
    position: absolute;
    top: 4%;
    left: 3.2%;
    display: flex;
    align-items: center;
    gap: 11px;
}

.seamless-end-brand img {
    width: 95px;
    max-height: 42px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.seamless-end-brand time {
    padding: 0;
    color: #fff;
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
    white-space: nowrap;
}

.seamless-end-heading {
    text-align: center;
}

.seamless-end-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border: 1px solid rgba(255, 229, 141, .56);
    border-radius: 18px;
    color: #fff0b2;
    background: rgba(0, 63, 48, .52);
    font-size: clamp(8px, 1.2vw, 11px);
    font-weight: 900;
    letter-spacing: 1px;
}

.seamless-end-heading > span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f3ce68;
    box-shadow: 0 0 10px rgba(255, 224, 120, .82);
}

.seamless-end-heading h2 {
    margin: 1.7% 0 .5%;
    color: #fff;
    font-size: clamp(17px, 3.3vw, 31px);
    line-height: 1.1;
    letter-spacing: 2px;
    text-shadow: 0 3px 12px rgba(0, 31, 24, .45);
}

.seamless-end-heading p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(8px, 1.25vw, 12px);
    letter-spacing: 3px;
}

.seamless-end-balls {
    width: min(82%, 760px);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: start;
    gap: clamp(4px, 1.2vw, 12px);
    margin: 2.2% auto 1.8%;
}

.seamless-end-ball {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.seamless-end-ball i {
    width: min(72px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: #101010;
    filter: drop-shadow(0 8px 10px rgba(0, 35, 27, .48));
    font-size: clamp(13px, 2.4vw, 23px);
    font-style: normal;
    font-weight: 950;
    text-shadow: 0 1px 0 #fff;
}

.seamless-end-ball.red i { background-image: url('/static/img/hong.png?v=20260821-ring1'); }
.seamless-end-ball.blue i { background-image: url('/static/img/lan.png?v=20260821-ring1'); }
.seamless-end-ball.green i { background-image: url('/static/img/lv.png?v=20260821-ring1'); }

.seamless-end-ball em {
    color: #fff5cf;
    font-size: clamp(7px, 1.05vw, 10px);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.seamless-end-ball.special {
    position: relative;
}

.seamless-end-ball.special::before {
    position: absolute;
    top: -7px;
    right: -6px;
    z-index: 2;
    padding: 2px 5px;
    border-radius: 7px;
    color: #005542;
    background: #ffe28b;
    content: '特别号';
    font-size: clamp(5px, .75vw, 8px);
    font-weight: 950;
    white-space: nowrap;
}

.seamless-end-slogan {
    margin: 1.5% 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: clamp(6px, .9vw, 9px);
    font-weight: 800;
    letter-spacing: 4px;
}

.seamless-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border-top: 1px solid var(--live-gold);
    background: var(--live-gold);
}

.seamless-notes article {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px;
    background: #fffaf0;
}

.seamless-notes article > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 10px;
    color: var(--live-green);
    background: #e7f4ef;
    font-size: 17px;
}

.seamless-notes b {
    color: #004b3a;
    font-size: 12px;
}

.seamless-notes p {
    margin: 3px 0 0;
    color: #72766f;
    font-size: 9px;
}

@keyframes seamlessPulse {
    50% { opacity: .35; }
}

@keyframes seamlessSpin {
    to { transform: rotate(360deg); }
}

@keyframes seamlessReveal {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.28) rotate(-230deg); }
    8% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(18deg); }
    82% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(.78) rotate(12deg); }
}

@keyframes seamlessRevealIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.28) rotate(-230deg); }
    55% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(18deg); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@keyframes seamlessSlotLand {
    0% { transform: translateY(-18px) scale(1.45); opacity: .2; }
    70% { transform: translateY(2px) scale(.92); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 560px) {
    .seamless-main { padding: 8px 5px 24px; }
    .seamless-card { border-radius: 9px; }
    .seamless-heading { min-height: 60px; padding: 8px 10px; }
    .seamless-camera { width: 35px; height: 35px; font-size: 15px; }
    .seamless-heading h1 { font-size: 17px; }
    .seamless-heading p { font-size: 9px; }
    .seamless-overlay-brand { gap: 5px; }
    .seamless-overlay-brand > img { width: 65px; }
    .seamless-overlay-period { font-size: 10px; }
    .seamless-overlay-head strong { font-size: 14px; }
    .seamless-overlay-head > span { padding: 3px 6px; font-size: 7px; }
    .seamless-beijing-live-time { font-size: 6px; }
    .seamless-kj-zoom { top: 2.6%; right: 2%; width: 32%; border-width: 1px; border-radius: 5px; }
    .seamless-result-rail { left: 10%; bottom: 7%; width: 80%; height: 30%; gap: 2px; padding: 3px; border-radius: 6px; }
    .seamless-result-slot { gap: 1px; border-radius: 4px; }
    .seamless-result-slot i { width: min(27px, 82%); border-width: 1px; font-size: 9px; }
    .seamless-result-slot em { font-size: 6px; }
    .seamless-ball-reveal { gap: 4px; }
    .seamless-ball-reveal small { padding: 3px 8px; font-size: 8px; }
    .seamless-reveal-ball { width: 60px; height: 60px; font-size: 19px; }
    .seamless-watermark { font-size: 12px; letter-spacing: 3px; }
    .seamless-entry b { font-size: 14px; }
    .seamless-end-screen { padding: 2.5% 3%; }
    .seamless-end-heading > span { padding: 3px 8px; letter-spacing: .4px; }
    .seamless-end-heading h2 { margin-top: 1%; letter-spacing: 1px; }
    .seamless-end-heading p { letter-spacing: 1.5px; }
    .seamless-end-balls { width: 88%; gap: 3px; margin: 1.5% auto 1%; }
    .seamless-end-ball { gap: 1px; }
    .seamless-end-ball i { width: min(35px, 100%); }
    .seamless-end-ball.special::before { top: -4px; right: -3px; padding: 1px 3px; }
    .seamless-end-brand { top: 3%; left: 2.5%; gap: 5px; }
    .seamless-end-brand img { width: 65px; }
    .seamless-end-brand time { font-size: 6px; }
    .seamless-end-slogan { margin-top: 1%; letter-spacing: 2px; }
    .seamless-notes article { display: block; padding: 10px 5px; text-align: center; }
    .seamless-notes article > span { margin: 0 auto 6px; }
    .seamless-notes b { font-size: 10px; }
    .seamless-notes p { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .seamless-live-tag i,
    .seamless-overlay-head > span i,
    .seamless-loader,
    .seamless-ball-reveal.show,
    .seamless-ball-reveal.persistent,
    .seamless-result-slot.just-revealed i,
    .seamless-card.playing .seamless-statusbar i {
        animation: none;
    }
}
