* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 스토리 컨테이너 */
.story-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #000;
    overflow: hidden;
}

/* 상단 진행 바 컨테이너 */
.progress-bar-container {
    position: absolute;
    top: 12px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

/* 개별 진행 바 */
.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #fff;
}

/* 완료된 바 */
.progress-bar.completed .progress-bar-fill {
    width: 100%;
}

/* 현재 진행 중인 바 */
.progress-bar.active .progress-bar-fill {
    animation: progress 8s linear forwards;
}

/* 타이머 정지 시 */
.progress-bar.paused .progress-bar-fill {
    animation-play-state: paused;
}

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

/* 스토리 콘텐츠 */
.story-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 스토리 이미지 */
.story-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* 하트 버튼 */
.heart-btn {
    position: absolute;
    bottom: 30px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-icon {
    width: 28px;
    height: 28px;
    fill: transparent;
    stroke: #fff;
    stroke-width: 1.5;
    transition: all 0.15s ease;
}

.heart-count {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
    min-width: 16px;
}

.heart-icon.liked {
    fill: #ed4956;
    stroke: #ed4956;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* 숨김 카운터 */
.hidden-counter {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* 터치 영역 */
.touch-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    z-index: 30;
}

.touch-left {
    left: 0;
}

.touch-right {
    right: 0;
}

/* 이미지 로딩 페이드인 */
.story-image {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.story-image.loaded {
    opacity: 1;
}
