html, body {
    margin: 0;
    height: 100%;
    background: #0b0b0b;
    color: #fff;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.duroply-player {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #0b0b0b center/cover no-repeat;
}

.duroply-player::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.duroply-stage {
    position: relative;
    z-index: 1;
    width: min(100vw, calc(100vh * 0.5625));
    height: min(100vh, calc(100vw * 1.7778));
    background: #111;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.duroply-page {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: #111;
}

.duroply-page.is-active {
    opacity: 1;
    visibility: visible;
}

.duroply-page .grid-layer,
.duroply-page [template] {
    display: grid;
}

.duroply-page .animation-wrapper {
    opacity: 1;
    transform: none;
}

.duroply-page .page-fullbleed-area,
.duroply-page .page-safe-area,
.duroply-page [template] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.duroply-page img[layout="fill"],
.duroply-page img {
    display: block;
    max-width: none;
}

.duroply-page img[layout="fill"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duroply-chrome {
    position: absolute;
    z-index: 4;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 0;
    background: linear-gradient(rgba(0, 0, 0, 0.45), transparent 70%);
    pointer-events: none;
}

.duroply-bars {
    display: flex;
    gap: 4px;
}

.duroply-bar {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.duroply-bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
}

.duroply-bar.is-done > span {
    width: 100%;
}

.duroply-bar.is-active > span {
    animation: duroply-progress linear forwards;
    animation-duration: var(--advance, 5s);
    animation-play-state: var(--play, running);
}

.duroply-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    pointer-events: auto;
}

.duroply-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.duroply-publisher {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.duroply-icon {
    width: 36px;
    height: 36px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.duroply-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0 auto;
    fill: currentColor;
}

.duroply-cta {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 48px);
    padding: 12px 18px;
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.duroply-cta.is-on {
    display: inline-flex;
}

.duroply-hit {
    position: absolute;
    z-index: 3;
    top: 72px;
    bottom: 72px;
    width: 30%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.duroply-hit-prev { left: 0; }
.duroply-hit-next { right: 0; width: 70%; }

.duroply-share-panel {
    position: absolute;
    z-index: 6;
    left: 12px;
    right: 12px;
    bottom: 18px;
    display: none;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    color: #111;
}

.duroply-share-panel.is-on { display: block; }

.duroply-share-panel button,
.duroply-share-panel a {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: #f3f3f3;
    color: #111;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

@keyframes duroply-progress {
    from { width: 0; }
    to { width: 100%; }
}

@media (max-width: 720px) {
    .duroply-stage {
        width: 100vw;
        height: 100vh;
        box-shadow: none;
    }
}
