body {
    overflow: hidden;
    background-color: #000;
    overscroll-behavior-y: none;
}

.post-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overscroll-behavior-y: none;
}

.header-back {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-back:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

.header-back:active {
    transform: scale(0.95);
}

.header-back svg {
    display: block;
}

.gallery {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-item img,
.gallery-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.post-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 100px;
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    pointer-events: none;
    z-index: 10;
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.copy-container {
    position: relative;
    display: flex;
    align-items: center;
}

.copy-link-btn,
.bookmark-btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
    backdrop-filter: blur(5px);
}

.copy-link-btn:hover,
.bookmark-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

.copy-link-btn:active,
.bookmark-btn:active {
    transform: scale(0.95);
}

.bookmark-btn.active {
    color: #ffffff;
    /* Gold color for active bookmark */
}

.copy-tooltip {
    position: absolute;
    top: 130%;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.copy-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.post-info p {
    opacity: 0.9;
    pointer-events: auto;
}

.pagination-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    z-index: 20;
    pointer-events: auto;
    margin-bottom: 20px;
    padding: 5px 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gallery-item {
        /* Shift image up to account for bottom info panel, centering it in available space */
        padding-bottom: 120px;
    }

    .header-back {
        top: 15px;
        left: 15px;
        padding: 8px;
    }

    .header-actions {
        top: 15px;
        right: 15px;
    }

    .copy-link-btn,
    .bookmark-btn {
        padding: 8px;
    }

    .pagination-dots {
        bottom: auto;
        display: flex;
    }
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

.post-info small {
    opacity: 0.7;
}

.post-tags {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    backdrop-filter: blur(5px);
    pointer-events: auto;
}