.channel-modal {
    background: transparent;
    border: 0;
    height: 100%;
    margin: auto;
    max-height: none;
    max-width: none;
    padding: 22px;
    width: 100%;
}

.channel-modal::backdrop {
    background: rgba(3, 10, 24, 0.78);
    backdrop-filter: blur(8px);
}

.channel-modal[open] {
    align-items: center;
    display: flex;
    justify-content: center;
}

.channel-modal-panel {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    display: grid;
    max-height: calc(100vh - 44px);
    max-width: 1050px;
    overflow: hidden;
    width: 100%;
}

.channel-modal-header,
.channel-modal-footer {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 15px 20px;
}

.channel-modal-header {
    border-bottom: 1px solid #e6ebf2;
}

.channel-modal-header span {
    color: #57708e;
    display: block;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.channel-modal-header h2 {
    color: #101d31;
    font-size: 1.06rem;
    margin: 2px 0 0;
}

.channel-modal-close {
    align-items: center;
    background: #eef2f7;
    border: 0;
    border-radius: 50%;
    color: #26364d;
    display: inline-flex;
    flex: 0 0 40px;
    font-size: 1.55rem;
    height: 40px;
    justify-content: center;
    line-height: 1;
    width: 40px;
}

.channel-modal-stage {
    aspect-ratio: 16 / 9;
    background: #060a12;
    min-height: 0;
    position: relative;
}

.channel-modal-stage iframe {
    border: 0;
    display: block;
    height: 100%;
    position: relative;
    width: 100%;
    z-index: 2;
}

.channel-modal-loading {
    align-items: center;
    bottom: 0;
    color: #ccd6e5;
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    gap: 12px;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.channel-modal-loading[hidden] {
    display: none;
}

.channel-modal-loading span {
    animation: channel-modal-spin 0.8s linear infinite;
    border: 3px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    border-top-color: #fff;
    height: 30px;
    width: 30px;
}

.channel-modal-footer {
    border-top: 1px solid #e6ebf2;
    color: #607087;
    font-size: 0.72rem;
}

.channel-modal-done {
    background: #2457d6;
    border: 0;
    border-radius: 9px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 9px 14px;
    white-space: nowrap;
}

.channel-modal-open {
    overflow: hidden;
}

.channel-embed-body {
    background: #070b13;
    color: #fff;
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
}

.channel-embed-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    min-height: 100vh;
}

.channel-embed-header {
    align-items: center;
    background: #0d1421;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 16px;
}

.channel-embed-identity {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.channel-embed-identity img,
.channel-embed-identity > span {
    align-items: center;
    background: #20304b;
    border-radius: 9px;
    display: flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    object-fit: cover;
    width: 38px;
}

.channel-embed-identity strong,
.channel-embed-identity small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-embed-identity small {
    color: #9eabc0;
    font-size: 0.68rem;
}

.channel-embed-player {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
}

.channel-embed-player .channel-player-frame {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
}

.channel-embed-player .channel-preview-start {
    background: #fff;
    border: 0;
    border-radius: 10px;
    color: #101827;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 850;
    min-height: 46px;
    padding: 12px 18px;
}

.channel-embed-warning {
    background: #2b220e;
    color: #f2d687;
    font-size: 0.7rem;
    margin: 0;
    padding: 9px 14px;
}

@keyframes channel-modal-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
    .channel-modal {
        padding: 10px;
    }

    .channel-modal-panel {
        border-radius: 16px;
        max-height: calc(100vh - 20px);
    }

    .channel-modal-header,
    .channel-modal-footer {
        padding: 12px 14px;
    }

    .channel-modal-footer span {
        display: none;
    }

    .channel-modal-done {
        width: 100%;
    }

    .channel-modal-stage {
        aspect-ratio: auto;
        height: min(68vh, 560px);
    }

    .channel-embed-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .channel-modal-loading span { animation: none; }
}
