* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.story-app {
    width: 100vw;
    height: 100dvh;
    background: #000;
    position: relative;
}

.viewer {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
}

.media-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.media-wrap img,
.media-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #000;
}

.progress {
    position: absolute;
    z-index: 10;
    top: 10px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.bar {
    height: 3px;
    flex: 1;
    background: rgba(255,255,255,.35);
    border-radius: 99px;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 99px;
}

.topbar {
    position: absolute;
    z-index: 11;
    top: 22px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg,#8a2be2,#ff2d75,#ffb000);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #fff;
}

.topbar span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,.75);
    margin-top: 2px;
}

.tap {
    position: absolute;
    z-index: 8;
    top: 80px;
    bottom: 90px;
    width: 50%;
}

.tap-left {
    left: 0;
}

.tap-right {
    right: 0;
}

.actions {
    position: absolute;
    z-index: 12;
    left: 12px;
    right: 12px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-btn {
    flex: 1;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
}

.like-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 31px;
    line-height: 1;
}

.like-btn.liked {
    color: #ff2d55;
}

.empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 24px;
}

.logo {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(45deg,#fff,#aaa);
    -webkit-background-clip: text;
    color: transparent;
}

.empty p {
    color: #aaa;
}