.media-wrapper {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    bottom: 20px;
    z-index: 1000;
}

.media-button {
    display: flex;
    align-items: center;
    height: 60px;
    width: 60px;
    text-decoration: none;
    margin: 5px 15px;
    overflow: hidden;
    background: #fff;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid #c2c2c2;
    transition: all 0.3s ease-out;
}

.media-button:hover {
    width: 200px;
}

.media-button .media-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 60px;
    /* color: #000; */
    border-radius: 50px;
    box-sizing: border-box;
    transition: all 0.3s ease-out;
    flex-shrink: 0;
}

.fa-line {
    color: #5dbd5d;
}

.fa-facebook {
    color: #4267B2;
}

.fa-instagram {
    color: #e74fba;
}

.fa-youtube {
    color: #c72646;
}

.media-button:nth-child(1):hover .media-icon {
    background: #5dbd5d;
}

.media-button:nth-child(2):hover .media-icon {
    background: #4267B2;
}

.media-button:nth-child(3):hover .media-icon {
    background: #e74fba;
}

.media-button:nth-child(4):hover .media-icon {
    background: #c72646;
}

.media-button .media-icon i {
    font-size: 25px;
    transition: all 0.3s ease-out;
}

.media-button:hover .media-icon i {
    color: #fff;
}

.media-button .media-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 60px;
    transition: all 0.3s ease-out;
    white-space: nowrap;
}

.media-button:nth-child(1) .media-text {
    color: #5dbd5d;
}

.media-button:nth-child(2) .media-text {
    color: #4267B2;
}

.media-button:nth-child(3) .media-text {
    color: #e74fba;
}

.media-button:nth-child(4) .media-text {
    color: #c72646;
}

@media (min-width: 769px) and (max-width: 1023px) {
    .media-wrapper {
        right: 15px;
    }

    .media-button {
        width: 45px;
        height: 45px;
    }

    .media-button:hover {
        width: 130px;
    }

    .media-button .media-icon {
        width: 45px;
        height: 45px;
    }

    .media-button .media-icon i {
        font-size: 20px;
    }
}

/* 手機版面 (768px以下) */
@media (max-width: 768px) {
    .media-wrapper {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        flex-direction: row;
        gap: 15px;
        background-color: rgba(255, 255, 255, 0.9);
        padding: 10px 20px;
        border-radius: 40px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    }

    .media-button {
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .media-button:hover {
        width: 40px;
    }

    .media-button .media-icon {
        width: 40px;
        height: 40px;
    }

    .media-button .media-icon i {
        font-size: 18px;
    }

    .media-text {
        display: none;
    }
}

/* 特小螢幕優化 (320px以下) */
@media (max-width: 320px) {
    .media-wrapper {
        gap: 10px;
        padding: 8px 15px;
    }

    .media-button {
        width: 35px;
        height: 35px;
    }

    .media-button .media-icon {
        width: 35px;
        height: 35px;
    }

    .media-button .media-icon i {
        font-size: 16px;
    }
}