.nehp-player {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 18px auto 16px;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
}

.nehp-player-poster,
.nehp-player-iframe,
.nehp-player-poster-empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nehp-player-poster {
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.nehp-player-poster-empty {
    background: #000;
}

.nehp-player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
}

.nehp-player-play:hover {
    background: rgba(0, 0, 0, 0.82);
}

.nehp-player-play-icon {
    font-size: 34px;
    line-height: 1;
    margin-left: 5px;
}

.nehp-player-label {
    position: absolute;
    left: 12px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
}

.nehp-player-message {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 42px;
    z-index: 3;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.nehp-player.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.nehp-hidden-download-image img {
    max-width: 100%;
    height: auto;
}

.nehp-hidden-download-text {
    display: inline-block;
    margin: 8px 0;
}

.nehp-preview-holder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    overflow: hidden;
}

.nehp-preview-holder iframe,
.nehp-preview-holder video,
.nehp-preview-holder object,
.nehp-preview-holder embed {
    max-width: 100%;
}

.nehp-preview-link {
    display: block;
    color: #fff;
    text-align: center;
    padding: 30px 12px 10px;
}

.nehp-preview-fallback {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 10;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
}

.nehp-preview-holder.has-error .nehp-preview-link {
    padding-top: 80px;
}


/* v0.1.2 cleanup: hide helper link and fallback unless preview fails */
.nehp-preview-link {
    position: absolute !important;
    left: -99999px !important;
    top: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.nehp-preview-fallback {
    display: none !important;
}

.nehp-preview-holder.has-error .nehp-preview-fallback {
    display: inline-block !important;
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 10;
    padding: 8px 14px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
}

/* Clean replacement for old image download buttons */
.nehp-download-btn {
    display: inline-block;
    margin: 14px 0;
    padding: 10px 18px;
    border-radius: 6px;
    background: #222;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    max-width: 100%;
    box-sizing: border-box;
}

.nehp-download-btn:hover {
    opacity: 0.88;
    color: #fff !important;
    text-decoration: none !important;
}

.nehp-download-btn-fboom::before,
.nehp-download-btn-k2s::before {
    content: "⬇";
    display: inline-block;
    margin-right: 8px;
}

.nehp-hidden-download-image img {
    width: auto !important;
    max-width: 240px !important;
    height: auto !important;
}


/* v0.1.3: cleaner pre-click poster */
.nehp-player:not(.is-loaded) .nehp-player-poster {
    object-fit: cover !important;
    object-position: center center !important;
}

/* v0.1.3: stronger, cleaner download button */
.nehp-download-btn {
    display: table !important;
    margin: 22px auto !important;
    padding: 14px 28px !important;
    min-width: 240px;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #ff8a00 0%, #ff6b00 45%, #d95500 100%) !important;
    color: #ffffff !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.12);
    box-sizing: border-box;
}

.nehp-download-btn:hover,
.nehp-download-btn:focus {
    transform: translateY(-1px);
    opacity: 1 !important;
    background: linear-gradient(180deg, #ffa12b 0%, #ff7600 45%, #e45d00 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.nehp-download-btn-fboom::before,
.nehp-download-btn-k2s::before {
    content: "⬇";
    display: inline-block;
    margin-right: 9px;
    font-size: 15px;
}


/* v0.1.4: use FBoom main poster, but crop it cleanly before click */
.nehp-player:not(.is-loaded) .nehp-player-poster {
    object-fit: cover !important;
    object-position: center center !important;
}

/*
 * If some FBoom main posters still show a small black top strip,
 * this gently zooms the poster a bit so the preview fills the player.
 */
.nehp-player:not(.is-loaded) .nehp-player-poster {
    transform: scale(1.035);
    transform-origin: center center;
}


/* v0.1.5: home/archive poster card instead of original player */
.nehp-player-archive {
    display: block;
    max-width: 760px;
    margin: 18px auto 16px;
    text-decoration: none !important;
}

.nehp-player-archive .nehp-player-poster {
    object-fit: cover !important;
    object-position: center center !important;
    cursor: pointer;
    transform: scale(1.035);
    transform-origin: center center;
}

.nehp-player-archive .nehp-player-play {
    pointer-events: none;
}

.nehp-player-archive .nehp-player-label {
    text-decoration: none !important;
}
