.post-back-btn {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 14px;
    background: var(--tab-glass-bg, rgba(255, 255, 255, 0.12));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--tab-glass-border, rgba(255, 255, 255, 0.2));
    border-radius: 30px;
    cursor: pointer;
    color: #007aff;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow:
        0 8px 24px -8px var(--tab-glass-shadow, rgba(0, 0, 0, 0.1)),
        inset 0 2px 3px -1px var(--tab-glass-highlight, rgba(255, 255, 255, 0.5)),
        inset 0 -2px 4px -1px var(--tab-glass-caustic, rgba(255, 255, 255, 0.15)),
        inset 0 0 0 1px var(--tab-glass-border, rgba(255, 255, 255, 0.2));
    transition:
        transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        opacity 0.35s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    text-decoration: none;
}

.post-back-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.post-back-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 45%;
    border-radius: 30px 30px 12px 12px / 30px 30px 8px 8px;
    background: linear-gradient(180deg,
        var(--tab-reflection-start, rgba(255, 255, 255, 0.5)) 0%,
        var(--tab-reflection-end, rgba(255, 255, 255, 0.0)) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.post-back-btn i,
.post-back-btn svg {
    width: 16px;
    height: 16px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.post-back-btn span {
    position: relative;
    z-index: 2;
}

.post-back-btn:hover {
    background: #007aff;
    color: #ffffff;
    border-color: #007aff;
    transform: translateY(0) scale(1.03);
    box-shadow:
        0 12px 32px -8px rgba(0, 122, 255, 0.3),
        inset 0 2px 3px -1px rgba(255, 255, 255, 0.4),
        inset 0 0 0 1px rgba(0, 122, 255, 0.8);
}

.post-back-btn:hover i,
.post-back-btn:hover svg {
    transform: translateX(3px);
}

.post-back-btn:active {
    transform: translateY(0) scale(0.97);
}

body.dark-theme .post-back-btn {
    color: #ffd700;
    --tab-glass-bg: rgba(30, 30, 35, 0.45);
    --tab-glass-border: rgba(255, 255, 255, 0.08);
    --tab-glass-shadow: rgba(0, 0, 0, 0.4);
    --tab-glass-highlight: rgba(255, 255, 255, 0.05);
    --tab-glass-caustic: rgba(255, 255, 255, 0.02);
    --tab-reflection-start: rgba(255, 255, 255, 0.06);
    --tab-reflection-end: rgba(255, 255, 255, 0.0);
}

body.dark-theme .post-back-btn:hover {
    background: #ffd700;
    color: #0a1628;
    border-color: #ffd700;
    box-shadow:
        0 12px 32px -8px rgba(255, 215, 0, 0.3),
        inset 0 2px 3px -1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 215, 0, 0.8);
}

.post-back-btn.hide {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

@media (max-width: 768px) {
    .post-back-btn {
        top: 68px;
        right: 16px;
        padding: 8px 14px 8px 12px;
        font-size: 0.72rem;
        gap: 6px;
    }

    .post-back-btn i,
    .post-back-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .post-back-btn {
        top: 60px;
        right: 12px;
        padding: 7px 12px 7px 10px;
        font-size: 0.68rem;
    }

    .post-back-btn span {
        display: inline;
    }

    .post-back-btn i,
    .post-back-btn svg {
        width: 13px;
        height: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-back-btn,
    .post-back-btn i,
    .post-back-btn svg {
        transition: none !important;
    }
}